Archive /
Script-GeneratedImages
Question
How can we include an image pushed by a script (like a counter) in a wiki page?
Answer
Two ways: the safe one and the quick one :)
Quick
e.g.
http://sourceforge.net/sflogo.php?group_id=1&type=5&xxx=.png
That simply adds a new, bogus parameter to the GET part of the URL and fools the wiki parser into seeing images.
Safe
However, some scripts may be picky about what parameters they will accept. In that case, create a special markup in local/config.php for each kind of script-generated image - see example for (:sf:) below:
Markup('sf', 'directives', '/\\(:sf:\\)/e',"Keep(\"<img src='http://sourceforge.net/sflogo.php?group_id=1&type=5'/>\")");
Notes and Comments
Seems to me this question is answered adequately (and more completely) in the Notes section of Images
TonyColley July 24, 2006, at 10:45 AM
2005-04-10 newmy Thank you for this posting. I just want to give my googlesearch markup back to the community. Here it is:
Markup('googlesearch', 'directives', '/\\(:googlesearch:\\)/e',"Keep(\" <FORM method=GET action='http://www.google.de/search'> <TABLE><tr><td> <A HREF='http://www.google.de'> <IMG SRC='http://www.google.de/logos/Logo_40wht.gif' border='0' ALT='Google' align='absmiddle'></A> <INPUT TYPE=text name=q size=20 maxlength=255 value=''> <INPUT TYPE=hidden name=hl value=de> <INPUT type=submit name=btnG VALUE='Google Search'> </td></tr></TABLE> </FORM> \")");
See Also
Contributors
- Pierre Rouzeau
- Pm
Category: Images