<:BBCode Destroyer für Serendipity>

Um möglichst alle Serendipity-User erreichen zu können, ist dieser Artikel in Englisch.

I have recently updated my Serendipity installation from the 0.7 series to 0.8 final. I was pretty surprised when I found out that the new BBCode parser wouldn't recognize URLs having characters like "!", "~" or "?" as valid anymore and therefore show BBCode in your entries instead of a link. This is especially ugly if your blog has, say, 300 entries and even those written years ago get broken.

Therefore I decided to stop using the BBCode parser and instead write my links and formatting (like bold, italic etc.) in plain HTML. But I didn't want to go through all of my 240 entries manually. So I wrote a dirty (but working) little script with the following features:

The script is not quite perfect because except for the customization nothing is commented in the code. Also it doesn't edit the "extended" part of an entry. But I used it for my blog and it definitely worked quite fine.

How to use it:

  1. get the script: BBCode Destroyer
  2. save it inside your s9y path (where serendipity_config_local.inc.php is located), call it something like nobbcode.php
  3. edit the settings at the top of the script file (if you want to, this is optional, the script works fine without)
  4. call it via your web browser (if your blog is at http://scytale.de/blog/, the script is at http://scytale.de/blog/nobbcode.php)
  5. check what it wants to do, and if it's okay, click the link at the top
  6. manually edit the stuff it couldn't change automatically

If you have any questions concerning the script, feel free to post a comment. Saying "thank you" is considered nice as well. ;)