Archive for the 'Wordpress' Category

The sneaky shall inherit the earth

Ge moet maar durven

“Wie niet waagt, blijft maagd”, as they say over here. This guy promises to ask his spam buddies to stop comment-spamming, als long as you put a link to his site. A while ago, he used to promise only “If you dont like advertising comments please send me an email with your site address to tedirectory(at)yahoo(dot)com and I will not write on your site” (cf yahooinsiders), but now he seems to have expanded his influence. He is spamming several of my websites continuously. The source seems to be some people over at Global Net Access, Atlanta (via spam.tinyweb.net).

Which makes me dream of ‘Big Spammer’, a TV-show where known spammers are followed by a hidden camera for a couple of weeks (‘see how he has been wearing the same shorts for a whole week now’) after which they are sued, convicted and dragged to jail, while all their computers are crushed by a huge truck. Mmmm, revenge …

K2 Sidebar modules vs. widgets

I upgraded to the latest version of WordPress recently, and in the process my K2 Sidebar modules were deleted because now WordPress has ‘widgets’ built in. Having used both systems for a while, I can only conclude: it’s a big step backward.

K2 Sidebar modules

k2-sidebar

The K2 theme comes with this plugin installed and it is the perfect sidebar framework:

  • it has an HTML, navigation, RSS, calendar … block and if you really need to do something very specific, there’s always the PHP block.
  • per block you can decide on which type of pages it should be displayed. E.g. you can show the navigation only in the static pages, and your recent comments only in the blog section. You can even exclude the showing on individual pages (e.g.: if on one page you need an IFRAME of 800 pixels wide, you can disable all sidebar modules.)
  • the blocks show the name that you gave them: you don’t have blocks named ‘Text 1′, ‘Text 2′ but e.g. ‘About’ and ‘Adsense’. This is much clearer if you want to change the order afterwards.

Just compare this: the RSS block for K2 and Widgets:
k2-sidebar-feed wp_widgets_rss

Which is why I dove into the WordPress forums to find a way to disable those simplistic widgets and get my original sidebar back. Here is the trick: the disable-wordpress-widgets plugin (also on code.google.com - via wordpress.org) disables the Widgets. I then installed the lastest stable version of K2 (0.9.6) over my WordPress 2.2.1 and not only are the sidebar modules active again, the sidebar was recovered as it was (from the database, probably). Awesome! Throw out those widgets!

Test your karma early in the morning

The “WordPress Automatic Upgrade plugin”“: if it works flawlessly (like when I used it on video.forret.com), an amazing tool! It upgrades your WordPress installation to the latest version, while taking a backup of files and database, and disables your plugins right before and re-enables them right after.

Stilleven (2) However, when it doesn’t work as expected (like yesterday morning here on blog.forret.com), it can be painful. In my case: my K2 template was broken after the upgrade. There is no ‘revert’/'rollback’ function, so you just have to dive in the K2 PHP code and disable the odd line here and there. Once you’re done, you realize that the new version of WordPress now has Widgets pre-installed, and the K2 Sidebar modules you so carefully handcrafted are gone. So you have to frantically look for the right widgets to do rebuild your sidebar, like the Flickr Badge Widget,the Folding Pages Widget, the Executable PHP widget and Google Adsense Widget. Then you nervously look for the right HTML code for your Adhese ads, and try to get the widgets in the right order. And only then you relax to drink your first coffee of the day (it was 6AM).

Thanks for the tip, Pascal ;-)

url.rewrite for WordPress on Lighttpd

LightyThis blog now runs on a Lighttpd (Lighty) webserver instead of Apache, and this means the configuration for ‘pretty URLs’ or permalinks of WordPress doesn’t work like it used to.
(As you might have noticed, I use permalinks like /2007/02/this-is-permalink/)

Whereas WordPress can automatically adapt the Apache .htacccess file to something like
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

it does not do anything automatically for your Lighty .conf configuration file (which is logical, since an application should not be allowed to mess with a central config file).
Continue reading ‘url.rewrite for WordPress on Lighttpd’