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='http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js' 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', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'); // 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', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'); // 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', 'http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js'); // 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.

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.

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 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 072010

After what seems like ages, here is a new version of Suffusion. As already mentioned, this has been a very very code-intensive release because of the nature of the changes.

These are the main changes in this release:

  1. New Features
    The following were added in this release:
    1. Fluid Width – By far the biggest change in Suffusion since the inclusion of options in the very second release. This change required me to overhaul the HTML structure of the theme and always put the content before the sidebars, then do massive amounts of testing. While I put in every bit of effort required to get this working as per expectations, if you find something that is not working as you expect, please let me know. I will be very happy to fix it.
    2. Improved Menus – In any other release this would have been the prima donna. But as it stands, this has been relegated to second position. Now you have even better control of your navigation menus, in terms of the number of options you can pick from:
      1. Include all, ignoring next option
      2. Include selections from the next option
      3. Exclude all, ignoring next option (New)
      4. Exclude selections from the next option (New)

      The new options can be better understood in context of some major code reengineering. Earlier I had a very comprehensive menu-building code, that worked very intuitively. This behavior was different from WP’s default behavior. However the old code created an insane number of queries, particularly if your menu was big.
      In this release I have removed all my self-created code and resorted to using WP’s inbuilt functions – wp_list_pages, wp_list_categories, wp_list_bookmarks and wp_nav_menu. his significantly reduces the number of queries and the load on your server.
      As a tip, if you want to completely remove pages/categories/links from your menu, use the “Exclude all, ignoring next option” setting instead of “Include selections from the next option”. This is much more optimal in terms of code.

    3. You can now get rid of the HTML title that shows up when you hover over your navigation menu. Visit Blog Features → Main Navigation Bar Setup → “Title” attribute upon hovering over navigation bar.
    4. There was no styling available for the HTML elements legend and fieldset. CSS declarations have been added for them.
  2. Removed Features
    The following features have been removed:
    1. I have removed the “rolled-up” setting for WP 3.0 menus as it is redundant. If you want to create a rolled-up menu you can automatically create a base node in the menu and add the rest of your menu under it.
    2. I have also removed the option to not use body_class WP function to generate classes for your body. This removal was essential because the body_class function is essential to the style setup for the theme.
  3. Bug Fixes
    The following bugs were fixed:
    1. A fix has been included for a severe bug that was causing page templates to max out at a width of 600px. The bug was caused by incorrectly applying filters to the sidebars and templates.
    2. The following navigation menu-related bugs have been fixed:
      1. Selected navigation bar items (Pages, Categories and WP 3.0 menus) were not getting highlighted in the Minima skin.
      2. Selected navigation bar items for WP 3.0 menus were not getting highlighted across any skin.
      3. The values set for highlighting in Visual Effects → Theme Skinning were not being accurately reflected.
    3. The following BuddyPress-related bugs have been fixed:
      1. In various BP screens, if something was selected from a drop-down list (like filters, or sort criteria), nothing was happening. The correct AJAX calls for this have been included.
      2. The Create Profile and Edit Profile pages in BP were not rendering properly. This has been fixed.
      3. Messages in the inbox etc. were not being styled properly. This has been addressed.
    4. There was a bug in the List Layout style, which was offsetting the posts by 1 if all posts were not being displayed. In other words, the top post was not being displayed, and if there were  N+1 posts in all and each page was to display N posts, the second page was showing an error. This has been rectified.
    5. Links in featured content were not getting the right color. Again, this has been fixed.
    6. There was an error in the charset syntax in header.php, style.php and rounded-corners.php. This wasn’t impacting anything as such, but it has been rectified nonetheless.
    7. In the options pages if you put in 0 as a value for some dimensions it wasn’t being read correctly. I have changed the code to handle this.
  4. Changes
    1. The comments section has been revamped to look better and to facilitate better styling. There is now a custom callback function invoked from there.
    2. As per the theme review guidelines I had to change the credit link at the bottom. It now just links to the Suffusion home page and not my home page.
    3. Somewhat whimsically I have changed the default font from Arial to Trebuchet. You can however switch back to Trebuchet if you want, from the Visual Effects → Body Font Customization options.
    4. You now will not see any version tag appended to JS files included by the theme.
    5. The Spanish and French translations have been updated. Thanks to David for his modifications of the French translation!

I will soon update the Suffusion BP Pack so that you can make use of the new changes to the core theme. I will keep you posted.

Sep 102010

