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

viki.veeks at gmail.com viki.veeks at gmail.com
Fri Jan 21 06:43:53 CST 2011


Hello!

This is the definition of the $Skin variable in the local/config.php file:
$Skin = 'myskin'

In one of myskin's template files, the following <!--function--> skin 
directive is used:
<!--function:myfunction -->

The myfunction function is defined in the myskin.php file of 
pub/skins/myskin

The myfunction function deals with some image files in the 
pub/skins/myskin directory. I run into trouble when trying to reference 
the myskin location in the myfunction function:

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?

Thanks!!!

-i



More information about the pmwiki-users mailing list