Using The Rollover Images Function
From PhpCOIN Documentation
You may enable the Rollover Images Functions by editing "# Use Rollover Images" switch in the config.php file for the theme you are using. Please note that this is theme-specific, so if you switch themes you will have to edit the config.php file for the new theme as well.
- Only a small sample of alternative rollover images are supplied - you should be prepared to create your own rollover images as required.
- Only the main horizontal menu and the logged-in user menu are coded to use rollover images. No other buttons use the code to utilize rollover images. The four default themes do have definitions in their config.php file for rollover images for some other buttons, such as the footer buttons on listings, but those rollovers were never implemented.
Rollover Enabling Other Images
If you want rollovers for other images, you would need to do three things:
- Create the image (if necessary)
- Edit each line in the config.php file to reflect the file name for your new rollover button. Rollover buttons are identified by the _MO suffix for each $_TCFG (You will see most of the definitions are set to use the same image for both mouse over and mouse out in the default file)
- Edit each call to do_nav_link() in phpCOIN source code where you want to enable rollovers
To utilize a mouse-over image for the listings "admin" footer menu button for instance:
1: Create the image and save it in the theme's /nav directory. In our example, we will call the new image "n_med_admin2.gif"
2: Edit the theme's config.php file so the button has both a regular image and a rollover image defined
# This definition is already in the themes config.php $_TCFG['_IMG_ADMIN_M'] = $_PARM_PREFIX.'n_med_admin.gif' .'" alt="'.$_LANG['_THEME']['ALT_IMG_ADMIN_M'].'"'.$_PARM_SUFFIX; // Image URL for: Admin Button (medium) # This definition must be added to the themes config.php $_TCFG['_IMG_ADMIN_M_MO'] = $_CCFG['_PKG_URL_THEME_IMGS'] .'nav/'.'n_med_admin2.gif'; // Image URL for: Rollover Admin Button (medium)
3: Edit phpCOIN source code in each listing where you want the rollover image. Most buttons are built by calling do_nav_link(LINK, IMAGENAME, NULL). Change it to use five parameters instead of three: do_nav_link(LINK, IMAGENAME, ROLLOVERIMAGENAME, TARGET, BUTTONID). The ROLLOVERIMAGENAME and the BUTTONID 'must be defined, or rollovers will not work: