[pmwiki-users] Placing an image with a link on a wiki page

Hans design5 at softflow.co.uk
Fri Dec 21 15:06:12 CST 2007


Friday, December 21, 2007, 8:44:27 PM, Sergio Lopes wrote:

> The logo, if placed in a normal HTML page would be placed using the
> following code:
> <a href="http://developer.berlios.de" title="BerliOS Developer">
>    <img src="http://developer.berlios.de/bslogo.php?group_id=9023"
> width="124px" height="32px" border="0" alt="BerliOS Developer Logo">
> </a>

> I tried placing the source link in a page but instead of an image,
> PmWiki will only show the link. BerliOS also needs the image to have a
> link with the project's id so that they can collect statistics for the
> project and that is also something I'm getting trouble to set up.

> Is there any way I can accomplish this request?

you can define a custom markup like this:

Markup('bslogo', '>block', '/\\(:bslogo:\\)/', '
    <img src="http://developer.berlios.de/bslogo.php?group_id=9023"/>
');

and use in the wiki page: (:bslogo:)

Or if you need to specify different id numbers:

Markup('bslogo2', '>block', '/\\(:bslogo\\s*(\\d+)\\s?:\\)/', "
    <img src='http://developer.berlios.de/bslogo.php?group_id=".PSS('$1')."'/>
");

and use (:bslogo 9023:) or any other number id.


  ~Hans




More information about the pmwiki-users mailing list