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 integration) and FontMeister.

Jan 152011
How To

Back in September I released Suffusion Version 3.6.6, where I introduced the capability to skin the navigation bars. To do this I added some nifty constructs that would help skin borders, backgrounds etc. Shortly after that some users (albeit a very small percentage) started reporting an inability to save Theme Skinning options. I tried debugging this, but failed to come up with a solution.

Then, one of Suffusion’s users, “Bird” carried out some terrific voluntary research and found the root cause. Apparently quite a few folks have a protection system called Suhosin installed. To quote “Bird”:

As I had the same issue with Suffusion 3.7.3, I did some research and finally found out that the probelm appears due to ‘php5-suhosin’, a protection system that only allows a maximum of 200 variables per post by default.

In order to check if suhosin is running and might be causing your problems, just create a php-file (e.g. "info.php") with the following content:

<?php phpinfo(); ?>

The variables that are of interest for us and that need to be changed are: "" and "suhosin.request.max_vars". Set them both to "500" and the problem should be solved.

What was happening is that the “Theme Skinning” page, thanks to the addition of the new options had a very high number of HTML input fields. Each border / background element / font triggered around 5-6 extra HTML fields, and given the customization choices, the total number of fields multiplied to get to quite a high figure.

The implementation of the fix, though required a little bit more work. And kudos to “Titus”, another user, for the solution. Apparently it is not enough to simply set the above variables to a high figure. You also need to fiddle with a few more. You can set the following values:

suhosin.memory_limit 128M 128M 65000 65000
suhosin.request.max_value_length 65000 65000

This should take care of the problem. So if you are facing an issue with saving your options, try tweaking the settings as described above. You might need the help of your hosting provider to help set these values.

Dec 202010

Version 3.7.3 is another security patch that was released yesterday. The following are the changes:

  1. Apparently there was a problem with my checked in code in 3.7.2, so the site optimization check for CSS files didn’t go through correctly. This has now been corrected.
  2. I fixed a problem where the edit link for pages was not clickable.

You are strongly encouraged to do this upgrade.

Dec 162010

For once this is an important security patch, hence I made this release by disrupting my regular theme development. Here are the changes:

  1. Added some security checks to ensure that the site optimization activities would take only CSS files for compression/zipping.
  2. Fixed a bug with the byline pullout in IE7, where the pullout was lying over the content.
  3. Fixed a bug with the SEO settings where if the theme’s SEO was disabled, it was not printing any title.
  4. Changed a Twitter icon file name to have only lower case characters, so that it works with all operating systems

I encourage you to download this patch. For now the translations are in the theme. I will remove them from the next version.

Dec 142010

The theme reviewers at WordPress revamped the official list of featured themes earlier this morning … and listed Suffusion as a featured theme! Note that “popular themes” are determined by the number of downloads that users make and the “featured themes” are listed based on a set of more subjective criteria. Till yesterday the list of featured themes was quite old and had themes that hadn’t seen any updates since ages, but the new refresh has ensured that obsolete themes are no longer a part of the list.

Where Have I Been?

For the past week or so I have been extra-busy with my move. Now that I have moved to a new city, I have new challenges, like finding a place to live, a school for my son etc. As a result my responses on the support forum will be slow for the next couple of weeks as well. Please take this into consideration when you post asking for help.

I have also had a lot of difficulty setting up my new development machine, with Firefox absolutely refusing to install the Adobe Flash plugin, rendering it more or less useless. All in all, the theme development has slowed down significantly too. That being said, before the hiatus I had made some significant changes, mostly beneath the hood. One of these changes involved completely replacing TimThumb with native WP functionality, and another was to start replacing the existing options framework with WP’s native Settings API. Both these changes are far reaching and very high impact, as a result I want to be very sure of their correctness before I make them available. It is here that I have to seek your help in beta testing. Please let me know if you would be willing to help out in this process. You can do so by commenting to this post, and I will respond to you via email when I am ready to distribute a beta version, provided, of course, that you leave a valid email id!


Dec 052010

To all users of Suffusion – a BIG THANK YOU!! On 5th December 2010 Suffusion reached 150 ratings on! A couple of months back I had excitedly announced the milestone of 100 ratings, whereby Suffusion became only the 5th theme to reach that landmark. I am happy to announce that Suffusion is now the 4th theme to get to 150 ratings, with only Atahualpa, Inove and Mystique ahead of it. Thanks to all of you!

As you are well aware, I don’t work on the theme with the expectation of monetary gain, which is why Suffusion is one of those rare themes that is truly free in every sense. In fact some of you have even sent me messages offering to pay me for customization and I have always given you the same response – I don’t do freelancing, because my family, my day job and the constant work on Suffusion to keep it good pretty much consume all the time I have. I don’t even try to market the theme because I cannot take on the extra load.