Version 3.6.6 of Suffusion was approved today. Here are the major changes in this version:

  1. New Features
    1. Finally a very frequently demanded feature has made its way into the theme. Visit Visual Effects → Theme Skinning. Guess what? You can now skin the Navigation Bars! The navigation bars are way too complex to handle purely by CSS, hence there is a small chance I might have missed something. If so, please report it on the Support Forum.
    2. A few new filters have been added. See point #3 in the previous post: there are new filters for suffusion_filter_template_prefixes and suffusion_filter_template_sidebars. In addition there is a new filter for suffusion_set_title. This will help you control the title on specific pages of your site. For example look at my personal site. The page title is “Eloi and Morlocks” for most pages, yet the home page says “Sayontan Sinha’s home page”.
    3. There is a new template for building an HTML sitemap of your site. There are a lot of configuration options available, which you can check out from Templates → Sitemap.
    4. You can now change the order of entities on your Magazine template. Take a look at Templates → Magazine to see how. I will introduce an ability to order things within excerpts etc in a later release.
    5. You can also position the footer better now – either inside the wrapper or outside. See Visual Effects → Footer Customization for options.
    6. The “Author Information” section (Blog Features → User Profiles) was either visible for both, pages and posts, or invisible for both. I have added the capability to show it for either pages or for posts.
    7. I have also added extra security checks in the back-end by putting in check_admin_referer and check_ajax_referer calls to validate nonce values on options pages. This doesn’t impact users directly, but it adds an extra security layer.
    8. There is a new translation for Traditional Chinese (zh_TW). Thanks to Sh2153!
  2. Bug Fixes
    1. There was a problem with the auto-generated CSS file not being accessible in Multi-site installations or when zipping was switched off. I have fixed this.
    2. There was a problem with the “transparency” feature in Visual Effects → Theme Skinning. Earlier setting a transparency value would make all the included elements translucent. This was because I was using the CSS opacity attribute. I have switched the code to use RGBA instead of opacity and it at least works as expected for compliant browsers (Firefox, Chrome, Opera, Safari). I did try to fix it for IE using filters, but I couldn’t get it to work. I might introduce a hack for IE later. In any case, the functionality was broken in IE earlier as well, so you are not losing out on anything.
  3. Changes
    1. Users will probably love this. The buttons on the options page are not at the bottom any more! And they are not at the top either! After a good bit of thinking I figured out a really smart way to position the buttons in a place that was always accessible, and didn’t require me to change much code. I present to you the new-look buttons:


      You can drag the button window to any other place on your screen, and it always floats in position. So even if you scroll up or down you will see the buttons. I do plan to shorten the lengthy options pages in a release soon. It has been on my agenda for a while now.

    2. Given the number of widget areas and their customization options, I pulled up the Sidebars and Widget Areas option and the Widget Styles option and created a new main menu option called Sidebars and Widgets.
    3. The German translations have been updated for version 3.6.5.

Hope you enjoy this release.

Aug 302010

It has been brought to my attention that an old problem with corrupted download files from the WP site has cropped up again. If you are seeing a message saying that the “Theme is broken” or if you get a “white screen of death” upon activating the theme, follow the instructions here.

Version 3.6.5 of Suffusion went live today. Actually first 3.6.4 went live, then some users pointed out a rather serious flaw, then I immediately patched it. The theme approvers, who have really improved their approval process a few notches up approved it rather quickly too. The following are a part of this release:

  1. New Features:
    One of the key focus areas of this release was server load reduction. The overall list of additions is as follows:
    1. There is an option to not include the generated CSS code in your page header. Instead the CSS gets written to a file and that file is linked in the page. This is good news for SEO. The bad news is that it needs some tweaks and some trial and error to get to work properly, like changing of the .htaccess file, or making use of Suffusion’s internal compression techniques etc. You can try enabling the option from Blog Features → Site Optimization → Auto-generate CSS file for customization options.
    2. In addition now all the options can be cached in the database. Earlier I was storing only the saved options in the database and leaving aside the default options. The downside of the older approach was that as my options page got massive, the memory footprint of the front-end pages started increasing. This will reduce memory footprint by at least 2MB – a significant reduction. You can control the settings here: Blog Features → Site Optimization → Cache dynamic options.
    3. Judging by the massive outrage on the support forum due to a change in the featured content behavior, I have added an option to let you include duplicate content from the featured content section on your main page as well. Control the settings from Blog Features → Featured Content.
    4. I have added options to include posts by post id or by tag in the featured content. Control the settings from Blog Features → Featured Content.
    5. I have also enhanced the Search results page to show the search term at the top. Additionally now there is a search form included on the search results page, along with an ability to highlight the matches.
    6. A user on the WP forum pointed out that if your posts were in multiple pages (in an archive view), subsequent pages didn’t show the page number in the title. I have addressed this. The page number is now appended to the title if you are on the second page or higher. Additionally the blog sub-title is a part of the page title on the home page or on the front page.
    7. I have added “nonce” checks to the admin pages to ensure better security.
    8. There is a new Turkish translation, thanks to Metin Selçuk.
  2. Bug Fixes:
    1. If you were using Suffusion’s inbuilt compression techniques, the page would fail XHTML validation. I thought that I had fixed it last time, however that was not the case. It is now truly fixed, I hope!
    2. In case of archive views with no posts (e.g. nothing found in the search results page) there was no content displayed. This has been fixed.
    3. While working at a furious pace to support some of the review criteria at WP I had broken backwards compatibility for menus. If you were on a WP version older than 2.9 you would have seen a fatal error. I have rectified this. Of all the bugs I have had to fix, I am sorry about this one most, because I am normally very good with backwards compatibility.
    4. There was another backwards-compatibility issue, but this time with PHP. There was a call to memory_get_usage, which is not available in really old versions of PHP (< 4.3.2) and is available with partial support in other versions of PHP. I have fixed this too.
    5. I have fixed a bug that was preventing child theme CSS from loading correctly. Note that if you have Suffusion’s GZIP compression disabled, child themes need to have all stylesheets explicitly invoked. In other words, not only the base style.css, but all the skin-specific CSS files have to be added.
    6. There was a bug introduced in the comments section, where a CSS element was being declared twice. I have fixed this issue.
  3. Changes:
    1. Again, there are minor stylesheet tweaks to the Minima skin
    2. As a part of some code housekeeping I have enqueued the stylesheets for the admin pages.
    3. I have also replaced the call to get_bloginfo('name') in the header with get_bloginfo('name', 'display') so that plugins that apply filters to the blog title work in tandem with the theme.
    4. I have restyled the blockquote element so that it looks a bit better.
    5. There are updates to the German (Du and Sie), Norwegian, Swedish, Dutch, Danish, Polish and French translations. Thanks, translators!

On a side note, I have closed the “Feature Requests” section of the support forum. As the theme grows in complexity and popularity, the support forum has been swirling out of control and I had to draw the line somewhere. Since the Feature Requests section saw a lot of traffic and a lot of requests for features that I simply am not in a position to provide, I have closed off that section of the forum.