View Single Post
  #5  
Old 03-18-2006, 02:53 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

QVS, yes i got it to work on 4.0.18, the above code had some errors

You can see the finished product at http://www.shisha.co.uk/shopcart/home.php and just right click on the page

I made it a little more simple, only 2 bits of code needed.
Make sure you update your /shopcart/skin1/skin1.css as per instruction above.

Then make a /shopcart/skin1/body_menu.tpl file

Code:
<div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none> <div class="menuitems" url="{$xcart}/shopcart/help.php">Help</div> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=about">About Us</div> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=contactus&mode=update">Contact Us</div> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=FAQ">FAQ</div> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=business">Privacy Statement</div> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=conditions">Terms & Conditions</div> <hr> <div class="menuitems" url="{$xcart}/shopcart/help.php?section=Password_Recovery">Forgot Password</div> </div> {literal} <script language="JavaScript1.2"> //set this variable to 1 if you wish the URLs of the highlighted menu to be displayed in the status bar var display_url=0 var ie5=document.all&&document.getElementById var ns6=document.getElementById&&!document.all if (ie5||ns6) var menuobj=document.getElementById("ie5menu") function showmenuie5(e){ //Find out how close the mouse is to the corner of the window var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY //if the horizontal distance isn't enough to accomodate the width of the context menu if (rightedge<menuobj.offsetWidth) //move the horizontal position of the menu to the left by it's width menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth else //position the horizontal position of the menu where the mouse was clicked menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX //same concept with the vertical position if (bottomedge<menuobj.offsetHeight) menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight else menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY menuobj.style.visibility="visible" return false } function hidemenuie5(e){ menuobj.style.visibility="hidden" } function highlightie5(e){ var firingobj=ie5? event.srcElement : e.target if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){ if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node firingobj.style.backgroundColor="highlight" firingobj.style.color="white" if (display_url==1) window.status=event.srcElement.url } } function lowlightie5(e){ var firingobj=ie5? event.srcElement : e.target if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){ if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node firingobj.style.backgroundColor="" firingobj.style.color="black" window.status='' } } function jumptoie5(e){ var firingobj=ie5? event.srcElement : e.target if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){ if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode if (firingobj.getAttribute("target")) window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target")) else window.location=firingobj.getAttribute("url") } } if (ie5||ns6){ menuobj.style.display='' document.oncontextmenu=showmenuie5 document.onclick=hidemenuie5 } </script> {/literal}

After that just place the { include file="body_menu.tpl" } in your /shopcart/skin1/customer/home.tpl file

This is where i placed my code:
Code:
<BODY leftmargin="0" topmargin="0" rightmargin="0" bottomargin="0" marginwidth="0" marginheight="0" {if $js_enabled}onLoad="{if $body_onload ne ''}{$body_onload};{/if}MM_preloadImages({section loop=8 name='cat_images'}'{$ImagesDir}/custom/cat_item{$smarty.section.cat_images.iteration}','{$ImagesDir}/custom/cat_itemon{$smarty.section.cat_images.iteration}'{if not $smarty.section.cat_images.last},{/if}{/section});"{/if}> {assign var="fancy_left" value=9} {assign var="fancy_width" value=140} {assign var="fancy_ie_background_color" value="D9E9F5"} { include file="rectangle_top.tpl" } { include file="head.tpl" } {if $active_modules.SnS_connector} {include file="modules/SnS_connector/header.tpl"} {/if} { include file="body_menu.tpl" } <TABLE border="0" width="100%" cellpadding="0" cellspacing="0" align="center"> <TR> <TD width="6"></TD> <TD width="165" valign="top"> {if $categories ne "" and ($active_modules.Fancy_Categories ne "" or $config.General.root_categories eq "Y" or $subcategories ne "")} { include file="customer/categories.tpl" } {/if}
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote