[pmwiki-users] Kudos

Henrik henrik.bechmann at sympatico.ca
Sat Jan 20 10:49:16 CST 2007


Occasionally I am moved to gratitude for the ability to easily customize 
PmWiki.

In this case, I have a few css rules of convenience that apply 
specifically to images:

image-left, image-right, image-bordered-left, image-bordered-right, 
image-inline

and a couple that apply to images as well as other elements:

shadow-inner, shadow-outer

I was able to implement these by applying the following code to config 
(adapted from wikistyles.php):

foreach(array('image-left','image-right','image-bordered','image-bordered-left','image-bordered-right','image-inline') 
as $c)
    $WikiStyle[$c],array('apply'=>'img','class'=>$c);
$WikiStyle['img']=array('apply'=>'img');

So now I can write:

%image-bordered-right%Attach:MyPictureGallery/mypicture.jpg

and have it come out as

<img class="image-bordered-right" src=...

or

%img image-right shadow-outer%Attach:MyPictureGallery/mypicture.jpg

And have it come out as

<img class="image-right shadow-outer" src=...

Gotta love it!!

Thanks Pm,

- Henrik

-- 

Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca





More information about the pmwiki-users mailing list