May 122011

The first Beta version of WP 3.2 is out. Though this is more of an evolutionary release, as the release notes point out, there are some significant things you need to note:

  1. PHP 4.0 will no longer be an option. You need to have at least PHP 5.2.4 and MySQL 5.0. This makes me very happy, since I have sometimes been caught napping due to the use of a PHP 5* function causing breakage under PHP 4*.
  2. IE6 support is being killed. This makes me even happier!! Though I have tried to keep Suffusion running under IE6, it has been a struggle, particularly with respect to certain dynamic sidebar arrangements (I know for sure that some of them don’t work). The official killing of IE6 support means that I can kill IE6 support myself and not feel guilty.

The killing of support for older versions of software has a side-effect that makes me rub my hands with evil laughter. The reason? Plugin authors have to pull up their socks. The two main types of extensions to WP, themes and plugins have very contrasting levels of controls. Themes go through a rigorous and regimented approval process, with a battery of tests, standards compliance checks and so on. Periodically the theme review team goes through existing repository themes, then yanks those which have not been updated for eons.

Plugins are at the other end of the spectrum: once you get space assigned to you in the plugin repository you can check in pretty much what you want. The net result is that plugins often follow poor coding practices, use outdated JS and cause royal conflicts with themes. An example is the one I detailed in a prior post, where incorrectly coded plugins tend to include their JS on all admin pages, resulting in the theme’s admin panel (or other plugins’ admin panels) behaving incorrectly.

In addition there are a handful of other changes, including a new default theme, Twenty Eleven. Do feel free to give the beta a shot on your test sites.

A word about version 3.7.9 of Suffusion: I was on vacation last week, so I couldn’t do much. After my return I have closed the loop on some functionality that I was designing. I should have a version out hopefully by the end of this month.

Apr 272011

It has been almost 2 months since version 3.7.8, so I believe an update is due.

I have been working on and off on building version 3.7.9 and I have so far made a bunch of changes already. The last few remain, but as it is said, the last 385 yards in a marathon are the toughest. Here is what I have completed so far, a lot of which was promised and a lot of which was reactionary:

  1. Photo-blogging support
    1. Flickr support: Almost done. I just need to support pagination of photos
    2. Picasaweb support: Almost done, though this is decidedly less powerful than Flickr. The reason has more to do with the shortcomings of the Picasaweb API
    3. Native galleries: This is actually the backbone of my gallery implementation (including both the above). What I have done is that I have overridden the native gallery shortcode of WordPress to make it ultra-powerful. Here is what it can do:
      1. You can pass certain parameters to the native gallery shortcode of WP, like type=’flickr’ and display a Flickr gallery. Current supported parameters for this are “default”, “flickr” and “picasa”. This part is done, and I can reliably retrieve galleries from each of these sources. In case of Flickr things are very advanced: you can get photo-sets, collections, galleries, searched photos etc – it all works.
      2. Once a gallery is retrieved there are different ways to display it. You can show the thumbnails for the gallery, then have the image displayed above or below the thumbnails. Alternatively you don’t have to display the full image in the page. Instead you can launch a slideshow overlaying the page using Fancybox, Slimbox2 or Colorbox. This has been implemented for native galleries, but the integration with Flickr and Picasaweb is underway.
    4. YAPB support: Some work remains, though the basics are in place.
    5. Support for miscellaneous types: Done.
    6. Mosaic Layout: This is complete.
  2. Magazine Template Enhancements
    The magazine template was in dire need of a facelift in quite a few departments. I have addressed some of them:
    1. Byline information can be displayed on both, the magazine template as well as the tile layout. I had to think outside the box to come up with a way to do this, which took time.
    2. I am making some enhancements to the featured content in terms of positioning the pager, the previous and next controls etc. This is still underway.
    3. I have enhanced the Category Post widget and the static Category Post feature in the magazine template. You can now make it show a thumbnail for the post along with a brief excerpt.
  3. Other enhancements (all complete)
    1. The Twitter widget is now much better looking and it can display avatars. I have built it intelligently enough so that in case of re-tweets you get to see the original user’s avatar.
    2. You can now use post formats much better. Post formats refer to the long list that you see on the right of your Edit Post screen. It has things like “Standard”, “Aside” etc. Suffusion intelligently removes things like post titles from some of these formats (like asides and quotes). Of course, this is configurable. Also you can display bylines differently for different post formats.
    3. You can now control things like the number of sidebars in individual posts.

The release should take a few more weeks to wrap up. Though the list of activities is quite big, the changes are of a much lower impact than it would appear. Hence I am not foreseeing any major issues with the release.

Apr 272011