As a result, your appreciation through my coffee fund and being rated on are pretty much priceless as rewards, because it means that the 30000+ lines of code I have written for the theme have some value to someone!

Now for some more good news – at a recently conducted poll on WLTC, Suffusion got voted among the top 5 favourite themes by users, ahead of a lot of personal favourites of my own (you can check my own favourites out there). So thanks to all of you who voted for Suffusion there, too!

Now for the big announcement that I mentioned in my last theme release post.

I am moving translations out of core Suffusion. This means that individual language translation files will no longer be distributed with the theme.

But don’t worry. I am not leaving you in the lurch. I have set up a page called Translating Suffusion for your use. The page is very well detailed and has a lot of information:

  1. You can download individual language translation files.
  2. I have explained how you can set up your sites so that translations don’t get overwritten when you upgrade the theme.
  3. I have even provided guidelines for you to create your own translations. Well, not really, but I have provided references to great tutorials and tools to help you do that.

Why did I do this? There are several reasons:

  1. Quite simply, the theme package was getting extremely large – at 1.7MB it was larger than most themes I have seen. Removing all the translations reduced the size by around 400KB. Mind you, most of the theme’s users use the English version of the theme. Folks using localization use just one localization language, hence the extra files are meaningless to most users.
  2. The Translating Suffusion page provides a centralized view of the different translations, including information about the freshness of each translation. If you believe you can bring one of the translations up to date, please take a shot at it.
  3. I wanted to provide better visibility to the contributors. Earlier I simply used to mention the names of the contributors in release announcements. Now you can see the names of all contributors for every single translation in one place.

Starting from version 3.7.2 I will be removing all the translation files from the theme, but the process I have outlined in the Translating Suffusion page should work right away.

Do let me know if you have any questions / concerns / feedback.

Nov 302010

Suffusion Version 3.7.1 was released earlier today. These are the key changes in this version:

  1. New Features
    There were a handful of new features in this release
    1. Pullout-style Bylines
      I added a new way to display page and post byline information (the byline information comprises of “Posted By”, “Category”, “Tag” etc). You can now display the information as a “pullout” instead of in the corners. Here is a snapshot of how this looks:
      For the Minima skin the pullouts are enabled by default. If you don’t like it, or if you like it enough to enable it for other skins, go to Blog Features → Post and Page Bylines → Position of Meta Information (including date) and pick how you want to show it.
      Note that with this you can now display the publishing date of the post for the Minima skin, which was earlier not possible without a hack.
    2. New Attachment Template
      Suffusion earlier used to default to a generic attachment page. In this release there is a special attachment template that displays an apt icon for the type of attachment you have. I have made this functionality extremely flexible. For example if your attachment is an audio file, you can set the attachment page to display an embedded player to play the file. If your attachment is an image file you can choose to show EXIF data for the image.
      In addition, you can define your own handling functions for different mime types. There are functions existing for the basic mime types: suffusion_image_attachment (for image attachments), suffusion_audio_attachment (for audio attachments), suffusion_video_attachment (for video attachments), suffusion_text_attachment (for text attachments) and suffusion_application_attachment (for application attachments). You could define other functions in your child theme like suffusion_vnd_ms_powerpoint_attachment (for Microsoft PowerPoint attachments).
      You can control the settings from Templates → Attachment.
    3. JQuery Masonry
      JQuery Masonry is a very interesting add-on that I had been wanting to add for a while now. This release I finally was able to get it in. This add-on automatically adjusts layout for floated elements. So you will not see fewer empty spaces in the horizontal widget areas (Widget Area Below Header etc), when the widgets are of different heights.
    4. New Filter Hooks
      A lot of new filter hooks were added for better child theme support:
      1. suffusion_can_display_top_navigation
      2. suffusion_can_display_main_navigation
      3. suffusion_can_display_sliding_panel
      4. suffusion_can_display_left_sidebars
      5. suffusion_can_display_right_sidebars
      6. suffusion_can_display_widgets_above_header
      7. suffusion_can_display_widget_area_below_header
      8. suffusion_can_display_widget_area_above_footer
      9. suffusion_can_display_open_header
      10. suffusion_can_display_closed_header
      11. suffusion_can_display_breadcrumb_navigation
      12. suffusion_can_display_hierarchical_navigation

      If you are using a child theme, you can hook in your custom functions through these and prevent a particular widget area from being displayed.

  2. Changed Functionality
    This is mostly technical mumbo-jumbo, so you can skip this section if you are not interested.
    1. Selective removal of backward compatibility
      I have removed the following as per my previous announcement:
      1. function_exists checks for functions such as register_sidebar and dynamic_sidebar. These functions have existed since version 2.2 of WP and hence a function_exists check for these was overkill.
      2. Some other checks using function_exists have been removed, where very old WP functions were being checked for existence.
      3. A call to automatic_feed_links has been removed. This was a weird requirement, since the replacement for this function has only been available since WP 3.0, so for backward compatibility up to 2.9, I had to fall back on an older approach!
    2. Replacement with new functions
      The following functions from older versions of WP have been replaced with better/new variants, as per Theme Review recommendations:
      1. get_option("home")home_url()
      2. bloginfo("template_directory")get_template_directory_uri()
      3. bloginfo("stylesheet_directory")get_stylesheet_directory_uri()
      4. get_bloginfo("rss2_url")get_feed_link("rss2")
    3. CSS Optimization
      I have dome a good bit of CSS optimization by using a generic class for sidebars. I will be doing further optimizations to reduce CSS size in the next few releases.
  3. Bug Fixes
    1. The biggest bug fix for this release was for one that was causing the Double Right Sidebar layout to position the sidebars outside the content.
    2. Thanks to a tip from one user on the support forum, I managed to fix an unexpected bug with the Google Translator widget not working. That has now been fixed and it works as expected.
    3. There was a bug due to which disabling Suffusion’s SEO settings was not working for document titles. This has been fixed.
    4. There are a couple of rendering rendering issues on WebKit-based browsers (Safari and Chrome) that have been fixed. The first was a gap of 2 pixels between the bottom of the navigation bar items and the lower border of the navigation bars. The second was where setting the CSS max-width and min-width parameters with a fixed width layout was causing issues.
    5. Under some settings the navigation bar was not stretching across the width of the wrapper. This too has been fixed.
    6. The HTML attribute “height” has been removed from image HTML tags. This makes sure that the aspect ratio is preserved if you have a large image and it is being scaled down to fit into the dimensions of your content so that it doesn’t overflow.
    7. Another minor bug fix was where the home page wasn’t getting highlighted if it was a text link.
    8. Under certain rare cases there was a debug message showing up saying “Call-time pass-by-reference has been deprecated”. One such case was when the WP-United plugin was being used. I put in some code so that this wouldn’t happen, so hopefully this bug is now fixed.

