Jul 052011

Version 3.8.1 went live today. This version addresses the issues reported with Version 3.8.0.

Truth be told I was a bit nervous about 3.8.0 because the change log for that version was almost 40 items long and since the development took over 4 months, I was concerned that what I had started developing in February might have been forgotten by June. Luckily nothing of that sort happened, and though there were bugs, they were nowhere as bad as 3.7.5/3.7.7.

So here is the list of changes:

  1. Bug Fixes
    1. In IE9, there was a stray closing comment tag (-->) appearing near the top of the page. This was due to the incorrect inclusion of a conditional script in IE for rounded corners.
    2. I had upgraded the JQuery Cycle scripts for featured content in the theme. This didn’t pose any problems in most cases, however some users reported that when the Featured Content Widget was being used with the “lite” version of the script, the script stopped cycling through images. I have rolled back the JQuery Cycle script, so hopefully there will be no issues.
    3. There was an undetected bug which would have caused JS errors in IE6 because I had forgotten to include a particular script. I have addressed this.
    4. Another “Featured Posts Widget” bug was causing the images to get squished when the widget was in the “Widget Area Below Header” or in the “Widget Area Above Footer”. I have addressed this. Props to “Kapusjon” on the support forum for helping me track this down!
  2. New Features
    1. I have enhanced the post_class() functionality in the theme. It now includes some classes for posts, such as category-xx-id (the id for the category), post-seq-x (the number of the post on a page), post-parity-odd (whether the post is in an odd location or even). You can take advantages of these classes for adding extra styles to your site.
  3. Code Changes
    1. I have removed output buffering where possible. This shouldn’t impact you as a user.
    2. I have replaced a query parameter in the Featured Content to ignore sticky posts – this is because the previous query parameter was deprecated.
    3. I have added a wp_reset_query() call to the Category Posts widget to account for any query changes to it.

I would also like to get your inputs on features that you liked or would like to see improved in the previous release. I added a lot of them, like column control for individual posts and the magazine layout, enhancements to the Twitter and Category Posts widgets and byline information handling for the magazine template, the tile layout and post formats.

Jul 012011

Version 3.7.9 of Suffusion was approved today, and as things happen, shortly after approval I discovered a bug which I fixed. So the new version available is 3.8.0. This version should work on the upcoming WP 3.2 – I have made sure that the admin-side JS doesn’t break.