This should have been done a long time ago, but a lot of extenuating factors have been at play here. The following translations have been added/updated:

  1. New
    1. Japanese, thanks to Trippyboy.
    2. Czech, thanks to Ivojan.
  2. Updated
    1. Spanish, thanks to Memoria De Una Desmemoriada
    2. Simplified Chinese, thanks to Wang Feng
    3. Traditional Chinese, thanks to Yilin
    4. Brazilian Portuguese, thanks to Luigi Rotelli.
    5. Italian, thanks to Giuseppe Lodi Rizzini.
    6. German du and sie, thanks to Connie Müller-Gödecke.

As always, the details about translation can be found on the official translations page.

Mar 222011

Pontification, philosophizing and detours are normally left for my personal blog, however let me do a bit of it all here.

My favourite sport by a distance is Cricket. Like every other sport cricket defines its own set of landmarks that players can get to. For the uninitiated the two main categories in which you achieve landmarks are batting and bowling (think batters and pitchers in baseball). And certain landmarks are the benchmarks of great players. For example, you can score centuries in matches by batting and making 100 runs or more (I won’t go into the technicalities for the sake of brevity).

My favourite player Sachin Tendulkar holds the records for the highest number of centuries in the 2 major forms of cricket – the 5-day variant (Test cricket) and the 1-day variant (One-Day Internationals). He also holds the records for the maximum number of runs scored in each of these forms. Another great player of this era, Jacques Kallis was often criticized, though, for not having scored a single double-century (200 runs or more) in Tests. It was so because a test double-century is the basic adornment in the repertoire of any great cricketer. Tendulkar has a handful (including the only double-century in men’s ODIs) and Brian Lara has a good few (he also has a triple-century and the only quadruple-century in Tests), so Kallis’ achievements looked rather empty without one. Then, in the recently concluded Test series between South Africa and India Kallis did manage to get his elusive double, thereby confirming his place in the pantheon of greats.

The reason for this diversionary discourse was to tell all of you that today Suffusion became only the third theme distributed through to reach the milestone of 200 ratings. The two themes to have achieved more, albeit in much longer life spans are Atahualpa and INove. As I have mentioned earlier, for the free code and support that I offer, this is quite simply the greatest reward I can get from you. So a big THANK YOU goes out to all of you!!

As is customary, at each milestone I chart the course for the next few months, so let me do the same here:

  1. Most changes from this point on are going to be evolutionary as opposed to revolutionary. In this context the fiascos of 3.6.8 and 3.7.5/3.7.7 were necessary though not necessarily inevitable. From this point on I will not release anything so big that it changes the entire architecture of the theme. The changes in 3.7.5/3.7.7 had to be made, otherwise I would have even bigger hurdles to cross with every new release of WP and increasingly restrictive theme approval guidelines.
  2. The photo-blogging layout is coming soon! I will probably keep the functionality good, but not ultra-rich in the first release. It will be good enough for things like Flickr and Picasa integration though, which very few themes or plugins do a good job of apparently. I will soon post a sample of what I have been working on for you to try out. I will also give the magazine layout a shot in the arm.
  3. I have been working on a few theme skins. While I am by no means an avant-garde designer, I don’t consider myself aesthetically challenged and I do manage a decent job with Photoshop when aided by tutorials. However the demands and challenges of a complex theme leave little in stock for me to devote to Photoshop. As a result I have sacrificed beauty for functionality quite heavily. But not any more. With photo-blogging out of the gates I will be able to pay a little more attention to how Suffusion looks. So expect a few nicer skins.
  4. The last focus area for Suffusion is some revolutionary sidebars. As alluded to earlier, I have some outrageous ideas for what can be done with sidebars and I definitely intend to deliver on those.
  5. Wrap up. Yup – as I mentioned a couple of posts back, having done the activities listed above I will have wrapped up all major development on Suffusion. Subsequent releases will only patch bugs and make minor improvements in terms of support for newer versions of WP.

Have fun!

Mar 142011

In recent times the Suffusion forum, which is driven by phpBB, had been plagued with hordes of spammers. I initially thought people came, spammed, then left. But then I was alerted by a user that the spammers had infested the boards by creating lots and lots of dummy logins, and in effect my Captcha was broken. I had earlier switched from GD Image Captcha to a Simple Captcha, because sometimes GD Image Captcha was too tough to figure out for humans as well. The result was that OCR (Optical Character Recognition) was easier to carry out for Simple Captcha, and everyday there were hundreds of spammers thronging the boards.

