A Dilbert Plugin for DokuWiki

dil

I wrote a simple plugin for DokuWiki that, writing [DIL] on a page, lets you see displayed the Daily Dilbert. It uses the DilbertDailyStrip RSS feed and SimpleXML.

I’ve written a similar plugin for WordPress.

The current version is 0.6 and you can download it here.

ChangeLog:

  • Version 0.6: it uses the new feedproxy.google.com feed (thanks to Casey);
  • Version 0.5: now it uses DokuHTTPClient instead of CURL, removing a dependence and handling the proxy settings automatically;
  • Version 0.4: now it uses SimpleXML and CURL;
  • Version 0.3: fixed a small security weakness (credits to Andy Webber);
  • Version 0.2: it does not use anymore NuSOAP but the PHP5 SOAP extension and it can read the optional proxy configuration of DokuWiki (without having to duplicate it internally);
  • Version 0.1: it is based on a snippet written by Alessandro Battezzati (the snippet itself is also based on http://shupe-website.googlecode.com/svn/trunk/myAdmin/test/dilbert.php that uses NuSOAP through the DailyDilbert Web Service). The syntax.php file is shipped with $proxyhost, $proxyport set as your server was behind a proxy: void them if you don’t have a proxy. With small changes, this plugin can be used for generic SOAP client operations as well (change tempuri.org with your own namespace).

Last update: 2008-07-12

If you enjoyed this post, make sure you subscribe to my RSS feed!

11 Responses to “A Dilbert Plugin for DokuWiki”


  1. 1 Andreas Gohr

    Nice. Small tip: if you replace the soap_transport_http class with a wrapper around DokuWiki’s own HTTP client class, your plugin will automatically use the proxy settings from the main DokuWiki configuration. It will also loose the dependency on the CURL extension.

  2. 2 Carlo

    Thank you for your tip. I will try understand DokuWiki internals better for a future release of my small plugin.

  3. 3 Carlo

    Version 0.2 partially implements the tip suggested by Andreas.

  4. 4 Jakub Safar

    Hello,

    is there any way how can I make the -excellent- (thank you, thank you) Dilbert plugin scale the image in size or percentage?

    Jakub

  5. 5 Carlo

    Jakub: the quick way is to change its code (it’s simple to do it) adding width="95%" inside its img tag (95 or another percentage you like). The long way is: to wait a future release of my plugin with an option that could account this problem. :)

  6. 6 Casey

    The URL seems to have changed.. and the display has halted. Can you do a quick fix, please? Absolutely love this plugin !

  7. 7 Casey
  8. 8 Carlo

    Casey: it’s a sort of redirect. I’m going to release a new version with the new feed, thanks.

  9. 9 Jakub Safar

    Hello Carlo,

    thank you very much for the quick fix, having Dilbert back feels like being at home :)

    What do you thing about publishing your Dilbert plugin via “current” URL? For example:
    http://perassi.org/quickhacks/dkdil/cur/dil-current.tar.gz

    This would make installation and further updates easier for the plugin users.

    Jakub

    p.s. the width=”XX%” works like charm, thank you for the tip!

  10. 10 Carlo

    Jakub: it’s not a bad idea… I haven’t set it because I still think that people who want to get news of this kind should subscribe to my feed… am I wrong? :) Anyhow, I might add this feature in the next release.

  11. 11 Jakub Safar

    I guess that you are right. Getting latest information is purpose of feeds. Nevertheless, easier wiki plugin upgrade is a nice thing to have O:-)

Leave a Reply