Sayontan

Sayontan Sinha is a technology strategy consultant living in Houston, Texas. Coding is his hobby, as are philately, numismatics, classical music, creative writing and quizzing. He is the author of numerous pieces of WordPress software, including the ultra-popular Suffusion WordPress theme and the versatile Photonic (for Flickr, Picasa, Smugmug and 500px.com integration) and FontMeister.

Dec 102012
 
Plugin

It surely looks like Suffusion’s loss if Photonic’s gain! I have pushed in the latest version of Photonic, which has some nice additions:

  1. Instagram Support:

    This was something that didn’t take long to develop. Even with my workload I managed to do most of the work last weekend and finished the rest this weekend. Instagram is now supported to the extent it is possible to support it! You can display photos that you post, in addition to popular photos. You can also search for photos by location and tags. In addition you can list out the users who follow you or are followed by you. The complete Instagram demo has been made available. The demo page is currently being worked on, however you can see all the examples in action there.
  2. Helpers:

    I pulled Photonic into its own menu item. Rather than nesting under Settings in your dashboard, Photonic is a new tab on the left. This has helped me create a new “Helpers” page for the back-end. Therein you can find things such as your Flickr ID or Instagram ID, without having to scramble across the web.
  3. This was an unreported bug: for authenticated users clicking on a Flickr Gallery thumbnail wasn’t showing a popup with the gallery photos. I have fixed this.
  4. I have also added the capability to let your external URLs (such as Flickr or Instagram URLs) in a new tab. You can configure the setting from Photonic → Settings → Generic Options → Generic Settings → External Link Handling.

I now have a pretty good framework in place for Photonic. If there is any source that supports OAuth 1 or OAuth 2, it should be fairly easy to add the nuts and bolts in place for it. The tricky part is obviously handling the galleries, photos etc.

One piece of good news is that I now have access to Zenfolio. So that is the next source in my line of sight is Zenfolio. The bad thing about Zenfolio is that it doesn’t use OAuth 1 or OAuth 2; it uses its own authentication. That makes things a bit more challenging.

Another source obviously on my radar is Facebook. However the preponderance of Facebook plugins makes me wonder if I can add value in that area. I will also be focusing on the social aspects of the plugin, like letting users share photos on Facebook, Twitter and Pinterest, among other things. In addition I will focus on more layout options, and extending Lightbox support to other non-GPL scripts.

Before I close, I would like to thank all of you for your support in response to my previous post. I shall be responding to each of you individually. The thing is, Suffusion has reached a point beyond which new features are hard to add. However I will work to keep the theme up to date, and if any new feature strikes me as being worthy of development I will definitely work on it. I will also work with you on the support forum to help resolve issues.

If you like my work, I encourage you to rate and review it – making money has never been a goal of my open source projects, but garnering your goodwill definitely has. Photonic’s review page is here, Suffusion’s here and FontMeister’s here.

Dec 072012
 
Design

It took a while, but version 4.4.3 of Suffusion is finally live. This version has a handful of changes:

  1. New Features:
    1. I have added an option to disable widgets, under Back-End → Modules. In there you will see a listing of all of Suffusion’s custom widgets. If you are not going to be using a particular widget, feel free to disable that widget. It will reduce the load on your server.
  2. Bug Fixes:
    1. I have fixed a problem that was causing all tiles in a tile layout to be of the same height.
    2. There was also a problem where users were unable to unset certain options, like the one to make responsive layouts compatible for iOS devices. This should now be working.
  3. Code Housekeeping:
    1. I have removed most of the BP integration content that was bundled with the theme. This is mainly because BP integration is exclusively supported in the Suffusion BuddyPress Pack, and this plugin has been around for a couple of years now.
    2. I have also completely separated out conditional WPML code so that it doesn’t load with the theme if you don’t have WPML installed.
    3. I have moved the CSS generation code to a dedicated CSS generation file from functions.php. This reduces the load for those scenarios where the CSS is not being generated.
    4. I have removed the BGIFrame library from the JS code, since the theme doesn’t aim to support IE6. This library was intended to help IE6 users not have issues with overlapping navigation bars.
    5. I have deleted some functions that were no longer being used in the theme.

As I write this, WP 3.5 is nearing its release. For several reasons I am not very thrilled about this.

Firstly, this release, as in the case of the previous one focuses on style rather than substance. There are several tickets in WP with patches for some WP problems, which don’t seem to get triaged ever. Instead the core developers focus on things like supporting larger theme screenshots in the back-end. In the meanwhile, several of my pet peeves (such as the fact that two active plugins cannot both modify the navigation menu traversal) continue to be ignored.

