Images in Skins
Author: Tammy, source: https://efiction.org/community/info-tutorials/images-in-skins/
When you add images to your skins use the {skindir} variable to point to the correct location. You cannot use a relative path to the image because not all the pages are in the same directory (such as a number of the challenges pages, poll and shoutbox archives, etc)
<img src="'skins/MYSKIN/images/Banner.jpg'>"
Wrong! This will break on some of your pages.
<img src="'{skindir}/images/Banner.jpg'>"
Right! The script will automatically fill in the correct relative path to the skin directory.
<img src="' http://www.yoursite.com/skins/images/Banner.jpg '>"
Also right. You can also use the complete URL to the image like this.
When you want to customize the stars, like/dislike, featured/retired, etc. graphics using the variables.php you should use the PHP variable $skindir in the same way.
$star = "<img src="'skins/MYSKIN/images/star.gif'" alt='"._STAR."'>";
Wrong! This will break in places.
$star = "<img src="'".$skindir."/images/star.gif'" alt='"._STAR."'>";
Right! This will automatically supply the correct relative path.
Last updated