Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for premium themes from Envato / Themeforest #129

Closed
royduin opened this issue Jan 2, 2016 · 18 comments
Closed

Add support for premium themes from Envato / Themeforest #129

royduin opened this issue Jan 2, 2016 · 18 comments

Comments

@royduin
Copy link

royduin commented Jan 2, 2016

I'd like to install some premium themes from Themeforest with Composer which isn't that easy, see my question on Stack Overflow: http://stackoverflow.com/questions/34295318/install-premium-wordpress-theme-with-composer.

But today I came across the Envato API: https://build.envato.com/api/ which provides the possibility to download purchases: https://build.envato.com/api/#market_0_Buyer_Download by item_id or purchase_code which can be obtained by https://build.envato.com/api/#market_0_Buyer_ListPurchases. The only disadvantage of this is that only the latest version can be downloaded because Envato doesn't provide the possibility to download older versions. But with for example a premium Wordpress theme the API gives the metadata of the theme as wordpress_theme_metadata which contains the version so it's possible to do some kind of check if it's still the same or a new version.

An implementation for this would be very nice! What do you think?

@vercotux
Copy link

vercotux commented Jan 7, 2016

I developed a composer plugin in order to do this with Envato (and WPMUDEV and some others), but I'm afraid to publish it in case they will try to block it.

@tamlyn
Copy link
Member

tamlyn commented Jan 7, 2016

The basic problem with this is that your purchases are private to you and therefore can't legally be held in a public repository like this. I'm guessing any implementation would need to have your API token or whatever so that it can fetch only your purchases.

@royduin
Copy link
Author

royduin commented Jan 7, 2016

@vercotux, can you share your code with me/us? You can find my contact information at my website listened in my Github profile.

@tamlyn, I agree but you can legally list them and if you want to use it you've to provide your password or API key. I can't see why Envato won't allow that.

@tamlyn
Copy link
Member

tamlyn commented Jan 7, 2016

Yes, listing all but only installing with the appropriate credentials sounds reasonable. It's not something I have any need for at the moment but I would happily accept any PRs that implement this.

@vercotux
Copy link

vercotux commented Jan 7, 2016

@royduin I would gladly publish it, but like I said, I am afraid some of the providers will not like that and would attempt to block it. I would only publish it under the condition that enough people agree to help maintain it if that happens.

@royduin
Copy link
Author

royduin commented Jan 7, 2016

@vercotux, I'm in and if we can add it to wpackagist I think @tamlyn is happy to merge it.

@vercotux
Copy link

vercotux commented Jan 7, 2016

It is designed to work without (or alongside) wpackagist though. It would have to be somewhat adapted to integrate it into wpackagist. Right now it allows me to define a repository package from Envato, for example:

{
    "type": "package",
    "package": {
        "name": "envato/revslider",
        "type": "wp-plugin",
        "version": "4.6.0",
        "dist": {
            "url": "http://codecanyon.net/user/<USERNAME>/download_purchase/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
            "type": "envato"
        }
    }
}

I'm entirely not sure how it could be built into wpackagist as I am not familiar with its inner-workings.

@emilbayes
Copy link
Contributor

I don't think this belongs in wpackagist, but as a custom Composer installer plugin, just like eg. https://github.com/johnpbloch/wordpress-core-installer.

@vercotux
Copy link

Update: I've pulled my repository and will not be publishing anything. Envato are a bunch of crooks. I offered them help and they ignored me for 1 month then after countless emails and tweets basically told me to f*** off. They can go **** themselves. Don't finance this scum.

@vladcosorg
Copy link

@vercotux Hey, can you share it privately?

@tyrann0us
Copy link
Contributor

What you are looking for is called SatisPress. Refer to #162 (comment) for more details.

@szepeviktor
Copy link

szepeviktor commented Feb 18, 2020

Just started to design a Composer plugin for Envato
https://github.com/szepeviktor/composer-envato
by providing an item ID and a personal token you will be able to install a theme or plugin with Composer.

@ethanclevenger91
Copy link

I developed a service called Package Peak that allows you to authenticate against several Envato accounts with a single API token and get access to your purchases in a versioned manner.

Doing this, I learned that Envato doesn't keep old versions of plugins/themes, just the latest published version, so Package Peak has to store it.

I assume wpackagist is currently just mirroring the WP plugin repo and not actually hosting any files, which would make an Envato solution much more complicated than an passing an authenticated request along.

@szepeviktor
Copy link

assume wpackagist is currently just mirroring the WP plugin repo

actually just linking the WP.org repo

@royduin
Copy link
Author

royduin commented Apr 29, 2020

Keep in mind that some themes include plugins with zip files which you also want to version @ethanclevenger91. Something SatisPress can handle for you. It can also download new versions by just installing the Envato Market plugin within the SatisPress installation. And it's free...

@royduin
Copy link
Author

royduin commented Apr 29, 2020

Closing this issue, SatisPress is currently the best solution.

@royduin royduin closed this as completed Apr 29, 2020
@ethanclevenger91
Copy link

@royduin Totally fair, though some people may not want to be in charge of managing that extra WP environment.

@szepeviktor
Copy link

Anyway I keep writing Composer plugins for all kinds of ZIP-distributed plugins/themes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants