2008.12.17

WordPress site lagt om fra ISO-8859-1 (Latin 1) til UTF-8 enkodning

Kategori: Opsætning — Michael Schøler, Kl. 21:21:01

Pyyyyyyyyhha… Det var sq’ nervepirrende!

For en time siden pÃ¥begyndte jeg omlægning fra ISO-8859-1 til UTF-8 enkodning af denne hjemmeside. Og hvorfor er det sÃ¥ vigtigt? Jo, det er det fordi der dags dato ogsÃ¥ er blevet opgraderet WordPress version fra 2.6.5 til version 2.7. Den nye version 2.7 kunne ikke li’ ISO-8859-1 enkodningen der tidligere blev anvendt, hvilket dog kun gav sig udslag i en enkelt RSS-feed læser i administrationsinterfacet. Desuden er UTF-8 et større tegnsæt at anvende, og det var i sin tid en fejl der overhovedet blev sat ISO-8859-1 idrift pÃ¥ denne side.

ISO-8859-1 række...

Sådan skete omlægningen, der teoretisk set burde være helt ens for uanset din version af WordPress:

  1. Tag en backup af din wordpress database (jeg lavede en komplet export via phpmyadmin)
  2. Tag endnu en backup af din WordPress database (jeg anvendte her plugin’et WP-DB-BACKUP)
  3. Er du tilstrækkeligt paranoid og/eller stærk i troen hvad angÃ¥r Murphy’s lov, sÃ¥ gentag punkt 1 og 2 til mere end en harddisk og/eller usb nøgle som jeg.
  4. Opret filen index.html i roden af din WordPress mappe - og skriv en besked heri om at hjemmesiden er midlertidigt nede pga. vedligeholdelse
  5. Ret filnavnet i WordPress mappen fra index.php til _index.php
  6. Start phpmyadmin eller tilsvarende administrativt DB interface
  7. Lav en export af samtlige wordpress tabeller, og sørg for ikke at gemme “CREATE TABLE” instruktioner til den resulterende SQL fil der kun mÃ¥ indeholde inserts efterfølgende
  8. Behold phpmyadmin/db-interface åbnet og åben så den eksporterede SQL fil i en UTF-8 kompatibel editor, f.eks. Notepad++
  9. Tving filen i UTF-8 tilstand, og verificer at special tegn såsom Æ ØÅ æøå ser korrekte ud
  10. Søg efter “blog_charset”, og ret værdien “iso-8859-1″ til “UTF-8″
  11. Gem SQL filen og luk Notepad++
  12. Vend tilbage til phpmyadmin/db-interface og tøm samtlige WordPress tabeller
  13. GÃ¥ lidt i panik - din blog er nu slettet helt, og du har selv gjort det!
  14. Ret collation for alle WordPress tabellerne, en efter en, fra “latin1_danish_ci” til “utf8_danish_ci”, bÃ¥de pÃ¥ kollone niveau og default collation
  15. Importer nu SQL filen til WordPress databasen (det er vigtigt filen ikke indeholder CREATE TABLE, da disse instruktioner sætter collation tilbage til iso.8859-1 !)
  16. Tilpas din wp-config.php sÃ¥ du er sikker pÃ¥ den indeholder linien “define (’DB_CHARSET’, ‘utf8′);”
  17. Slet index.html og omdøb _index.php til index.php
  18. Kryds fingre - det skulle være det!

En stor tak til Jakob Kruse for hjælpen iøvrigt!

2008.12.17

JAlbum plugin for Wordpress is hereby no longer updated

Kategori: Brok, JAlbum plugin — Michael Schøler, Kl. 18:26:09

Hey there

Wordpress 2.7 has just hit the street, and it’s got a fancy new admin interface with many improvements… And once again, it is not fully backwards compatible. So… I’ve given up the fight. The JAlbum plugin for WordPress v2.5 didn’t even reach a release state, and I’m not up for another round of tweaking to be compatible with yet more interface changes.

As the plugin is open source, you are more than welcome to take over where I left the dang thing - hanging in a near release state, for WordPress v2.5.

Signing out.

Michael Schøler

2008.11.03

JSLint Multi v1.0 widget ready!

Kategori: JSLint Multi Widget — Michael Schøler, Kl. 11:10:25
JSLint Multi v1.0 screenshot

JSLint Multi v1.0 widget by Michael Schøler and Jakob Kruse is now ready for download.

DOWNLOAD:

With JSLint Multi v1.0 you can monitor multiple javascript files and continually have them verified with the newest JSLint engine.

JSLint Multi uses Douglas Crockford’s excellent JSLint tool to check your JavaScript files for potential problems.

Drag a folder unto JSLint Multi, and it will give you an overview of the JSLint status of every JavaScript file in that folder and folders below it. Click a file in the list, or drag a file, URI or some JavaScript code unto the widget, and it will displays details of the first problem found. Edit the file, and JSLint Multi will instantly recheck it! It even picks up new files added to the monitored folder!

Requires Yahoo! Widgets to be installed.

2008.09.22

JAlbum Plugin for Wordpress - download links for beta and previous version

Kategori: JAlbum plugin — Michael Schøler, Kl. 18:14:57
JAlbum plugin for WordPress...

Hi there

You’ve all been far too patient, and I’ve been far too busy (with just about everything else than the plugin).

Bottom line: I’m not done with the latest version of the plugin - yet - but you can now download the beta version from my site and just install it for the first time or upgrade your old v1 of the plugin. Your old v1 albums will continue to work.

Having the beta and v1 installed at the same time is “ok”, as long as only one of the versions is active in the wordpress plugin manager.

The beta is still missing the new “Upload Jalbum project file” feature and the new JAlbum manager section is also to be considered work in progress. However, all the old features are present and functioning - so just use it as you’ve always had. On the plus side, the beta version is compatible with wordpress 2.5+ and as some of you might have noticed the v1 plugin wizard interface died at 2.5 due to a major upgrade of the wordpress TinyMCE editor.

I’ll throw whatever time I can find at the plugin, currently its looking grimm, and would love to hear from some of you about your modifications/additions/further work on the plugin. It is open source, so feel free to contribute! =)

Download beta version of the plugin.

Download the previous plugin version.