Skip to content
accelerando

Tag Archives: Hacks

Wordpress 2.2 Update

17-May-07

Wordpress 2.2 arrived a day ago.
Updating was no problem at all. Prominent new features are wigdet support without the need for an external plugin and a working atom 1.0 feed.

I could drop two plugins: the widget plugin and the atom10 plugin. Nice. All others work as before (some important to mention are UTW, WP-Cache and the nice extended live archive(*).

A really nice site effect of the update: the WP Team finally managed to put a “SET NAMES blah” into wp-db.php, so that setting “UTF-8″ i.e. in wp-admin really means UTF-8 in the database. I always hacked my wp-db(**) for my other blog planet-punk.de, since there are a lot of old posts from another legacy system that _are_ indeed UTF-8 but which where maltransformed by wp without that hack before 2.2.

I do have a local development system on my mac but i tend to test things twice or more often. Other people maybe don’t have or want that luxury and need to udate their blogs directly on the server. Either way, it’s a good idea, to put your blog to maintenance while updating your wp core files. This is easily accomplished with .htacess and mod_rewrite. First create a file “maintenance.html” for your visitors. Than look up your external ip and add the following to your .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !87.78.68.17 [NC]
RewriteRule ! maintenance.html$ maintenance.html [R=301,L]
</IfModule>

and replace 87.78.68.17 with your external ip. Remember commenting these entries when you’re done.

(*) If you have any questions about my plugins, don’t hesitate to ask, i just don’t want a plugin list in case of bugs in any plugin.

(**) The hack was: Add the following to __construct in your wp-db.php (./wp-includes/) :

	$this->select($dbname);
	$this->query("SET NAMES 'utf8'");

Suchphrasen speichern mit BBClone

11-May-06

Seit geraumer Zeit nutze ich BBClone für Statistiken. Einfach und gut zu bedienen, wie ich finde.

Leider speichert BBClone in den Top n nur einzelne Suchwörter und keine Phrasen. Das kann man aber leicht ändern, wie ich in diesem Blog gefunden habe. Gleichzeit wird dort auch beschrieben, wie man BBClone die Zusammenarbeit mit Wordpress nahe bringt.

Ich habe den BBClone Log Processor entsprechend angepasst. Um ihn im eigenem BBClone zu verwenden, einfach runterladen, die Endung .txt entfernen und die entsprechende log_processor.php im BBClone Verzeichnis ersetzen.
Die Datei basiert auf dem Log Processor von BBClone 0.4.8b.

Close
E-mail It