Tagged: plugins

Code updates


I have finally gotten around to updating my [[http://floatingsun.net/code/wordpress-widgets|Wordpress widgets]] — UTW Related Posts and Sub pages — to work with the latest version of WordPress. If you have been using these widgets, please try them out and let me know if they work for you.

There are some changes in the theme itself. I have modified Sandbox slightly to present the meta info about posts slightly differently. For posts with a lot of comments, the comments should now appear paged. I have a version of comments-paged.php for Sandbox (for use with the [[http://www.keyvan.net/code/paged-comments/|Paged Comments]] plugin) — if you need it, drop me a note.

A new release of WP-Dokuwiki is around the corner as well, so keep an eye out for it!

Fresh look


If you have been checking out my website on a daily basis the past few days (yes yes, I know many of you have nothing better to do! :p ), you will have noticed that it has undergone several changes. The most visible of course, is the new look. So if you’ve been hiding in the comfort of your feed readers, here is your chance to get out and enjoy the fresh new look on [[http://floatingsun.net|floatingsun.net]] :-)

A few days back I had [[http://floatingsun.net/2007/05/29/watch-out/|announced]] that changes were upon us. I usually don’t follow up to claims like that fully, but this time around I think I’ve done a pretty good job.

The first major change I made was to re-organize the content on the website. As I outlined in a [[http://floatingsun.net/2007/06/07/update-your-bookmarks/|previous post]], this much needed change was actually suggested by a friend first. I think now the content structure is much cleaner. No more do static pages (on code, articles, research etc) have to live under “/blog”. The “blog” itself (basically the conventional reverse chronological ordering of posts) has been moved to “/weblog” instead. I had to do this because I didn’t want existing links to content under “/blog” to break.

Of course, to make everything work I had to do some [[wp>.htaccess|htaccess]] magic under “/blog” to make sure all links are redirected properly. I’m also trying to be a good samaritan and sending the [[http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection|HTTP 301 code]] (moved permanently) so that search engines and other crawlers can fix their indexes appropriately. This should also hopefully make sure that my search engine rankings are not affected.

Also, if you noticed, I have gone back to a different [[http://codex.wordpress.org/Using_Permalinks|permalink]] structure. A long time back, I [[http://floatingsun.net/2005/08/16/permalinks-updated/|had argued]] that having a post ID based permalink was better. In hindsight, I don’t think it worked out very well. First of all, having the post title in the URL seems to work better for search engines. Secondly, if people link to my posts, having the title in the URL itself gives potential visitors some idea what the post is about, instead of having to grabble with a bunch of random looking numbers. And finally, most analytics software (in particular, [[http://analytics.google.com|Google Analytics]], [[http://awstats.sf.net|AWstats]], Slimstat/Measuremap/Mint etc) don’t work very well with numerical URLs — as in, many of them implicitly assume some kind of content information to be present in the URL.

Anyways, as before I didn’t want my old links to break. So I used the //excellent// [[http://www.deanlee.cn/wordpress/permalinks-migration-plugin/|permalinks migration plugin]]. It works like a charm, right out of the box! Its a little funny, because people accessing old URLs will actually go through two indirections before getting the real URL: first “/blog” will be stripped out of the URL, then the numerical URL with post ID will be re-directed to its new sanitised URL (with the post title). The migration plugin also sends 301 re-directs, so hopefully all will be well in search engine land. Though looking at the stats from the past few days, I think there has been a //slight// dip in hits — but that might just be coincidental.

The second major change is the new look. I’ve always wanted a theme that uniquely mine, but since I always ended up using [[http://getk2.com|k2]] or some other standard theme, it never quite happened. The fact that I’m pretty bad when it comes to colors and design doesn’t help either. Fortunately for me, recently the [[http://www.plaintxt.org/themes/sandbox/|Sandbox theme]] got some love and I decided to give it a shot again (yes, I’ve tried sandbox earlier on this blog, but it didn’t last). The great thing about Sandbox is that it has a very rich semantic markup, and so its possible to do a lot just by using CSS. Since I didn’t want to muck around with PHP much, thats one less thing to worry about.

And so this theme was born. It is unimaginatively named floatingsun and it is unlikely that I will make a public release anytime soon. It is definitely not completely original in the sense that layout (and even the color theme) has been inspired by the beautiful [[http://www.binarymoon.co.uk/projects/regulus/|Regulus]] theme. But it //is// unique in the sense that I pretty much did the CSS from scratch, including the layout and the colors. For colors, I played around a lot with some color schemes (check out [[http://kuler.adobe.com|Kuler]]) and eventually decided to pick up colors from the [[http://www.oxygen-icons.org/|Oxygen]] [[http://kde-artists.org/Oxygen-palette|color palette]].

I’m also integrating various plugins into the theme as and when I go along. I’m maintaining all my changes as a patch on top of sandbox, so when a new version of Sandbox comes out, its easy for me to upgrade. I’m also looking forward to the recently announced [[http://www.sndbx.org/|Sandbox Design Competition]] — while I fully intend to stick to this layout/color combo for some time, there’s no harm in picking out the best from from the lot and incorporating them in my theme :-D

I’ve also ditched most of the bundled widgets. Instead, I’m using some fabulous plugins by [[http://rmarsh.com/about-2/|rmarsh]] — [[http://rmarsh.com/plugins/similar-posts/|similar posts]], [[http://rmarsh.com/plugins/recent-posts/|recent posts]], [[http://rmarsh.com/plugins/recent-comments/|recent comments]] etc. None of these plugins come with widget support, so I hacked up simple wrapper widgets that call the plugins. I’ll put up the code for these widgets shortly. One of the best things about these plugins is that they can use the [[http://rmarsh.com/plugins/poc-cache/|Plugin Output Cache]] plugin, so hopefully that’ll ease up the load on the server even more.

I’ve not used any background images so far. The icons all belong to the [[http://famfamfam.com/lab/icons/silk/|silk icon set]]. I’m still debating if I should spend time trying to come up with a logo — we’ll see how that goes. Its still a work in progress, there are a bunch of things I still need to do, most notably styling of comments, post meta-data and better UTW integration.

I’d love to hear any comments/suggestions on this new look!

WordPress Widgets

=== UTW Related Posts ===

There does exist a [[http://israelsson.nu/blog/projects/wpw-related-posts/|related posts]] widget that uses the [[http://www.w-a-s-a-b-i.com/archives/2006/02/02/wordpress-related-entries-20/|related posts plugin]]. However, I wanted a widget that would use [[http://www.neato.co.nz/ultimate-tag-warrior/|Ultimate Tag Warrior]]. So I wrote up one to use that. Note that you need to have the UTW plugin installed to use this widget.


[[http://floatingsun.net/data/code/utw-related-posts.phps|UTW Related Posts]]

Though I have been using this widget for a couple of weeks now, I didn’t release it immediately. It seems another [[http://saboya.org/344/|UTW related posts]] widget was released in the meanwhile. I love open source! :-)

=== Subpages ===

When I started using the widgetised sidebar in K2, I realized that my subpages were no longer showing up when I was viewing a page. So I wrote a subpages widget — it only shows up on a page, and only if the page has some subpages.


[[http://floatingsun.net/data/code/subpages.phps | Subpages Widget]]

**Update 8/13/2007**: Updated to work with WP2.0+

**Update 9/1/2006**: I’ve added another option called “Sibling Title” to the widget. This will control the “label” for the siblings section.

**Update 8/19/2006**: I’ve added a “Show siblings?” option to the widget. When checked, it will additionally display the list of pages at the same level as the current page (hopefully). Please check it out and let me know if anything breaks.

==== Previous versions ====
* [[http://floatingsun.net/data/code/subpages-0.3.phps | Version 0.3]]
* [[http://floatingsun.net/data/code/subpages-0.2.phps | Version 0.2]]
* [[http://floatingsun.net/data/code/subpages-0.1.phps | Version 0.1]]