Secondly, the dogmatic approach of the theme review team, which reaches new levels with every major WP release, is now becoming too much of a headache to deal with. The latest set of guidelines that will be effective around a month after 3.5 goes live has some gems that make me want to stop theme development for good:

  1. New guideline under presentation-vs-functionality: Themes must not bundle custom post-content shortcodes
    While I understand that this is intended to prevent “lock-in”, the levels to which the review team is willing to go to shove this down our throats is astounding. The above essentially means that two particular shortcodes that Suffusion offers, suffusion-widgets (which lets you do ad hoc widgets) and suffusion-multic (which helps you do multi-columns) have to be pulled from the theme very soon. It doesn’t matter that these have been in the theme so long that if they are pulled, sites can break. More surprisingly, it doesn’t even matter that to prevent a lock-in I published a plugin (Suffusion Shortcodes) that will help users transition out. I made several suggestions like making theme authors bundling such shortcodes indicate this in their readme files or in the theme CSS header. I even volunteered to write a patch to core that will make users aware that a theme is defining custom shortcodes and alert users to the potential lock-in. But none of this made a difference.
  2. Timing for making do_settings_sections() required (as opposed merely to recommended) as part of Settings API implementation
    This isn’t one that affects me, but it makes me wonder if the review team is really so starved of work that they think up such ridiculous “guidelines”. I can say without a trace of hubris that I have pushed the WP Settings API farther than any other theme author on this planet. To the best of my knowledge there is no other theme that does 2-level options pages using the Settings API honestly (and I use the aforementioned do_settings_sections calls, which are terrible). And IMO the Settings API is among the lousiest and most hard-to-use pieces of code in WP. Telling users to use it for their options is like asking them to start drinking kerosene instead of water. I would love to see other themes with multiple options pages embrace this and use this function whole-heartedly. Of course, this isn’t a full-blown guideline yet, so it might not see the light of day.

Basically, the Theme Review Team is fine as long as it reviews theme quality. But telling a theme that it cannot include certain features even when such features are offered separately in a plugin primarily to prevent lock-in is BS. The people making the recommendations, for the most part don’t have to handle massive user bases, and that gives them a woefully inadequate view of ground realities. What is more amusing is that prior to each release there is an elaborate charade of “gaining consensus on guidelines”, yet what happens is that the only people whose opinions count are core developers, WP community big-shots and admin reviewers (I am none).

While I don’t normally rant here, the latest revision to the guidelines upset me so much that I have seriously begun to evaluate if developing Suffusion is worth it. It isn’t that I am upset because somebody has taken away my new toys. If you check Suffusion’s history you will see that however convoluted a requirement is, I have always managed to handle it even if I don’t agree to it. But there is always a straw that breaks the camel’s back; hopefully this wasn’t mine. A hobby is supposed to be fun, and I have been avoiding Suffusion development because the fun is all being bled out of it.

In the meanwhile, the Instagram module of Photonic is almost ready!

Nov 292012
 
Plugin

I just released a minor update to the Suffusion BuddyPress Pack. There was a report of it referencing a missing file for the latest BP version, resulting in a 404 error in the back-end. This update should take care of it.

I have also submitted a version of Suffusion for approval, however it has not been picked up by a reviewer yet.

Nov 252012
 
Plugin

I have been on a roll with respect to Photonic the last few week, only punctuated by the Thanksgiving weekend here in the US.

The latest version of the plugin has the following updates:

  1. The 500px.com component now has support for collections. However, please note that the Collections API in 500px.com is very quirky. It requires authentication, but then it only lets a user see his own collections after logging in. In other words, there way no way the API would let you show all your collections by a single call to a visitor – instead the visitor will see his collections after authentication. I have logged this as an issue, but I have no idea when it will get resolved. Naturally there was no point in offering such functionality.
    So what have I provided? I have built the capability to show a named collection. You could use this kind of an invocation, and it will show the photos in the specified collection:

    [gallery type='500px' view='collections' view_id='xyz']

    In the above, xyz is the collection id. Instead of view='collections' you could use view='sets'. They are synonymous in 500px.com parlance. How do you know the collection id? There is no programmatic way to do so. However you can see the URL of a photo in a collection, e.g. http://500px.com/photo/7206122?from=set/265673, and pick the portion after “from=set/”. So here the collection id is 265673. This is a photo from Michael Stuart, a Photonic user who has graciously consented to let me showcase his photos for the 500px.com demos.

  2. The prior versions had an issue with authenticating in 500px.com, which I have taken care of.
  3. I have added the capability to show fewer pictures on an archive page than in the single page/post. You can configure the settings from Settings → Photonic → Generic Options → Layouts.
  4. I have changed the Flickr module to be predominantly PHP-based, moving away from JavaScript. The reason for this switch is that the JS was causing some conflicts with some plugins. Additionally having a PHP-based solution will let you make use of caching much better.

