eFiction 3.5.5
  • eFiction CMS 3.5.5
  • Installation
    • Installation
    • Initial Configuration
  • Admin Options
    • Admin Panel
    • Levels
  • Administration
    • Modules
    • Panels
    • Settings
    • Blocks
      • Adding a Block
    • Custom Pages
    • Page Links
    • Admins
    • Profile Information
    • Archive Maintenance
  • Translation
    • Translating eFiction
  • Developer stuff
    • Hooks
  • Skins
    • Images in Skins
  • Docs
    • Default panels
    • Creating Blocks
    • New Features
    • Skin Changes 2.0 to 3.0
    • Converting 1.1 skins to 3.0 skins
    • Creating Skins - WIP
Powered by GitBook
On this page
Export as PDF
  1. Skins

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.

PreviousHooksNextDefault panels

Last updated 3 years ago