Feb 122017

I have stopped working on Suffusion (and supporting it in any form) after it was pulled from the WordPress repository. However, there were several requests for the code to be made available for download. I have finally put up a version at GitHub. There are two folders available there:

  • code – Contains the raw code used for the theme. I have ensured that all of it is current as per version 4.4.9, and that a couple of corrections required have been included.
  • dist – Contains the zip files for the code. You can use the 4.4.9 version (the last available version from WP), or the 4.5.0 version. The 4.5.0 version contains the corrections cited above.

Please note that I am not resuming development for the theme – keeping up with an obstructionist Theme Review Team is too cumbersome (apparently now Custom CSS is not allowed in themes!!). There will potentially be a point of time in the future when the currently available versions will cease to be compatible with WordPress. As of now the theme runs fine with WP 4.7.2.

Jan 312017

Version 1.62 of Photonic is now out. The following are included in this release:

  1. Slideshow Layout
    Up until now the native WP galleries could be displayed in a slideshow mode, by setting style='no-strip', style='strip-below' or style='strip-above'. Now you can do this for any type of gallery. Since the other galleries don’t have a style attribute, you can pass this value to the layout attribute. In addition, there is a new value it takes, strip-right, that shows a thumbnail strip to the right of the slideshow.
  2. Replacement of jQuery Cycle
    The jQuery Cycle library has been a staple of my WP projects since 2009. But while being extremely powerful, it was hard to make it work in a responsive fashion, and touch gestures were not integrated into it. The author of the plugin had released a new version, Cycle2, but Cycle2 cannot coexist with Cycle (which is used by Suffusion). Since WP yanked Suffusion from the repository, I have no means to modify it – as a matter of fact, replacing Cycle was what I was working on when Suffusion got pulled. So, rather than risk conflicts for users of Suffusion using Photonic, I figured out an alternative – a new slideshow library! I settled on Lightslider. This is a lot smaller than Cycle, it is responsive and touch-friendly out of the box, and has just 2 transition effects (fade and slide) instead of the buffet that came with Cycle.
  3. Trimmed Down Back-End
    Since the early days of Suffusion I have had a mechanism to display the back-end options, which I kept in place for Photonic as well. I finally cut the cord on that and re-styled the back-end to use native WP features. This removed the dependence on jQuery UI, which was often causing conflicts with rogue plugins. The new back-end has a different look, and reduced size and load-time.
  4. Lightgallery Lightbox
    I have added support for the Lightgallery lightbox script. This is a nice-looking but heavy script by the same author who wrote Lightslider. Feel free to give this a spin.
  5. New “Getting Started” page
    In your back-end, under Photonic you now have a linke, “Getting Started”. This is a compendium of links for high-level capabilities of the plugin.
  6. New Shortcode Attributes
    In line with the slideshow layout a bunch of new parameters have been added to the shortcode:

    1. controls – Shows “Previous” and “Next” buttons. Accepted values: show and hide
    2. caption – Overrides the caption content back-end setting for a gallery. E.g. title will always attempt show the title, even if blank, and title-desc will show a title if one exists, and a caption otherwise. Accepted values are none, title, desc, title-desc, desc-title.
    3. thumb_size and main_size – controls the sizes to be used for a gallery, overriding the thumbnail and main image sizes set in the back-end.

Have fun with this release!

Jan 172017

Version 1.60 of Photonic is now out. This version has the following updates:

  1. “Count” support in SmugMug
    Photonic interfaces for all providers have had a capability to restrict the number of photos pulled. Flickr has per_page, Google Photos / Picasa max_results, Zenfolio limit, 500px rpp (results per page), and Instagram count. The big exception to this rule was SmugMug, because SmugMug API v1.3 didn’t support this capability. However, API v2 supports it, and oversight on my part while implementing it for Photonic v1.57 caused me to skip it. This has been rectified, and now you can get a specified number of photos for SmugMug.
  2. “Load More”
    The above capability has made it easy for me to provide a “Load More” feature. Let’s say your album has 355 photos, and you want to display 100 photos in the beginning so as to not overwhelm your site’s visitors. Photonic so far lacked a capability to display the remaining photos on the same page. You can now pass an additional more parameter to the shortcode, which Photonic then knows to interpret as being asked to show a button. Whatever value you pass to the parameter will become the text of the button. So, more='Load More' will show a button with text “Load More”, while more='More …' will show a button with text “More …”.

    This feature uses “lazy loading”, so unless you click on the button the new batch of 100 photos (or whatever your count parameter specified) will not be fetched from the server, and the old set of existing photos will not be re-fetched.

  3. Lightcase Lightbox Support
    I have added support for the Lightcase lightbox script. This script is a bit heavy (25KB minified) compared to the last 2 scripts I added support for (Swipebox and Image Lightbox) and it requires third-party touch plugins, but it looks pretty nice. I did some optimization on the CSS (16KB), which originally used a custom font that added quite a few KB and files to the volume, and replaced it with CSS animations for the icons.
  4. I have fixed a bug with the “Image Lightbox” script wherein if interim popups were enabled, clicking on an image in the interim popup wouldn’t show the lightbox.

