New Zenner
- Join Date:
- Feb 2006
- Posts:
- 11
- Plugin Contributions:
- 0
overLIB - HowTo?
Hi!
This one is per request.
How do you implement overLIB in Zen-Cart? This is how I did it...
Installation:
- Download the overLIB package from http://www.bosrup.com/web/overlib/?Download
- Extract the files and copy overlib.js to includes/templates/template_default/jscript/ directory
- IMPORTANT: Rename overlib.js to jscript_overlib.js
- IMPORTANT: Copy includes/templates/template_default/common/tpl_header.php to includes/templates/my_template/common/ directory
- Edit includes/templates/my_template/common/tpl_header.php
5a) Find text: <!--bof-header logo and navigation display-->
5b) On the next row (before start-php-tag) insert: <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
5c) Save
Now, implemetation:
6) Choose a text, it might be the header of the sideboxes, the site's slogan, image or whatever as long as you can apply the anchor tag around it.
7a) Type before item selected in 6) <a href="javascript:void(0)" onMouseOver="return overlib('This text shows on mouseover');" onMouseOut="return nd();">
7b) Type after item selected in 6) </a>
7c) Save and test
NOTE: In 7a, the default action when clicking on a overLIBbed link is "no action". The text "javascript:void(0)" can (and sometimes is desired) to link to a page. That's OK - just replace it with your ULR and click it.
Common trap - try to avoid it:
Since it's a javascript function and you might want to insert the ' or the " qutoation character in the text 'This text shows on mouseover' it will generate a javascript-error.
Common trap solution:
Use javascript in appropriate place, i.e.
Replace the text 'This text shows on mouseover' (including the ') with display_text and you'r on the road again.
Customizing overLIB:
RTFM (Read The Fine Manual) @ http://www.bosrup.com/web/overlib/?Documentation
Regards
//
// God is real,
// unless declared integer.
//