That’s it for this release. My workload is increasing again from tomorrow, so updates will not be as frequent or heavy as they have been the last couple of weeks.

Nov 202012
 
Plugin

Version 1.26 of Photonic had a minor bug with the display of the login button – under some circumstances the button wouldn’t show up at all. I have patched this and made a new version, 1.27 available.

Do give it a try and let me know what you think.

Nov 182012
 
Plugin

I just released version 1.26 of Photonic, capping a few weeks of hectic development. First was the responsive version of Suffusion, then support for Font Squirrel in FontMeister, and now, OAuth2 support in Photonic for authentication in Picasa.

So this version of Photonic features:

  1. Support for private photos in Picasa
    This was a feature that took me quite some time and a few aborted attempts to develop. While Flickr, 500px.com and SmugMug use OAuth1 for authentication, Picasa uses OAuth2. The mechanisms for authentication differ, and it took me quite some time to figure out how to work with OAuth2. Thanks to Marcel Bokhorst, a suffurer, whose Add Links to Facebook plugin uses OAuth2 authentication. Marcel was gracious to help me with some OAuth2 concepts, which I have been able to put to use here.
    To enable private photo setup for Picasa:
    1. Go to the Google API Console.
    2. Create a “Client ID for web applications”. For the “Redirect URI” remember to include the URL of your WP homepage. E.g In my case the URI was http://aquoid.com/news.
    3. Go to Settings → Photonic → Picasa → Picasa Settings, and put in your new Client ID and Client Secret.
    4. On the same screen enable private photo access and save.

    Now when you visit a page with Picasa photos, it will show a box to log in. Without logging in that page will show all photos with public access, but once you log in you will be able to see private photos as well, to which you have been given access.

  2. Ability to show single photos in 500px.com
    Just like single photos in Flickr, you can now show single photos from 500px.com. The syntax is simple:
    [gallery type='500px' view='photos' view_id='4041547']

    This will show a single photo. The above shows a photo by Colin:

    Enjoying the sunshine

    Enjoying the sunshine
    A pretty girl sunning her self in a park in Madrid.
  3. More skins for Colorbox
    I have added a few other Colorbox skins. You can pick any that you like, from Settings → Photonic → Generic Options → JS Library Settings.

The reason I am excited about this release is that I can now consider integrating Instagram and potentially Facebook.

As usual, if you like this release, please do consider leaving a review for Photonic.

Nov 152012
 

While not Suffusion’s worst release by any stretch (that dishonour goes to version 3.7.4), version 4.4.0 did have some quirks that typically accompany releases that mess around too much with layouts and have been in development for a long but scattered period of time. The currently available version, 4.4.2 should address most of the issues seen:

  1. The worst bug of the lot was one that refused to accept custom image size parameters for images. Luckily the bug was caught within a few hours of the release and I was able to patch it the same evening.
  2. The next bug was the hanging of the tiles layout due to an unresponsive script, which I have taken care of.
  3. The third fix was for a duplicated index of posts in the static featured content. This was a curious bug, which I am not sure that I have rectified fully, mainly because I have not been able to replicate this on my test sites. However I have put in a stopgap fix that will prevent the index from duplicating.
  4. The last fix is again for the tiles layout, where the tiles were appearing too short for their content.

Hopefully this will resolve most of the issues that you have faced after 4.4.0.

Nov 132012
 
Plugin

Finally I have managed to complete the new version of FontMeister. The biggest feature of this release is the support for Font Squirrel. This is a big deal because at present FontMeister is the only WP plugin to support Font Squirrel.

Unlike other services such as Google Fonts or Typekit, Font Squirrel poses a unique challenge because it doesn’t provide hosted fonts. Instead you have to download @font-face kits from Font Squirrel to use the fonts. So I wrote the code to download the file, unzip it, and make the fonts available.

I did come across one issue, though. My local installation sometimes failed to download larger @font-face kits. The problem would resolve itself if I attempted the download after some time, but would resurface again if I attempted to download other big files. I put this down to some WP configurations at my end, since I had no such issues on a public installation of the plugin.

Nov 102012
 
Nasty

It seems like one rather nasty bug slipped through the cracks in 4.4.0. These are the symptoms: when you upgrade, you might suddenly start seeing your images stretched to the full width of your post, not respecting any custom width that you have specified for them.