Enjoy the update!

Jan 122017

I have just released version 1.59 of Photonic. This is a very big release, with a lot of far-reaching changes:

  1. Rewritten Instagram Integration:
    Some time in June 2016 Instagram made several changes to its API. Every service provider makes changes to APIs (SmugMug has done it, Twitter has done it, and, notoriously, Google has done it with Picasa). Among things removed from Instagram’s API were popular photos and a few other things… and the changes broke Photonic. What messed things up rather badly, though, was that every Client ID (API key) was by default pushed into a highly crippled “Sandbox mode”, and every level of privilege that you seek for your Client ID to move it from its Sandbox to Production requires a labyrinthine round of approval. To the best of my knowledge Instagram is the only provider with an API that does this.

    Now, if every user of Photonic were to get stuck in this quagmire of requesting approvals for Instagram, they would require at least one week in addition to creating a screencast (!!) for the approval. The alternative would be to get an API key in Sandbox mode, which never returns more than 20 photos.

    So I put in place a different method of displaying Instagram content. Rather than than having users get their Client IDs (in Sandbox) from Instagram, they can use mine to obtain an “Access Token”. I have outlined the procedure on the Instagram page.

    I have, however, hit a hitch. Over the past 10 days I have been trying to get Instagram to approve Photonic for displaying all public content (including hashtags and locations), however they have refused. So far Photonic has only obtained “Basic” permissions, which will allow a user to display his or her own photos. But I still haven’t been successful in getting the “Public Content” permissions, which lets brands / advertisers / marketers / publishers display content by hashtags and locations. I am continuing my fight, but I am not sure if I will succeed anytime soon.

  2. Rewritten Picasa Integration:
    My frustration with the Google’s rewrite of the Picasa API is well known. However, my rewrite of the Instagram integration switched on the proverbial light-bulb with respect to Picasa. Enter “Back-End Authentication”, or “Server-Side Authentication”. Using this approach you will be able to show your users photos that you are allowed to see, not what they are allowed to see. This has several advantages over the traditional “Front-End” or “Client-Side” authentication. I have explained this in-depth on the Picasa documentation page. This completely eliminates the restrictions imposed by the Picasa API around private and protected albums.

    The Picasa rewrite has introduced a couple of new parameters for the Picasa shortcode, namely access and protection. Again, these are explained in the documentation page.

  3. Lazy Loading Flickr Collections
    Flickr’s Collections API is very inefficient, causing long load times if you have many albums in your collections. To counter this I introduced a concept called “lazy loading” of the collections. The details are explained in the Collections documentation.
  4. New Lightbox – Image Lightbox
    I have been considering the addition of several new lightbox scripts over the past couple of months. I finally got around to adding support for an ultra-lightweight one – Image Lightbox. The minified script is only 6KB, and it definitely looks pretty nice.
  5. Other Changes
    1. I fixed a “Headers already sent” error for password-protected Zenfolio albums.
    2. Swipebox in FireFox was throwing an “Event not defined” error. That has been rectified.
    3. I added a new “headers” parameter for Flickr, SmugMug and Zenfolio, where the album / set / gallery / collection header display may be controlled via the shortcode. It can take a comma-separated list consisting of thumbnail, title and counter, to show those specific elements.

Hope you enjoy the update!

Dec 292016

