186 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?

186 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>';

    }


186 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.

by
by
by
by
by
by