A-  A  A+ RSS Feed

Deep Thoughts by Robert Felty

thoughts on wordpress, latex, cooking et alia

Archive for August, 2008

Thursday, August 28th, 2008

Collapsing categories update

I have just a pretty major revision to collapsing categories, version 0.6.
It includes the following changes:

  • Can have multiple instances of widgets, each with separate options
  • No longer works as non-widget
  • All options are stored in one database row
  • Added more sorting options
  • Added option to include or exclude certain categories
  • Added option to expand certain categories by default
  • Added option to have category names either link to category archive or to activate expanding and collapsing

I realized this morning that this new version requires WP 2.6+. I would like it to be compatible back to at least 2.5, if not 2.3. However, I can’t seem to get it to work. The problem seems to be in adding the widget. In 2.5- the widget appears and can be added, and options can be set. But when you click on “save changes”, the widget disappears from the list. I have tried replacing a 2.5 widgets.php file with a 2.6 one, and that worked. I have also checked the database, and the options are being updated. So it must be something to do with how the widgets get registered. I have spent several hours trying to figure it out, and need to get back to my day job. I would be very pleased if someone else figured it out. In the meantime, 0.5.10 will work with wordpress 2.3-2.6

Monday, August 25th, 2008

Collapsing monopoly

I am happy to announce the release of my fourth collapsing X plugin for Wordpress. This one is Collapsing Links, which was requested by several users of my other plugins. With the development of this plugin, I finally added the ability to have multiple instances of the widget. This took some careful study of some of the default wordpress plugins, and forced me to completely re-design how the plugin options are handled. In addition to the ability to have multiple instances of the plugin, the re-design also reduced the number of database queries, since now all the options for the plugin are stored in one row in the database. For more details, look at the Collapsing Links page.

Now that I have figured out these details, I plan on re-working the remaining plugins to allow multiple instances of the widgets as well. Expect to see these updates over the next few weeks.

There is one downside to having multiple instances of the widgets. In the current versions of Collapsing Archives, Categories, and Pages, you can use the plugin either as a widget or standalone. In future versions of the plugin, it will only work as a widget. When I originally wrote these plugins, widgets were new, and not standard for wordpress. Now they seem pretty ubiquitous, so hopefully this shouldn’t pose too much of a problem.

I hope that other people find the plugin useful. I must say that I enjoy developing wordpress plugins, since it a great way to utilize many different languages all at once — xhtml, css, javascript, php, and sql.