At the cusp of the new year, I have released a new version of Photonic with some big, and difficult changes.

  1. Deep-Linking
    This has been a very, very difficult thing to implement. Every image in a Photonic gallery is now assigned a unique id, which, when appended to the URL, is called a deep-link. This was pretty easy to implement. But, when you open an image in a lightbox, the URL in the browser should change to reflect its id, and when you navigate using the lightbox, the URL should change to reflect the new image. And when someone opens this deep-link in a browser, it should automatically launch the image in a lightbox. This was the hard part, thanks to the different lightboxes and scenarios that I had to account for. You can control deep-linking from Photonic → Settings → Generic Options → Generic Settings → Deep Linking. That being said, a couple of things don’t work:

    1. I couldn’t get it working for Fancybox. But I did get it working for Fancybox2. So it works for Swipebox, PrettyPhoto, Colorbox and Fancybox2. If you are curious about using Fancybox2 as your lightbox, see this.
    2. If you are diplaying an album as a thumbnail, and upon clicking it, it launches a slideshow, the deep-links for the images show up in the browser. However, if you provide this link to someone, it will not automatically launch the image in a lightbox. For all other scenarios the lightbox opens up correctly.

    This brings me to the next big change …

  2. Social Sharing
    When you open a deep-link in the browser and the lightbox shows up, it will show you sharing icons for Facebook, Twitter and Google+. You can then share deep-linked image, which will let others access your photos directly. Social sharing can be controlled from Photonic → Settings → Generic Options → Generic Settings → Social media integration, and will not be active.
  3. Other Changes
    1. Another big change is the addition of “Bypass popup” support to all lightboxes supported by Photonic. Previously Photonic supported this mode in Swipebox and PrettyPhoto only, but now it is available in Fancybox, Colorbox and Fancybox2 as well. This is on by default, and you can switch it off from Photonic → Settings → Generic Options → Popup Panel → Enable Interim Popup for Album Thumbnails.
    2. I have added a hook, photonic_modify_title to apply a different title for photos.
    3. I have enhanced the support for Fancybox2, amongst third-party lightboxes, adding popup bypassing, thumbnail and touch gesture support.
    4. In case an image has no title, and lightbox linking is disabled, the plugin will now not show the “View” text in the lightbox.
    5. I have fixed a Smugmug bug that was causing the album headers to show up twice.
    6. There were Fancybox styling issues in certain themes, like Twenty Fifteen and Twenty Sixteen, which I have addressed.
    7. A while back Smugmug had introduced some new image sizes – I have got them added to the options.

Deep-linking and Social Media Integration is only available in expensive premium lightboxes, so I am happy to be able to bring this to you for free.

Hope you like this release, and have a Great New Year!

Dec 102016

As outlined in my previous post, I updated Photonic to use the latest version of Smugmug’s API, v2. Apparently this causes your API keys to stop working unless you provide some authorization. Don’t worry – it is a lot easier than it sounds. This is what you do:

  1. Login to your Smugmug account.
  2. Go to the API Terms of Service at https://api.smugmug.com/api/developer/accept.
  3. You will be presented with this screen:
    Smugmug API v2 Terms of Service

    Smugmug API v2 Terms of Service

  4. If you accept the terms of service, select the two checkboxes and click “Accept”.

That’s it. You should be good to go! Please let me know if it doesn’t work.

Dec 092016

It has been such a long time since I released a Photonic update! In fact, this is my first WP contribution in a long time.

As per my original plan I intended to replace JQuery Cycle in Photonic and Suffusion at the same time with JQuery Cycle 2, and I had started making the changes. But with Suffusion being pulled from the repository in June, updating Photonic would cause a software incompatibility. So I had to reverse all the JQuery Cycle 2 changes, and focus on newer things. As a result this ended up being a big update.

