Switched to S9Y 0.6 - cool stuff! - Blog - Open Source - schlitt.info

schlitt.info - php, photography and private stuff

Switched to S9Y 0.6 - cool stuff!

Yeah, finally I switched to Serendipity 0.6-pl1. And yeah, it's really cool.

This first entry is written using the most useful feature S9Y could get: Wiki markup! Supported by the PEAR+ class Text_Wiki by Paul M. Jones you can easily type your entries formating them using wiki markup language. :)

The only downer of the joy is that all past entries will be broken, if you switch to wiki markup... But a little hack can solve this easily. You can find the patch in the extended entry. And beware, if you turn the wiki markup plugin on for HTML nugget sidebar plugin, it will frag your HTML code!

The current version of the Text_Wiki class is rather old, but works fine, hopefully the S9Y guys will update this to a newer version with the next release. Beside that it would be very desirable to have the possibility to configure the rules loaded for Text_Wiki from within S9Y config, because e.g. for me the wikilinks rule (replacing WikiWords with their URL) is not that important, and the rule is not usable right now, without patching...

Another new feature I ever wanted to have is switching off those damn smiley images. Since I hate thos little "funny" images, that's a real easement. ;)

S9Y is cool. Especially 0.6-pl1. :)

Serendipity 0.6 patch to gain BC for prior entries, when you want to use Text_Wiki plugin:

diff -u serendipity_plugin_api.php.old serendipity_plugin_api.php --- serendipity_plugin_api.php.old Tue May 18 19:57:59 2004 +++ serendipity_plugin_api.php Tue May 18 21:04:21 2004 @@ -369,10 +369,20 @@ if (is_array($plugins)) { foreach($plugins AS $plugin => $plugin_data) { + /* HACK START */ +if ($event_name == 'frontend_display' && !empty($eventData['id']) + && $eventData['id'] < 177) { + continue; + } +/* HACK END */ $bag = &$plugin_data['b']; $plugin_data['p']->event_hook($event_name, $plugin_data['b'], $eventData); } } + /* HACK II START */ +if ($event_name == 'frontend_display' && !empty($eventData['id']) + && $eventData['id'] < 177) { + $eventData['body'] = nl2br($eventData['body']); + } +/* HACK II END */ } return true;

In both "hack sections" you have to replace the number 177 with the first new entry number you post with 0.6. The second hack is a little more dirty than the first one, because instead of calling the real plugin which is used for nl2br plugin (and maybe the serendipity markup plugin) it does the nl2br manually. I was just to lazy to dig into the complete plugin API just to fix this isse. ;)

If you liked this blog post or learned something, please consider using flattr to contribute back: .

Trackbacks

Comments

Add new comment

Fields with bold names are mandatory.