The net result was that I had to spend almost three hours cleaning up the user database. I brought down the total number of users from 7800+ to just around 2200+. In this process I am sure I have deleted a few legitimate users, because I used the criterion “0 posts” for most of my cleanup. I know that some of you have sent me PMs but haven’t posted on the forum. If that has been the case, then your account too would have been deleted. If so, please go ahead and re-create your account. I have changed the Captcha to be of a “Q&A” form, so this should keep out Spambots. Let’s see how it goes. Spam has been one of the reasons I have thought very seriously of building a Bug Tracker kind of add-on for Suffusion (using Custom Post Types), but that is something that needs lot of time and devotion.

Mar 072011

And so I have finally decided to take the plunge. Actually it was more of a push rather than a voluntary plunge, when my brother asked me to take a look at his photo blog and help him fix a plugin that he wanted to use. That is when I realized that building photo blogging functionality is not as difficult as it seems, because Suffusion already has a lot of the pieces in place. And in minutes I had built a “Mosaic layout”, just like the Excerpts, Tiles and List layouts.

I have been looking around a bit and I figured this would be a good starting set to provide for basic photo-blogging. Feel free to pitch in with your suggestions:

  1. Support for YAPB:
    Johannes Jarolim’s plugin is by far the most popular photo-blogging solution, hence this becomes a shoe-in for photo-blogging support.
  2. Other types of images:
    Let’s face it – the last time YAPB got an update was in December 2009, more than a year back. If you were to switch on WP_DEBUG on your site you would get catastrophic failures with YAPB (so would you with a lot of plugins, but that is besides the point). Since then WP has evolved significantly and so has our thinking of how to deal with images and other content. So additionally, the following types of images should also be handled in photo-blogs:
    1. Embedded URLs: The oldest way to embed an image in any HTML content – WP or otherwise. Suffusion does detect embedded URLs for the purpose of thumbnail generation, so if your post simply has an image URL, it will be picked up for display.
    2. Attachments: The oldest way to associate an image with a post in WP, this is also the way to build a gallery within your post.
    3. WP 3.0 Featured Images: This really elevates one image to a featured status in your post, so if you have a blog where you have a featured image associated with a post, that image will be the key image in your post.
    4. Image Custom Post Format: This is the new kid on the block. WP 3.1 introduced something called “Custom Post Formats”, which you might have seen in your admin panels as something that shows up on the right side of your post when you are editing one. Currently Suffusion just lists the post formats, but does nothing special with them. I am planning to dovetail support for the Image and Gallery Custom Post Formats with the photo-blogging features.

    All the above (except the custom post format) has existed in Suffusion for about a year now. The point of listing it here is to tell you that if you have a blog that follows one of the above patterns and you are looking to make it look like a photo-blog, Suffusion will have you covered.

  3. New Widgets:
    I have already finished developing a widget for Flickr. One more for Picasa is on its way. You will be able to either display a Flickr photo stream or a Picasa web album in these widgets.
  4. New Short Codes:
    Along with the Flickr widget I also built a Flickr short code which you will be able to insert into your post to display a Flickr photo stream. A similar one will be built for Picasa.
  5. New Mosaic Layout:
    This is where the image types in point #2 come in handy. Strictly speaking, though, this is just a listing of one thumbnail per post for each post in a category / tag / date archive etc, very similar to the tiled layout. The only difference is that you don’t see the excerpt – just the thumbnail is shown and you get a very minimalist design. One thing to note here is that whatever be the kind of image you have have in your post (YAPB or anything listed in point #2), it will be displayed in the thumbnail.
  6. EXIF display:
    I already have code for this, which you can use if you are looking at an image attachment.
  7. Multiple Sizes:
    Justin Tadlock provided a rather simple way to display all sizes an image is available in. I have already adapted that for Suffusion, so in the photo-blogging release you should be able to see all the sizes for a given image.
  8. Navigation:
    This is one area where I am undecided. Suffusion comes with a capability to navigate to the previous and next post, but users of photo-blogs like to show arrows on/beside their images for navigation. Here are some general thoughts (most of them contributed by my brother):
    1. Overlaid arrows are a bad idea because of touch devices (where you cannot hover).
    2. Pressing the keys for the right and left arrows should help you navigate right and left. These can be mapped to swipes on touch-screen phones.
    3. Of course, I could display arrows on either side of the image – that would do as well.
  9. Galleries:
    This is another area where I don’t really know what to do. For sure, you will be able to view multiple galleries in a post, but what are good things to add here?
    1. One thumbnail for the gallery, which can be clicked to launch a slideshow?
    2. All galleries listed out with their thumbnails? Mind you, the Flickr short code (and soon the Picasa short code) will do this.
    3. Lightbox/Thickbox/Fancybox integration? Note that you cannot really bundle a Flickr/Picasa gallery with any of these scripts, because of the Terms of Use of Flickr/Picasa. Also, I am not really decided on which one I will offer. Though I like Lightbox that needs, and since Suffusion already loads JQuery, it would be a drag to load another JS library, not to mention opening Pandora’s box in terms of compatibility issues. I would have gone for Thickbox, but that seems a bit slow. For now I am leaning towards Fancybox, though I am undecided.