These are the changes I put in:

  1. Smugmug Updates
    • Quite some time back Smugmug declared v1.3 of its API deprecated. So I updated the code to use to version 2 of the Smugmug API. This was a herculean undertaking, as I had to go through a long process to ensure that things were not broken. Things had changed fundamentally between the two versions, and I spent several days working with Smugmug support to ensure smoother integration with WP. Eventually it got done. This resulted in improved performance, and better support of titles, captions and highlight images.
    • As a direct consequence of the above, you now only require the album_key instead of both, the album_id and album_key. See the Smugmug Photos page for details. Your existing shortcodes will work, though.
    • I added full support for password-protected albums in Smugmug. To see an example go to the Smugmug Albums page and try opening the Bushveld album with the password Saffa.
    • I added more information to the Smugmug Helper (Photonic → Helpers). If you are authenticated it will show you album information for password-protected albums as well.
    • Note that if you are using Smugmug authentication, you will need to define a Callback URL for your API key. This wasn’t a requirement earlier.
  2. Zenfolio Updates
    • Just like its competitor Smugmug, Zenfolio too got the support of password-protected albums. See the Groups and Photosets pages for examples.
  3. Picasa / Google Photos
    • Unfortunately here it is not all good news. One of the reasons I restarted work on Photonic was that Google had moved away from PicasaWeb. It turns out that the move has been rather draconian. They have made it impossible to make a new, public album in Google without third-party APIs or lengthy workarounds, they have completely killed the authkey option that existed in Picasa, and they have made sure that the new “Share URL” option for albums only works for authenticated users. In short, they have adopted a Facebook-style photo-sharing approach rather than their more robust competitors, Smugmug, Zenfolio and Flickr.

      They had also made it impossible to determine album ids easily, for which I added a solution. I introduced a Picasa Helper (Photonic → Helpers) that is capable of listing out all your album ids.

  4. Miscellaneous Changes
    • For Flickr / Smugmug / Picasa / 500px, I added a filter attribute to the shortcode, which lets you pass a comma-separated list of Albums / Photosets / Galleries / Collections for which thumbnails should be displayed, rather than the entire list of such entities. You can see examples on most of the help pages, e.g. Smugmug Albums.
    • A rather minor thing, but I added a “loading wheel” that would show up while the images on your site were rendering.

That’s about it. Do let me know what you think of this update.

Jun 242016

On 22nd June, Suffusion was removed from the WP themes directory all of a sudden. Someone decided that a theme whose last version was released and approved 5 months back and whose users had been generally happy did not meet requirements, and yanked the theme.

My response to the comment was simple:

However, given that I have always come out at the losing end of these discussions, please feel free to keep the theme suspended. I have neither the inclination nor energy to get drawn into this again, particularly since the customizer implementation is back-breaking, and the users of the theme had been perfectly happy with the theme in its current state and the once-in-a-while critical updates that they were getting.

If any of you is interested I can provide the rebuttals here, but it is not worth the time and effort. Stay assured that the all “concerns” about security are unadulterated rubbish. All options are written into the database in a secure manner using the recommended functions and via WP’s standard APIs and then retrieved. If they are really concerned about security, they have to look at the WP platform itself and ensure that none can access options stored in the database for any theme or plugin (not just Suffusion).

As for the rest, the sole deal-breaker is the Customizer implementation. Switching to it is akin to writing a new theme, and that is something I just cannot do.

Anyway, this has been a long and satisfying ride. Thank you for all your support in helping this theme get to the pinnacle of WP themes multiple times over. For those who have the theme currently installed, don’t worry – it will still work as it has; I just will not be able to release any updates for it and it will no longer be available as a theme from the WP directory. In case you are concerned about the “fatal error” on the ticket, the Suffusion Shortcodes plugin addresses it.

Feb 172016

I have released version 1.56 of Photonic. This version has the following changes:

  1. You can now get a “slide-up” style title for all your thumbnails, in addition to the JQuery Tooltip and other options that you have.
  2. I removed some syntax that was causing the plugin to break installations with PHP versions 5.3 or below. If problems persist, please let me know and I will take a look.
  3. I have made a small change to ensure that Picasa photos are pulled from an https link instead of http. This will ensure that the plugin works for Picasa even when the WP installation has SSL.

I learnt today that Google is shutting down Picasa (both, Web and Desktop) in favour of Google Photos. This isn’t good news. They haven’t provided any information regarding API changes, and given the challenges we have had with authkey settings and the differences between album protection of PicasaWeb and Google Photos, I can only surmise the level of difficulty I am going to face in making things work once Picasa is gone for good. Google has currently provided a date of 1st May 2016. Let’s hope they at least do a good job of the API updates before then. In the meanwhile, do let me know if your Picasa albums suddenly stop working.