Now for some upcoming changes. Note that these changes are quite high impact, however they haven’t been made yet.

  1. Removal of TimThumb Support
    TimThumb is the most widely used open-source PHP-based image resizing script available. But for various reasons the script doesn’t find favour with the WP theme approvers. Their requirement is that if your theme is not backwards compatible you MUST use WP’s native “post_thumbnail” feature. That would have been fine in the normal course of things, except that this is a fairly half-baked feature in WP at present. It has several shortcomings:
    1. It doesn’t apply to custom fields. So you cannot use it to have one thumbnail for an excerpt, a different thumbnail for the same post in the featured post section and yet another picture in the main content.
    2. It is not dynamic. In other words, images of a particular size are generated when a post is saved, but if you were to demand an image of a different size, you would have to first register that size, then fetch the generated image. This is a double-edged shortcoming, though. It prevents users from specifying any size they want and filling up the WP installation’s folder with all the generated images.
    3. Not being dynamic presents another challenge. Existing posts in your blog will not work without being modified specifically to work with the post_thumbnail functionality. That is a real pain.

    Nonetheless, this is something that has to be fixed, because the theme reviewers are planning to completely outlaw TimThumb in a few weeks. I am working on some alternatives, so hopefully I will have something by the next release.

  2. Moving Translations out of the Core Theme
    Suffusion has translations in 23 different languages at the time of writing this post. Though this means the theme has an excellent user base, it also means that the zipped theme file I upload to the repository is around 400KB larger than it could have been.
    So I am going to keep the translation files separate from the main theme. That would require you to download the translation that you need explicitly from this site. Luckily the translations don’t change very often, so this is mostly an infrequent annoyance. Version 3.7.1 had some translation-related changes, so I am expecting translators to post their updates. Once they do so, I will distribute them here so that you can make the update as appropriate.

That’s it for this release. Keep watching this space for the two main items I wrote about above.

Nov 142010

I have completed adding the finishing touches to the official plugin for the Suffusion BuddyPress Pack, to be distributed from the WordPress site. I am currently waiting for access to the SVN repository at WordPress so that I can upload the plugin. Once I have the access the plugin should be readily available. You will be able to search for it from your administration panel at Plugins → Add New by searching.

The plugin has come along quite nicely. I have also bundled in it the support for the BuddyPress Album+ plugin. In future iterations I will add support for a few more third party plugins, assuming they allow their templates to be overridden by the theme.

Note that for the plugin to work you must have at least version 3.6.9 of Suffusion, which is the current version.

Once the plugin is officially released I will let you know.

Nov 112010

