[Pmwiki-users] Custom image markup

Patrick R. Michaud pmichaud
Fri Jul 2 09:23:28 CDT 2004


On Fri, Jul 02, 2004 at 04:41:40PM +0200, Jeroen Coumans wrote:
> I'm trying to implement the dropshadow image technique described at 
> <http://www.alistapart.com/articles/cssdrop2/>. It requires two 
> additional divs wrapped around <img>. How can I do this in pmwiki-1.x? I 
> naively tried adding the following line to local.php:
>     $UrlImgFmt = "<div class='alpha-shadow'><div><img src='\$Url' 
>     title='\$Url' alt='' img></div></div>"
> But it didn't work. I know I can hack pmwiki.php, but I'd rather not do 
> that. Any pointers or suggestions?

You're trying to do this for *all* images in the markup text?  Wow.
Note that something like this might do some weird things overall, since 
the <img ...> tag is normally inline and not block markup and the 
<div>s are making this into a block.  I haven't read the alistapart.com
article--would <span>s work as well as <div>s?

And, when you say "it didn't work", what exactly doesn't work?
Does it not produce the HTML you expect, or is it that it produces
the correct HTML but doesn't render properly, or what?

It may also be that PmWiki's automatic image floating is causing the
problem.  You might try:

   $UrlImgFmt = "<div class='alpha-shadow'><div><img src='\$Url'
     alt='' ></div></div>";

It seems to me like it ought to be possible to do what you're trying
to do without modifying pmwiki.php, if it's at all possible in HTML.

Pm




More information about the pmwiki-users mailing list