The fix is very easy:

  1. Open style.css. You can do so from your WP Dashboard by going to Appearance → Editor and selecting style.css for editing. Alternatively you can use FTP to modify the file locally and load it back to the server.
  2. Look for this code:
    .entry img {
        max-width: 100%;
        width: auto;
    }
  3. Change it to:
    .entry img {
        max-width: 100%;
    }
  4. Save the changes.

That’s it – the images should show up correctly. My apologies for any alarms that this might have caused you. I have already fixed it and submitted a patch.

Nov 092012
 
Design

More with a sense of relief than anything else I announce the arrival of version 4.4.0 of Suffusion, a.k.a. the Responsive edition, which went live just a while back. The following are the changes in this version:

  1. New Features
    1. As mentioned above, this release was all about checking the box against “Responsive”. I did try to put a good amount of power in the hands of the users:
      1. The feature is “opt-in”. It is turned off by default and you can configure your settings by going to Suffusion Options → Layouts → Responsive Layout.
      2. You can pick which breakpoints you want to configure. Note that for every breakpoint there is a good bit of CSS added, so exercise prudence.
      3. Typically themes either kill a sidebar or shove it to the bottom of the content when they decide to go responsive. Suffusion lets you as a user decide what you want to do. If your sidebars have enough content to warrant a display on a small screen you can decide to show them at the bottom, and more importantly you have the choice of putting your sidebars side-by-side if you have more than one sidebar. This is of particular advantage on midway screen sizes such as 650px.
      4. You can also do some fancy things like switch your navigation menus to “select” boxes if your width goes down below a point.
      5. While most elements have been made responsive, the following need to be noted:
        1. Featured content is responsive only if you check the setting to make images stretch to the full width. It took a huge effort getting JQuery Cycle to behave in a responsive manner.
        2. The Headline box in the Magazine template and the Masonry-based layouts are NOT responsive.
        3. The featured content slider doesn’t respond to swipe gestures – that will be handled in a later release.
        4. I have to make some modifications to the menus so that they play well with touch devices. Currently if you tap on a menu item on a touch device it opens up the sub-menu if the menu item itself is not linked to a separate page. However if the menu item is linked to a separate page, tapping takes you to the page rather than showing the sub-menu.
  2. Bug Fixes
    1. A missing CSS file was being loaded for BP 1.6+. This has been corrected.
    2. The setting for the number of widgets in the “Widgets in Header” was not being respected. This has been fixed.
    3. I fixed an issue where the audio shortcode was not showing the audio player even if it was enabled.
    4. A couple of layout-related issues have been addressed: Webkit browsers (Chrome and Safari) weren’t automatically setting boxes to a fixed height in the Custom Layout and the Magazine template. In addition, Opera 12.x was misbehaving for the Custom Layout template.
    5. The Featured Posts widget was, in some cases, repeating the post index. This has been addressed.
    6. I have corrected a bug where the left and right arrow icons were reversed in some iconsets.
    7. Another bug was causing a post with no title in the Query Posts widget to show up with no linking text. This has been rectified to match the behaviour of the Recent Posts widget, where an id is shown as the linking text.
    8. Activating FancyBox was causing a lot of errors to show up in the logs for IE browsers. Since Suffusion doesn’t support IE6, I saw no harm in removing the lines causing the errors.
  3. Changed Features
    1. I have removed the version of the Meta widget that came with Suffusion. This widget was mostly identical to the default Meta widget and it served no great purpose by itself. If you had the meta widget in your sidebar, you will need to re-add it.
    2. Ever since version 4.0.0 I have had a combination of JS and CSS3 multi-columns to balance the widths and margins of blocks of text, such as the Custom Layout widget areas. I have now moved to a pure CSS solution that works on all browsers and is much more robust and stable.
    3. This is more techno-speak than anything else. I had some static markup calls in the main sidebar, which I have now replaced with calls to the_widget.
    4. I used to use an online PO file generator to build the theme’s PO file. But I realized that this generator tended to drop quite a few strings. So starting from this release I am using a different PO file generation technique. Naturally this has caused a spike in the number of strings that are to be translated.

Do bear in mind that I am not a fan of the common interpretation of “responsive” design – it only adds a lot more page weight for the measly benefit of showing your site differently on a device not capable of handling the extra page weight. However, there are times when ideology takes a backseat and one has to adapt. This happens to be one of those times. Personally I am still a fan of a dedicated mobile site for handling mobile requirements – responsive designs are a fad in this regard. Of course, you could still establish server-side controls for a lot of these things. E.g. The code could be made to detect a mobile browser behind the scenes and automatically give out an image with a lower resolution. Unfortunately such techniques haven’t been perfected yet.

So here’s hoping that you enjoy this release. For support continue using the forum, and please feel free to rate Suffusion or Photonic or FontMeister.