Before I begin about this release, I would first like to apologize to all people whose layouts broke due to the last release. As it turns out I had not tested certain configurations involving the static Tabbed Sidebar, which resulted in all people using this feature having their sites become train-wrecks. Disabling the Tabbed Sidebar would have fixed the issue for all affected people, but there was no way you as a user could have known that.

Anyway, this release is a bug-fix release and there are no new features. Here are the fixes:

  1. Layout bugs
    1. The biggest issue – wonky layouts upon activation of the Tabbed Sidebar – has been fixed. There is one exception – if you are using IE6 (yes, that fossil) and you have the Tabbed Sidebar on and your Tabbed Sidebar is on the left side and you have at least one sidebar on the left site, then your left sidebar will render incorrectly on IE6 (only on IE6). I spent some time trying to figure this out, but gave up because I had to get this release out early and this particular combination has an extremely low probability of occurring. Otherwise I have hopefully resolved all issues on all browsers regarding this mishap.
    2. The Widget Area Below Header was not spanning the full width of the wrapper and was showing a blank space on the side.
    3. The Widget Area Above Footer was overlapping the right sidebar if the sidebar was longer than the content.
    4. The No Sidebars template was showing up with empty space on the side.
    5. In the “Tiles” layout excerpt images were becoming very tiny because the widths were computing incorrectly.
  2. If you had defined more than one WP 3.0 Menu, each menu item was getting repeated multiple times in the navigation bar. This has been fixed too.
  3. There was a bug that was preventing the post footer from appearing in the archive view (front page, category, date archive, tag etc). So if you had Tags or “Posted By” at the bottom of a post, that wasn’t being displayed. This now works.
  4. There was a very old bug where the excerpt title in the “Tiles” layout where the header of excerpts wasn’t reading the alignment setting correctly. Instead it was borrowing the alignment of Magazine excerpts.

One point I would like to highlight – often when you upgrade your theme it apparently breaks your layout, while in truth there is nothing wrong with it. In such cases try out a few very simple things. First and foremost, clean out your browser’s cache and reload your page. Second, if you have a caching plugin make sure that you rebuild its cache, otherwise it will serve content that is not current.

I also thought I should highlight what some known issues are. There are 2, actually, both of which are JavaScript-related:

  1. At some point in the last 3 releases the Google Translator widget stopped working. I have no idea why, since I haven’t changed anything there. If you were looking for this feature to work I encourage you to look for some free plugin to help you there.
  2. At some point in the last few months the Fade / delay effect on the navigation menu stopped working. Again, I have no idea why. Since this is a very low impact issue I didn’t spend an excruciating amount of time trying to resolve this.

Another aspect I wanted to highlight was regarding my comment in my previous post, about “Rolled up menus”. A few users had difficulty understanding the concept, so I thought I will explain it here. To create a new dummy node:

  1. Go to Appearance → Menus and open up your menu.
  2. Create a new menu item using a Custom Link.
    1. For the URL specify #. Make sure you delete the “http://” that sits there by default
    2. For the Label put in whatever you want to name your root node.
    3. Add to Menu
  3. Once added, move this item to the top of the list.
  4. Now, indent every other item under this top item. This way each other node is a child of your newly created root. Remember to indent – this is important.
  5. That’s it. Since you have set the URL to be “#” Suffusion knows that it shouldn’t open any page for it. All other items are listed as children of this new node.

That’s it for this release. I am hoping this will smooth over the rough edges of 3.6.8. I will keep subsequent releases smaller in scope, though, quite frankly I don’t foresee anything being so large in scope.

Over the next few weeks I will focus on building a proper plugin for Suffusion and BP compatibility, assuming that the support queue for 3.6.9 isn’t huge.

Nov 112010

As the WordPress theme review process gets really strict about what WP functions are permissible in themes and what are not, it becomes more and more difficult for theme developers to support older versions of WordPress. Most developers have already taken the step to stop supporting anything older than version 3.0.

I have always been pro-backward compatibility and Suffusion works for any version of WP starting from 2.8. But with the complexity of code and the stringency of approval criteria rising, this will not be sustainable. As a result I have decided to phase out support for older versions of WordPress.

I will start by first removing any code that is specific to version 2.8, then remove 2.9 support. I would like to make this post a formal announcement of this decision. If you are a Suffusion user on a version of WP older than 3.0, now is a great time to upgrade. Version 3.0, which came out in early June has been stable for a while now and has some great features. If you haven’t upgraded you are missing out on a great number of goodies. And if the only reason you are not upgrading is because some plugins that you are using have not been written to work with 3.0, you should start looking for alternative plugins for the same task, or else you will run the risk of having a very inefficient system, or one where your theme and plugins will support different versions of WP.

With regards to version 3.6.8, I have already released version 3.6.9 with fixes for all the reported bugs in there. It has been approved, but not made live yet by the reviewers, so please sit tight.