[pmwiki-users] path locations in <!--function--> skin directive

viki.veeks at gmail.com viki.veeks at gmail.com
Sat Jan 22 13:31:29 CST 2011



On 01/21/2011 06:46 PM, Peter Bowers wrote:
> On Fri, Jan 21, 2011 at 1:43 PM, viki.veeks at gmail.com
> <viki.veeks at gmail.com>  wrote:
>> function myfunction() {
>> ...
>> ...
>> printf("<img src=\"%s/%s\"/>", $SkinDir, "myimage.png");
>> }
>>
>> printf prints<img src="/myimage.png"/>
>> instead of<img src="path/to/myskin/myimage.png"/>
>>
>> How should I reference the location of my skin inside of my function?
>
> Did you include:
>
> global $SkinDir;
>
> ?

Thank you :-)
myfunction now reads:

function myfunction() {
global $SkinDir;
...
...
printf("<img src=\"%s/%s\"/>", $SkinDir, "myimage.png");
}



More information about the pmwiki-users mailing list