This version has a very long but hopefully low impact change log. The following are the changes:

  1. Bug Fixes
    1. There was a problem with selecting fonts that had spaces in their name in the back-end. This has been addressed.
    2. In IE7 if you were to use the “No Sidebars” template with the “Widget Area Below Header” enabled, there were markup issues. This has been addressed.
    3. The “pullout” style displays (like the Minima skin) had an error in the markup – it was missing a closing tag.
    4. The image resizer was incorrectly creating multiple copies of the source file if the file extension was in uppercase. Now it will not.
    5. I fixed a bug where the sidebars below Sidebar 1 and Sidebar 2 were incorrectly picking the styles defined for the upper sidebars.
    6. This is not a bug fix as such, but I removed the “Notifier Failed” message that was shown earlier in the options panel if my site was down.
    7. I fixed a minor problem where the options panel was sometimes showing incorrect values for default colours.
    8. The sitemap template was not showing contents properly without saving the options for it twice. Now that has been resolved.
    9. Another minor bug fixed is that in the Alternate Page Title handling. There was a small inaccuracy in the code that would prevent the alternate titles from working under some circumstances.
  2. Changed Features
    1. The “Edit” link earlier used to be displayed only on singular views (i.e. on pages and on single posts). I have now made it visible on the archive views too.
    2. I made the button bar in the back-end a lot less intrusive, based on user feedback. I also made the back-end fluid-width instead of fixed width.
    3. The Featured Content has always used the JQuery Cycle plugin. Cycle was meant to cycle through a series of images, so it displayed a blank box whenever you had a single post in your featured content. I worked around this – you can now have just one post in your featured content and it will work just fine.
    4. Code Housekeeping
      1. IE6-specific Cleanup
        1. In an effort to clean up for IE6, I replaced Microsoft Expressions with JavaScript. As an end user you will not see any impact, except that it speeds up a few things. Not that I expect you to use IE6, but even so.
        2. I also got the IE-specific fixes to enqueue instead of including them directly. Again, you can safely ignore this – it will not impact you as a user.
      2. I swapped out some of the admin panel checks with standard WP functions like checked() and selected().
      3. There are some minor CSS cleanups done.
      4. I have swapped out the use of $post->post_title with get_the_title(). so that the right filters are applied.
      5. I have removed the scripts for JQuery Accordion – it was something erroneously included in the first place, so removing it should have no impact on you.
    5. The replacement text for […] in excerpts now supports HTML in addition to plain text.
  3. New Features
    1. This is something that folks might like: I introduced a method to search for options in the back-end. It is not perfect, but it should help people find options a lot quicker. You will see a box called “Quick Search” in your options screens – that is where you can start typing what you are looking for.
    2. Magazine and Tile Layout
      1. Now there is byline support for the Tile Layout and the Magazine Template. Hopefully you will like what has been implemented. To save on real estate, this has been implemented as clickable icons, which you can click to see the details.
      2. Additional modifications to the Magazine Template include the ability to control the number of sidebars in there. This too makes its way after quite a few requests.
      3. Custom thumbnail sizes can now explicitly be defined for the Tile Layout. Earlier the thumbnail inherited the sizes from the Magazine layout.
    3. Widgets
      1. There is a new Flickr widget to help display your Flickr stream. It is not as fancy as what I had put together for the gallery short-code extension, but it does its job as it should.
      2. The Twitter Widget got a rewrite! It now displays your Avatar for your tweets, and the Avatar of the original tweeter in case of a retweet.
      3. The Category Posts widget (and the static category posts in the magazine layout) got a rewrite too! It now displays a post thumbnail, in addition to an excerpt if you wish. You can additionally control the length of the excerpt and make it different from that of a standard excerpt.
    4. Special Handling
      1. Support for post formats has been significantly improved. For each post format you can control how the bylines should appear etc. Check out Other Graphical Elements → Post Formats.
      2. You can now control the number of sidebars on single posts. In your “Edit Post” screen you will see a drop-down that says “Select the sidebar layout to apply to this post” under “Additional Options for Suffusion”. You can pick the layout you wish for that.
      3. You can now hide the page title for pages. In the “Edit Page” screen you will see a checkbox that says “Do not display the page title” under “Additional Options for Suffusion”, which upon selecting will hide the page title.
      4. For posts without a title, a specific “Permalink” is displayed. This is turned on by default and can be switched off in Other Graphical Elements → Post and Page Bylines.
    5. A search form has been added to the 404 page, as per WordPress requirements.
    6. For image attachments you can display all available image sizes at the top. Take a look at Templates → Attachments.
    7. Rounded corner support has been extended to IE9.
    8. There is a new “Mosaic Layout”. Consider this an apology for not including the photo-blogging features I had thought I would, but this was the least I felt I could do. The mosaic layout will display just the thumbnails of your posts in an archive view, nothing else. In many ways it is like the List Layout, except that this shows thumbnails instead of titles.
    9. There is a new short code that accompanies the Flickr Widget, called suffusion-flickr. It takes the same parameters as the widget, so you can pass the following
      1. id – Mandatory, can be obtained from http://idgettr.com using your photo stream’s URL
      2. type – Mandatory, legitimate values: user, group
      3. size – Optional, legitimate values: s (square), t (thumbnail), m (mid-size); default: s
      4. number – Optional, default 10
      5. order – Optional, legitimate values: latest, random; default: latest
      6. layout – Optional, legitimate values: h (horizontal), v (vertical), x (no layout – user-styled); default: x
    10. There are a couple of new filters: suffusion_comment_form_fields and suffusion_permalink_text. The former can be used if you want to override the fields in the comment form, while the latter can be used to override the “Permalink” text that you see for the newly introduced permalink byline.
    11. In the previous version I introduced WPML support for text fields entered on the admin side. In this release this support has been extended to fields that are of type “textarea” as well. E.g. The 404 page content under Templates → 404 is a text area, so the text you have there can be translated into multiple languages using WPML.
  4. Removed Features
    1. I removed the ability to load JS files in the footer, because this was causing a lot of dependency issues. Most caching plugins will let you do this, though, so you are not really losing out on much by means of functionality.

There is one thing I am not pleased with for this release, and that is a lack of polish on some of the new functionality, like the enhanced Post Format support, the Mosaic Layout etc. Believe me, I would have done things much better if I had more time to spare, but having got caught up between releasing the theme to be WP 3.2-ready and adding features and working full-time elsewhere, I had to make some sacrifices. Rest assured that I will improve on these in the near future.

I would again like to reiterate something that I touched upon in my last few posts. Suffusion is almost 2 years old and has evolved into something that I am very proud of. However, due to several factors I believe now is the time to wind down the development of the theme:

  1. The theme has reached a level of complexity beyond which it will become more of a liability than an asset. So from now on, big ticket new features are a strict no-no, except for some things documented below.
  2. I am trying to reclaim some time for myself. Thanks to all volunteers on the forum (you know who you are!) the load on me has reduced quite a lot, however with every new feature comes a new set of support questions. Juggling between coding, supporting and working is turning out to be a strain.

However, in the light of the queries posted in response to my previous post I must hasten to point out:

  1. Incremental development will continue, like new skins, new templates, support for newer WP versions.
  2. Some big ticket items are still in scope for the theme, specifically in the area of sidebars, and making the theme more of a customizable framework.
  3. I will channel my energy into building some plugins that you can take with you to any theme. As mentioned in my last post I will bundle the photo-blogging features into a plugin. In addition I will build some plugins to manage fonts etc.
  4. I will improve theme documentation.
  5. I will also switch back to mini-releases instead of humongous ones. Though a lot of people don’t like frequent updates to the theme, from my experience over the last few releases, smaller updates are easier to process and definitely easier to support.


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.