So that’s that. Do feel free to provide your suggestions here. Also let me know of things such as:

  1. Do you want to have the post title displayed in the photo posts?
  2. Do you want to have the post title displayed in gallery posts?
  3. Do you want me to investigate / look at any specific layout?
  4. What kind of information would you like to see upon hovering on the thumbnails in the mosaic layout? Would the post title suffice?

I guess I have mentioned this before: photo-blogging is essentially the next major chapter in the development of Suffusion, and I believe with a little bit of polish this theme can then be called premium-ready (no, I am not going to make it a paid theme – that has never been my intention). After that I will have no major updates and will focus on a few decent skins. And then Suffusion can be called a closed chapter :-).

Mar 032011
How To

The much maligned 3.7.7 release had some rather bright spots that got buried under the chaos of bugs. And judging by the support requests and false positives reported as bugs on the forum, I believe one of these features needs some elucidation.

How Many Sidebars?

One question I have had to fend with previous releases goes along these lines:

I want to have 2 sidebars on my front page, which is a Blog page, and no sidebars for the individual posts themselves.

The typical response to this used to be:

  1. Create a new static page.
  2. Assign it a template like Single Left, Single Right Sidebar from the right side of your Add Page or Edit Page screen.
  3. Go to Settings → Reading, and set the page you just created as the Home Page.

The above approach has limitations. The key shortcoming is that this way you can only create a static home page – not a dynamic page of posts.

So I introduced a way to get around this.

If you go to Sidebar Configuration → Sidebar Layout, you will see a section titled How Many Sidebars. This is your entry point to configuring this. What this lets you do is assign one layout by default to individual posts and pages, and force a dynamic view to adopt another layout.

Use Case: 2 Sidebars on the Blog Page, 1 on Category Views, 0 on Single Posts

