1. Nov 3rd, 2005

    Adding tables, Flickr and tags to WordPress 1.6

    tables1.png

    I just started using WordPress 1.6, the WYSIWYG editor and image uploader are good enough reasons to upgrade. Of course, it’s beta so I expected some bugs, and I came prepare to make some tweaks. Here’s a run down of some tweaks that will make your life better.

    Tables and formats

    Since I post about code, I need to be able to use preformatted text. And having tables would be nice too. WordPress uses TinyMCE, a nifty little text editor that has more options than you can imagine. So first, I added formats (headings, preformatted, etc), a few more styles (underline, sub, super) and charmap. To do that you’ll need to edit the file wp-admin/admin-header.php, line 22 and specify what other buttons you want. You can find a full list on the TinyMCE site.

    Adding tables is a bit more tricky, WordPress doesn’t include the tables plugin by default. You’ll need to download a version of TinyMCE, extract it and copy the table (or any other plugin you want) over to the wp-includes/js/tinymce/plugins directory, then enable it by once again editing wp-admin/admin-header.php.

    Flickr

    Did you know that WordPress 1.6 lets you add photos directly from your Flickr account? It just needs to know your flickr user name, which is set as the flicker_username option in the database. If you don’t want to update database tables directly, just edit the file wp-admin/image-uploading.php, line 225. Once you set the user name, WordPress gets your Flickr ID (different from your user name) and stores that in the database. You may have to delete that option in the database if you want to change users.

    Ultimate Tag Warrior

    I’m using Ultimate Tag Warrior, which ends up reporting database errors in the Tags textbox, instead of showing me the post’s tags. I found out a simple fix for that, by editing the ultimate-tag-warrior-actions.php file, line 485 to read:

    if ($postid) {   $utw->ShowTagsForPost($postid, array("first"=>'%tag%'     'default'=>', %tag%'));}

    WordPress also broke the tag pages, by changing how .htaccess works. The easy solution was to copy all RewriteRule ^tag … lines over from the old 1.5 .htaccess file.

    Enjoy!

    Your comment, here ⇓