From: Carsten K. <car...@ma...> - 2001-12-01 10:38:48
|
Hi, I managed to surprise myself today by writing my first WikiPlugin! <?plugin text2png ?> It creates a PNG image file, so that means it requires that PHP is compiled with "--with-gd" support for the GD Library 1.6 or later. <http://www.boutell.com/gd/> The variable ttfont must point to a valid 'ttf' font file on your system. A Type 1 font can be used instead if PHP is compiled with "--with-t1lib". Right now it just takes a hard-coded string "Hello WikiWorld!" and creates a png file of the same name and puts it into the same folder as index.php. Make sure the server has write permissions to that directory. A hypertext link to the file shows up on the Wiki page but it's not the correct url yet. You'll have to navigate to the correct directory yourself to view it. I looked at the other plugin code but I'm having a lot of trouble getting any plugin arguments to work. Anyone want to give it a shot, to make it work with a text argument? <?plugin text2png text="mytext" ?> ??? Once the plugin arguments are working it should be a breeze to produce localized buttons on the fly--I've already got some working php code which overlays text onto a existing images, it just needs a little tweaking to wrap it into a WikiPlugin. Carsten |