To set this up, define the following options:

  1. Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Default Views:
    Set this to 0.
  2. Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Blog Page:
    Set this to Double Left – Will inherit settings of the "Double Left Sidebars" template, or whichever configuration you want to use.
  3. Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Category Views:
    Set this to Single Left – Will inherit settings of the "Single Left Sidebar" template, or whichever configuration you want to use.
  4. Other Graphical Elements → Sizes and Margins:
    Set your widths for the content appropriately in this section. This will be used by your posts by default.
  5. Templates → Double Left Sidebars:
    (Or whichever configuration you picked in #2 above)
    Set your widths and dimensions appropriately. These will be used by your Blog Page now.
  6. Templates → Single Left Sidebar:
    (Or whichever configuration you picked in #3 above)
    Set your widths and dimensions appropriately. These will be used by your Category Views now.

That’s it. Your site will now show 0 sidebars for posts, but 2 for your Blog Page and 1 for your Categories.


What I have seen happen on the Support Forum is that users tend to do this:

  1. Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Default Views: Set to 2.
  2. Sidebar Configuration → Sidebar Layout → How Many Sidebars? → Blog Page: Set to Double Left – Will inherit settings of the "Double Left Sidebars" template.

At this point if you set the Sizes and Margins in Other Graphical Elements → Sizes and Margins, they will not affect your main page, because it has been configured to use the Double Left Sidebars template in the second step above. Instead, all you need to do is set the Blog Page to Inherit default number of sidebars. That way you will have consistency.

Another related misconception I have seen is more fundamental – users tend to explicitly assign a template to every view (such as categories, date archives etc) and then wonder what they should do for views that are not available (like something introduced by a plugin). This is a case of over-complicating the problem. If you have established a specific layout to your default view (like 1 sidebar, with the first sidebar positioned left), you must not assign the “Single Left Sidebar” to individual templates – that is pointless unless you want different column widths. Instead let everything inherit the default layout. Conversely if you want a single left sidebar layout for every link in your site, simply set the default view to have 1 sidebar with the first sidebar positioned left. Don’t worry about assigning templates to everything else because they will all use the default layout.

Feb 282011

I have had bugs in software before, but by any standards version 3.7.7 was awful. Just awful. As the saying goes, The road to hell is paved with good intentions. In Beta 2 I tried to put in a tweak related to Suhosin, so I split the options into multiple forms and thought I got it working. The Beta came and went by without alarms, so I submitted the code for approval, and then it proverbially hit the fan. Truth be told I was expecting issues with the TimThumb replacement, and there were a few. But I seriously blew it with regards to the option management, costing people hours of work. Not all people faced issues, mind you – particularly several people who simply upgraded their sites and left it at that. People who are subscribed to my feed knew how to downgrade the release, so that alleviated some concerns. People who had little image jiggery-pokery on their sites (like me) faced literally no issues, because they didn’t have to tweak anything.

But for all the rest, all I can offer you is an apology, and what I hope is a clean version – 3.7.8. If you have bought me a coffee and then realized it was not worth it due to this release, please send me an email through the support forum with a transaction id – I will issue an unconditional refund.

Here is what I have covered in 3.7.8:

  1. Thumbnail issues
    1. If images were not in the template path but in the local directory they were not being picked up and a warning message was being displayed. Thanks a lot to Bob Schecter for an impressive array of websites with a wide range of configurations, which he let me use so that I could track this down.
    2. If the image source was a secure HTTP location (HTTPS, like PicasaWeb), the image was not getting resized. This should be fine now. Thanks to Jürgen for the tip.
  2. Color issues
    1. The first issue was with the color picker. Thanks to various quirks in the use of Farbtastic, I rolled back to something that has been a part of Suffusion since release 2.0 – JSColor. If you now pick a color and save, the change will go through without you having to go through an elaborate charade.
    2. Colors were inconsistently getting prefixed with a “#”. I have made sure that this is no longer the case. Thanks to Kattsby for the tip regarding this.
  3. Option issues
    1. The biggest issue in the previous release was that the buttons to save/reset options had gone rogue and a lot of people have pointed this out. I have made sure of the following:
      1. Clicking “Save” in one screen will not blank out options in another screen.
      2. Clicking “Reset” will not empty the entire theme’s options.
      3. Exporting / Importing will now work.
    2. Another rather intermittent issue was the interference caused by a cookie used by the options panel while attempting to save things. I am only aware of 2 people facing this issue, mind you, and one of them (Mason) has confirmed that this has now been fixed.
    3. A minor issue was that if your options were saved, they needed to be saved twice for the auto-linked CSS to be updated.
    4. Quote characters around font names were being escaped, preventing the font from being loaded.
    5. Some people complained about a slowdown on IE. To counter this, I got rid of the JQuery Uniform script that I was using to make the admin panel look good. I will reconsider this once the changes introduced in this version stabilize.
  4. Miscellaneous issues
    1. There was a bug that was breaking the layout of the Widget Area Above Footer.
    2. There were some issues with the navigation menu’s appearance in the standard skins, particularly with respect to visited items and hover-over items.

Things that are not issues

When something goes wrong, the natural inclination is to assign to it all faults, real and perceived. Something similar happened with the last releases, and because the core faults with Suffusion were so severe, a lot of issues from other places were ascribed to the theme. Not that I blame any of you for it. The following are NOT issues with Suffusion:

  1. If your admin panel stops loading after printing the top bar, the culprit is, in all likelihood a plugin. There is a lot of literature around this on the web, but it bears repeating, particularly because Suffusion’s options panel is more complex and detailed than most other themes’ panels, and having an incorrect script interfering can really mess things up.

    A lot of people upgraded to WP 3.1 and Suffusion 3.7.7 at the same time. Now, WP 3.1 uses a new version of JQuery libraries. Some plugins and themes don’t include JQuery the right way. The somewhat correct way to include JS in WordPress is by using the wp_enqueue_script function. The truly correct way to include JS is to use wp_enqueue_script with the right hooks. Here is what I mean:

    1. The absolutely wrong way:

      function print_my_script() {
      	echo "<link media='all' href='' type='text/css' rel='stylesheet' />"; 

      The problem is that the above will load JQuery potentially twice. Plus you might be loading JQuery after something needs it, thereby resulting in errors. The only situation when this might be required is if you need conditional JavaScript (like something for IE), which is not the case in the above.

    2. The sometimes correct way:
      add_action('init', 'my_enqueue_scripts');
      function my_enqueue_scripts() {
          wp_deregister_script( 'jquery' ); // Will remove WP's standard JQuery
          wp_register_script( 'jquery', ''); // Will register Google CDN's JQuery, version 1.5
          wp_enqueue_script( 'jquery' );// Will queue it up for printing.

      The trouble with the above is that the script is going to get enqueued for all pages, admin or otherwise.

    3. The almost correct way:
      add_action('admin_menu', 'my_plugin_menu');
      function my_plugin_menu() {
      	add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
      	add_action("admin_print_scripts", 'my_admin_script_loader');
      function my_admin_script_loader() {
          wp_deregister_script( 'jquery' ); // Will remove WP's standard JQuery
          wp_register_script( 'jquery', ''); // Will register Google CDN's JQuery, version 1.5
          wp_enqueue_script( 'jquery' );// Will queue it up for printing.

      The only problem with the above is that it will queue up the CDN JQuery for all admin pages. What if another plugin is relying on a different version of JQuery? A lot of developers get this one wrong.

    4. The truly correct way:
      add_action('admin_menu', 'my_plugin_menu');
      function my_plugin_menu() {
      	$options_manager = add_options_page('My Plugin Options', 'My Plugin', 'manage_options', 'my-unique-identifier', 'my_plugin_options');
      	add_action("admin_print_scripts-$options_manager", 'my_admin_script_loader');
      function my_admin_script_loader() {
          wp_deregister_script( 'jquery' ); // Will remove WP's standard JQuery
          wp_register_script( 'jquery', ''); // Will register Google CDN's JQuery, version 1.5
          wp_enqueue_script( 'jquery' );// Will queue it up for printing.

      If you notice, the only difference with #c is the way the admin_print_scripts hook is used. By appending the options page to it, we are saying that the JQuery script should be used only for this particular plugin’s admin screens.

    What has been happening is that a few plugins have followed route b or c above, causing a proliferation of bad JavaScript across the admin pages. With the WP upgrade these plugins now have conflicting JS. This unfortunately causes the correctly coded themes/plugins to break because they rely on the native version of JQuery, which the bad plugin has overwritten on all pages. If you are facing this, you should try deactivating your plugins, then reactivate them one by one to see which one is wrong. If you isolate the broken one, feel free to point the above instructions to the author.

  2. Header height and margin between top of content and top of page: If you had set your options to show a certain header height and margin, please note that the option has moved from Blog Features → Sizes and Margins to Theme Skinning → Header. What has happened as a part of this move is that the control switch has changed. So under Theme Skinning → Header you have to set the options to use “Custom Styles” for the setting to continue to be effective.

Thanks for all of you who had patience with me during the last one week. Thanks are also in order to all of you who provided detailed reports of the issues that you faced. I wish some of you had participated in the beta testing. Apologies if you don’t see your name above – it is just that there were so many people reporting the issues that I couldn’t fit everyone in here.

Feb 222011

Version 3.7.7 was released earlier today. This release mostly has bug fixes for 3.7.5. The following are the changes:

  1. I have included a workaround for a rather weird critical bug affecting some installations. The symptoms of the bug are that the header in the options page loads up, then nothing happens. I tracked it down to a bug due to those installations failing to load the jquery.cookie.js file. What makes this bug weird is that the file is there, yet accessing it returns a 404 error. What makes the bug (and the fix) weirder is that if I yank that file and put its contents in another place, the bug resolves itself.
  2. There was a bug that wasn’t updating the options CSS if you had set it to be auto-generated. This has been addressed.
  3. Resized images were not being generated in the default settings. If, however, you saved options on, say, the Featured Content page, the images would show up fine. I have fixed this issue.
  4. I have added basic post-format support without any special treatment, so as to be ready for WP 3.1. Further handling of post formats will be done in subsequent releases.
  5. Another fix is for folks on PHP 4.x. There was a call to a feature (instanceof) that came up in PHP 5, so people on PHP 4 were getting a critical error.

Hope this takes care of the issues with 3.7.5.

Feb 212011

Version 3.7.5 was approved earlier today. I know that the beta releases were for 3.7.4, however 3.7.4 didn’t pass the approvals required by the Review Team, so I had to release 3.7.5. This is quite a big release with lots of changes. However, unlike other big releases this has more to do with code housekeeping rather than brand new functionality. Before you read further, here is a warning:

This release changes the whole look of the code behind the scenes. It has been beta-tested, but bugs always come up. In case this release critically breaks some functionality, please downgrade to the previous version and log a bug on the support forum. You can download the old version, then replace the contents of your wp-content/themes/suffusion folder with the unzipped suffusion folder that you get from the downloaded file.

Without much ado, here is the change list:

  1. Code Housekeeping
    1. Switch to native WordPress APIs
      I have removed a lot of custom or third party code from a lot of areas and started using native WordPress areas. Here are the changes:
      1. Settings API
        One of the 2 biggest changes this release is a nice looking backend. For this I moved to the Settings API that WordPress provides. This was a huge and high impact change, because I had to decommission a tried and tested options engine in favour of something that has not been implemented by anyone on such a large scale. All uses of the Settings API on the web are for simple cases where you require only one options page. Anything more complex makes developers pick up a custom approach, or an approach that only superficially uses the Settings API.
        I can thump my chest here as the first theme with such a complex back-end to utilize the Settings API in all its glory. The only place where the API is not used is in the Custom Types section, which only partly uses the API. I will port it over in a subsequent release – for now it is not critical.

      2. No TimThumb
        This is the second big change, and potentially more high impact than the first. TimThumb, though popular has some security holes, particularly with its old versions. Recently the WP review team started cracking down on themes relying solely on TimThumb. I introduced TimThumb into the mix more than a year back, but I had also introduced support for the native post thumbnail functionality of WP almost as soon as it was introduced. This helped me avoid the axe. With this release Suffusion bids adieu to TimThumb.
        I have put together a resizing algorithm based on a method suggested by a contributor on WordPress Trac. I had to modify it a good bit to make it work the way I wanted and so that it did not break how your existing images looked.

      3. No “file open” operations
        Again, the WP review team has been cracking its whip to get file open operations removed. As a result I have had to think out of the box to make code behave to my liking. I have had to replace inbuilt CURL calls with the WP HTTP API, and where this really posed a challenge was regarding storing of the generated CSS and storing the resized file for the image resizing.

    2. Use of more modern functions
      A few functions have been deprecated by the WP development team. I have replaced all such functions with their new variants:
      1. get_bloginfo('wpurl')site_url()
      2. get_bloginfo('template_url')get_template_directory_uri()
      3. get_bloginfo('url'), bloginfo('url')get_template_directory_uri() 

    3. Removal of backwards compatibility
      As stated in a previous post, WordPress 3.0 has been out for more than 8 months now and version 3.1 is almost upon us. So if you haven’t upgraded your WP installation now is the time to do it. This latest release of Suffusion will not work on anything older than 2.9. I have removed function/class existence checks for all these versions:

      1. 3.0.x – get_template_part, comment_form, wp_nav_menu, wp_login_form, get_nav_menu_locations, wp_get_nav_menus, register_post_type, register_taxonomy, post_type_exists and register_nav_menu
      2. 2.9.x – add_theme_support, get_the_post_thumbnail
      3. 2.8.x – class WP_Widget
    4. Function names are now more consistent. All functions within Suffusion are either prefixed with suffusion or suf.
  2. Feature Changes
    1. Reorganized the Options Menu (again)
      Trust me – I did not want to do this. Suffusion started out with one link under the Appearance section of the admin page. I then pulled it out to give Suffusion its own menu when I introduced Custom Post Type support. I initially had horizontal tabs at the top and vertical tabs within each page, but I switched it out when the page got sluggish.
      This change consumed a lot of my development time in what was already an intensive exercise. But I believe I got it right this time:
      1. New Menu Position (aka Older Menu Position)
      2. New Tab Design
      3. Moved items
        There has been some upheaval in the options sections. Notably:
        1. Introduction – This is the same as the Introduction section of the old options
        2. Theme Skinning – Earlier you had a tab called Theme Skinning under Visual Effects. Theme Skinning is now a section of its own and deals almost explicitly with setting up the colors of various components (aka “skinning”). All former individual sub-sections under the old Theme Skinning are now tabs under the new Theme Skinning. For example you have Body Background, Main Wrapper etc.
          The main purpose of this split was to avoid Suhosin-related issues. You can click on the “Notes” button near the section title as shown above for more information.
        3. Visual Effects Other Graphical Elements – This has mostly the remainder of the items of the former Visual Effects section. In addition it has picked up items from the former Blog Features that dealt with graphical aspects, like Featured Content, Post and Page Bylines, layout options etc. You can click on the “Notes” button near the section title as shown above for more information.
        4. Sidebars and Widgets Sidebar Configuration – This is the same as the former Sidebars and Widgets section, except for the fact that the Static Tabbed Sidebar has been moved from the former Blog Features page to here.
        5. Blog Features Back-end Settings – This is a heavily stripped down version of the former Blog Features. Most of the older options have moved to Other Graphical Elements. You can click on the “Notes” button near the section title as shown above for more information.
        6. Templates – This is the same as the old versions.
        7. Custom Types – This is the same as the old versions.
    2. No Translations
      Translations are no longer a part of the core theme. They have all been moved to the translations page. Additionally, at no impact to you the translation text domain has changed from “suf_theme” to “suffusion”.
    3. Changes to Default Settings
      Some changes were required to the default settings to make it pass the review process, and some others were needed for ease of use.
      1. JQuery Masonry is switched off by default instead of being switched on.
      2. By default both navigation menus are switched off. This was one change I did not want to make, however I did so to avoid a lengthy back and forth exchange.
    4. Made the blog title use h1/h2 tags instead of div tags.
    5. I have renamed the classes category-info and tag-info to info-category and info-tag respectively. This is to avoid weird styling issues if you have a category or a tag named info. Please make note of this if you have used Custom Styles for these elements.
    6. Goodbye Marvin!
      For those familiar with lore, Marvin the Paranoid Android used to reassure you not to panic. Unfortunately, since the photo of Marvin was not GPL’ed, I had to remove him from the introductory screen (though I had provided the appropriate credits to Buena Vista).
  3. New Features
    1. Sidebar Control
      There is a new capability to control the number of sidebars on different views like the blog, category, tag, date archive and search. For example you can now have 2 sidebars across your site, but only one sidebar on the blog page. Check the settings under Sidebar Configuration → Sidebar Layout. All in all the ability to manage sidebars for specific pages/views has improved from previous versions, and in the next release or two you should have something very flexible. I might write up an article on how to effectively tweak sidebars shortly – let’s see.
    2. You can now upload an image directly from the options pages instead of entering a URL. Of course, entering a URL works too.
    3. New Notifiers
      Added the following notifiers:
      1. New versions – Tells you when a new version is available and points you to the release notes. The reason for this is that some people complained about frequent updates (though old-timers will note that I have significantly slowed down) – this is for them to check out what the latest version has, so that they can make an informed decision about upgrading.
      2. Translations – If you are using WP in a language other than Americanized English, you are pointed to the right locations to pick up the correct translations.
      3. BuddyPress – If you are using BP, this provides you information about making Suffusion work with it.
    4. Added options to control the “Posted By” format. See Other Graphical Elements → Post and Page Bylines for more information.
    5. Added better WPML integration. There are texts that you set in the back-end, like the labels for your comment forms etc. I have added WPML support for them, so that you can translate those strings in the back-end.
    6. Added zoom-crop capability (aka proportional resizing) for images in featured content, magazine headlines and magazine excerpts. See the respective sections for setup options.
    7. There is dual JQuery UI support, for version 1.7.3 (WP 3.0.x) and 1.8.7 (WP 3.1.x).
    8. You can now control the number of headlines you want to display in the headlines section of the Magazine template.
    9. There are a couple of new filters: suffusion_author_information and suffusion_category_information. They can be used by you to tweak the information that appears at the top of the Author page and the Category pages.
    10. There is a new option to force compatibility mode in IE8. You will find the option in Back-end Settings → SEO / Meta Settings.
    11. There are a couple of options more dealing with the generated CSS. You can choose to cache the generated CSS, include it directly in the HTML, include it via a link etc.
  4. Bug Fixes
    1. There was a bug earlier that was causing the title set through Suffusion’s SEO to clash with the title set by different SEO plugins. This should now be fine.
    2. In the Magazine template if you were displaying headlines, the first headline was not being selected by default. This has now been fixed.
    3. The $post variable was getting overwritten if the Ad Hoc Widgets were used to display things like featured posts or category blocks.
    4. I have fixed a bug where if you looked at a page in BP you would see an incorrect HTML title.
    5. I have included what is hopefully a patch for a WP problem (not a Suffusion problem) affecting a very small percentage of users. With the bug kicking in, users were unable to reliably see the child pages for a given page in the breadcrumb because WP fails to provide the ancestry relationships properly.
    6. I have also included a patch for a NEXTGen Gallery bug. I have often expressed my dislike for this plugin thanks to a variety of reasons. In this case including the fix at my end seems to be a much easier thing to do than wait for the NGG guys to put it in. The fix deals with viewing NGG, when used with themes employing max-width and min-width on IE8 without compatibility mode.
  5. Removed Options
    I have decided that I will periodically do a review of redundant options in the theme and cull them. Options that have much better plugin-based alternatives and options that have significant maintenance overhead will be removed.
    1. Compression options for JS, CSS and the site as a whole have been removed. Sorry, but those serve very limited functionality and are incapable of generating compressed content for files from external plugins. If you are looking to do any of these, you can try using W3 Total Cache or some similar plugin. The only compression-specific option introduced is to minify the generated CSS into 1 line, so that you don’t add hundreds of lines into your source code – just one long line will be present.
    2. Removed the option to load JQuery via CDN. This was becoming extremely ungainly. If you want to use CDN versions, please use a plugin.

I do understand that this is a pretty big release. So if you have upgraded and something has broken badly, please do not hesitate to downgrade (and report the problem on the Support Forum). This isn’t meant to alarm you, for most code-related issues can be fixed and I have taken a lot of care to keep the code good. This is just to assuage your concerns that if something goes wrong, it makes best sense to follow the advice on the introductory page of the options: Don’t Panic.