[pmwiki-users] converting an Attach:this.png to <img>

adam overton a at plus1plus1plus.org
Mon Aug 16 17:54:53 CDT 2010


hi. i think i'm getting closer, but i still need some help.
i'm trying now to work with MakeLink to convert the Attach: code to the <img> url

the example on http://www.pmwiki.org/wiki/PmWiki/MakeLink makes it seem like this should be a simple conversion:

	Invocation:MakeLink($pagename, "Attach:foo.gif", , , $ImgTagFmt) 
	Result:"<img src='.../uploads/foo.gif' alt='' />"

but in my situation it doesn't seem to work out so happily in the end. on my system, if i do

MakeLink($pagename, "Attach:testimage.png", null, null, $ImgTagFmt);

the result is:
<img src='http://mysite.com/Attachtestimage/png' alt='$LinkAlt' title='$LinkAlt' />

and if i add the groupname, as in: 
MakeLink($pagename, "Attach:group/testimage.png", null, null, $ImgTagFmt);

... i get nothing

what's going wrong?
Thanks,
Adam


On 15 Aug 2010, at 8:11 PM, adam overton wrote:

> hi
> for the life of me, i can't remember -
> 
> on my page i have a PTV with:
> (:groupLogo: Attach:{$Group}./myimage.png:)
> 
> in my config, this ptv is being fed to my skin .tmpl (the idea is a logo or image that appears at the top of the page in this group), via:
> 
> $pageLogo = PageTextVar("$group.$DefaultName",'groupLogo');
> 
> however, what is displaying is:
> "Attach:{$Group}./myimage.png"
> ... rather than the <img src="..." />
> 
> i've tried converting this to it's proper <img src="..."> code by wrapping it in MarkupToHTML(), but it's not working. it just spits out
> 	Attach:{$Group}./myimage.png <:block>
> 
> 
> is there some other function i must wrap it in in order to spit out the <img> code?
> 
> thanks,
> adam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100816/af963b21/attachment.html>


More information about the pmwiki-users mailing list