190 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

Is there a way to get the large preview image of the new files using the Envato API? It returns the thumbnail just fine but I want to also return the large preview like they do on the front page. Any advice on how to do this?

190 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

Figured it out. Did it this way. Is there a better way?

https://github.com/JeffreyWay/Envato-Marketplace-API-Wrapper-in-PHP

error_reporting(E_ALL);
ini_set('display_errors', '1');

require 'Envato_marketplaces.php';
$Envato = new Envato_marketplaces();

$account_info = $Envato->new_files('themeforest');

# See what we got back....
//$Envato->prettyPrint($account_info);
foreach ( $account_info as $item ) {
    $url = $Envato->item_details($item->id);
    echo '<ul><li><a href="'.$item->url.'?ref=ThemeBuddies"><img src="'.$url->live_preview_url.'" /><img src="'. $item->thumbnail.'" /></a></li></ul>';

    }


190 posts
  • Has been part of the Envato Community for over 2 years
  • Has sold $1+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
ThemeBuddies says

made one code boo boo. Forgot to take the ul out of the foreach loop.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by