Animated GIF generation / streaming with PHP

Here’s an example of animated GIF generation using PHP.

In this particular case I’m sending the first frame to the browser really quickly, so the browser can render the size of the image correctly, then while the browser waits for more data I do some processing (which can take 10 seconds) and send the rest of the GIF once completed.

The result are some “Recent Sales” images I can use on item pages like this:

Version 1: Animated image stats slider:

Version 2: Separate images that fade-in once the data has been calculated server side:



A demo of these is available on the UCM Pro item page.

Code is here: https://github.com/dtbaker/envato-live-sales-gif

Kids Corner Creative – Hand Painted Photoshop Template

Kids Corner Creative Website TemplateKids Corner Creative is a wonderfully illustrated design featuring a large tree, forest creatures and rolling green hills. The illustrations and watercolor designs have been hand painted by our in-house artist. The website design would be perfect for Children’s products and services like child care centers, education, kindergarten, boutique online stores and mommy blogs.

There are 14 PSD files included:

  • Landing page
  • Home Page
  • 5 footer designs: Plain Grass Footer, kids reading, woodland houses, pirate beach, green hills.
  • Blog listings and blog inside page
  • Shop Listings and Inside shop page including sidebar design
  • About page
  • Photo gallery
  • Contact Page
  • Illustration stock images to be used throughout the website.

The Photoshop layers are clearly labelled. They are all also Retina ready at 2x the standard size.

The Kids Corner Creative photoshop template is for sale on ThemeForest.net for just $12, preview the files here.

Kids Corner Creative website theme

buy Kids Corner Creative

 

Reminder: this is a Photoshop PSD template, not a WordPress theme

buy Kids Corner Creative

Creating a WordPress theme installation wizard / theme onboarding

When the popular WooCommerce plugin is first installed, the end user is presented with a lovely onboarding wizard helping with initial setup and showing links to further resources.

I have adapted this to a WordPress theme, here’s the video showing the installation wizard after theme activation:

This wizard will help with the following items:

  • Default plugin installation and activation ( handled by TGMPA behind the scenes )
  • Default content installation ( process standard XML wordpress import files, set menu locations, add default widgets, other custom options )
  • Setup automatic theme updates ( using oAuth with the Envato Market plugin )
  • Show the user some support and documentation resources
  • A final success page with links to further resources ( rating a theme, follow on twitter, etc.. )

The code is available here on github: https://github.com/dtbaker/envato-wp-theme-setup-wizard

There’s some more info on the forums here: https://forums.envato.com/t/fully-automatic-plugin-install-default-content-oauth-theme-updates-in-a-wizard/20504

Beautiful – A Hand painted Watercolor Photoshop Template

Beautiful LogoBeautiful photoshop file templateinhouse-artist

Beautiful is a unique and creative Water colour styled theme. The flowers and watercolour designs have been hand painted by our in-house artist. The website design template would be perfect for creative online stores like sewing projects, cooking, baking, crafts, photography, florists even children’s items. This template design would also complement your Etsy Store.

I have included a very detailed home page with layouts for a blog, online store, search bar, blog categories, shopping cart, free shipping graphic, social media icons and contact graphic.

Other pages included is the Coming Soon landing page, a Contact page, and 4 pages of design elements to use throughout your real world content to get you started.

The photoshop layers are clearly labelled. They are all also Retina ready at 2x the standard size.

The Beautiful Watercolor Photoshop template is for sale on ThemeForest.net for just $12, preview the files here.

 

Themeforest

Buy Beautiful Template

Reminder: this is a Photoshop PSD template, not a WordPress theme.

Buy Beautiful Template

Envato API PHP Code Samples

Here’s some code samples for working with the new Envato API

These will help people migrate as the old API is getting shut down.

Simple verify-purchase through the new API

WordPress oAuth PHP Class Example

This is a simple PHP class for interacting with the Envato API within a WordPress plugin. It uses some of the WordPress functions like wp_remote_get()

Simple usage example:

$envato_api = envato_api_basic::getInstance();
$envato_api->set_client_id('YOUR_CLIENT_ID_HERE');
$envato_api->set_client_secret('YOUR_CLIENT_SECRET_HERE');
$envato_api->set_redirect_url('http://yourwebsite.com/path/to/this/php/script.php');
$code = !empty($_GET['code']) ? $_GET['code'] : false;
if($code && $token = $envato_api->get_authentication($code) && $envato_api_result = $envato_api->api('v1/market/private/user/username.json')){
   // user is logged in with oAuth
   if(!empty($envato_api_result['username'])){
      echo "Welcome ".htmlspecialchars($envato_api_result['username']);
   }else{
      echo "API Error, unable to get username.";
   }
}else{
   $login_url = $envato_api->get_authorization_url();
   echo '<a href="'.esc_url($login_url).'" target="_blank"> Login with Envato </a>';
}

 

 

Drupal oAuth PHP Class Example

This was created by Envato user sowailem.  It uses some special drupal code so probably best to only be used inside a drupal environment. However it’s a great example of a class and can be pulled apart to adapt to other platforms.

 

SupportHub launched in beta

I’ve launched SupportHub !

This is a free WordPress plugin that hopes to help you manage support.

It will pull in Support TIckets from various networks ( email, twitter, envato, facebook, ucm ) and show them all in one place.

If it finds a similar question from the same person via different networks ( e.g. a tweet and an email ) then it will flag them as duplicate to help reduce time spent dealing with duplicate answers (or finding answers already sent via a different network).

All the details: http://supporthub.co/