I've tried to integrate XS_Dropdown_&_OnClick_Menus_1.1.0 into IP 1.2.0.27 as I did in previous versions. I've removed the following from overall_header.tpl, which did removed the menu options on the header:
- <tr>
- <td class="forum-buttons" colspan="3" width="100%">
- <a href="{FULL_SITE_PATH}{U_PORTAL}">{L_HOME}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <a href="{FULL_SITE_PATH}{U_INDEX}">{L_INDEX}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- BEGIN switch_upi2db_off -->
- <a href="{FULL_SITE_PATH}{U_SEARCH_NEW}">{L_NEW2}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- END switch_upi2db_off -->
- <!-- BEGIN switch_upi2db_on -->
- <span style="vertical-align:top;">{L_POSTS}: </span><a href="{FULL_SITE_PATH}{U_SEARCH_NEW}">{L_NEW2}</a><span style="vertical-align:top;"> • </span>{L_DISPLAY_U}<span style="vertical-align:top;"> • </span>{L_DISPLAY_M}<span style="vertical-align:top;"> • </span>{L_DISPLAY_P} <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- END switch_upi2db_on -->
- <!-- BEGIN switch_user_logged_in -->
- <a href="{FULL_SITE_PATH}{U_PROFILE}">{L_PROFILE}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- END switch_user_logged_in -->
- <a href="{FULL_SITE_PATH}{U_SEARCH}">{L_SEARCH}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <a href="{FULL_SITE_PATH}{U_FAQ}">{L_FAQ}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- BEGIN switch_user_logged_out -->
- <a href="{FULL_SITE_PATH}{U_REGISTER}">{L_REGISTER}</a> <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" />
- <!-- END switch_user_logged_out -->
- <a href="{FULL_SITE_PATH}{U_LOGIN_LOGOUT}">{L_LOGIN_LOGOUT2}</a>
- </td>
- </tr>
and inserted the following 3 sections of code:
- <!-- [BEGIN] XS Dropdown & OnClick Menus -->
- <script type="text/javascript">
- /***********************************************
- * AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
- * This notice MUST stay intact for legal use
- * Visit http://www.dynamicdrive.com/ for full source code
- ***********************************************/
- //Contents for Main Links
- var menu1=new Array()
- menu1[0]='<a href="http://www.mysite.com/forum/index.php"><img src="images/icon_dot.gif"> <alt title="Home" /> Home</a>'
- //Contents for Help
- var menu2=new Array()
- menu2[0]='<a href="http://www.mysite.com/forum/contact_us.php"><img src="images/icon_dot.gif"> <alt title="Contact us" /> Contact us</a>'
- //Contents for login and my links
- var menu3=new Array()
- menu3[0]='<a href="{U_LOGIN_LOGOUT}"> <img src="images/icon_dot.gif"> <alt title="Log in / Log out" /> Log in / Log out </a>'
- var menuwidth='150px' //default menu width
- var menubgcolor='#F8F8F8' //menu bgcolor
- var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
- var hidemenu_onclick="yes" //hide menu when user clicks within menu?
- /////No further editting needed
- var ie4=document.all
- var ns6=document.getElementById&&!document.all
- if (ie4||ns6)
- document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
- function getposOffset(what, offsettype){
- var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
- var parentEl=what.offsetParent;
- while (parentEl!=null){
- totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
- parentEl=parentEl.offsetParent;
- }
- return totaloffset;
- }
- function showhide(obj, e, visible, hidden, menuwidth){
- if (ie4||ns6)
- dropmenuobj.style.left=dropmenuobj.style.top=-500
- if (menuwidth!=""){
- dropmenuobj.widthobj=dropmenuobj.style
- dropmenuobj.widthobj.width=menuwidth
- }
- if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
- obj.visibility=visible
- else if (e.type=="click")
- obj.visibility=hidden
- }
- function iecompattest(){
- return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
- }
- function clearbrowseredge(obj, whichedge){
- var edgeoffset=0
- if (whichedge=="rightedge"){
- var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
- dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
- if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
- edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
- }
- else{
- var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
- var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
- dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
- if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
- edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
- if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
- edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
- }
- }
- return edgeoffset
- }
- function populatemenu(what){
- if (ie4||ns6)
- dropmenuobj.innerHTML=what.join("")
- }
- function dropdownmenu(obj, e, menucontents, menuwidth){
- if (window.event) event.cancelBubble=true
- else if (e.stopPropagation) e.stopPropagation()
- clearhidemenu()
- dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
- populatemenu(menucontents)
- if (ie4||ns6){
- showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
- dropmenuobj.x=getposOffset(obj, "left")
- dropmenuobj.y=getposOffset(obj, "top")
- dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
- dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
- }
- return clickreturnvalue()
- }
- function clickreturnvalue(){
- if (ie4||ns6) return false
- else return true
- }
- function contains_ns6(a, b) {
- while (b.parentNode)
- if ((b = b.parentNode) == a)
- return true;
- return false;
- }
- function dynamichide(e){
- if (ie4&&!dropmenuobj.contains(e.toElement))
- delayhidemenu()
- else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
- delayhidemenu()
- }
- function hidemenu(e){
- if (typeof dropmenuobj!="undefined"){
- if (ie4||ns6)
- dropmenuobj.style.visibility="hidden"
- }
- }
- function delayhidemenu(){
- if (ie4||ns6)
- delayhide=setTimeout("hidemenu()",disappeardelay)
- }
- function clearhidemenu(){
- if (typeof delayhide!="undefined")
- clearTimeout(delayhide)
- }
- if (hidemenu_onclick=="yes")
- document.onclick=hidemenu
- </script>
- <!-- [END] XS Dropdown & OnClick Menus -->
- <script type="text/javascript">
- <!--
- function help_popup(help_key)
- {
- window.open('dl_help.php?help_key=' + help_key, '_blank', 'height=400,resizable=yes,width=550');;
- }
- //-->
- </script>
- <SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
- <!-- Popup Generator -->
- <!--
- var win=null;
- function NewWindow(mypage,myname,w,h,pos,infocus){
- if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
- if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
- else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
- settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
- win.focus();}
- // -->
- </script>
- <SCRIPT LANGUAGE="Javascript">
- var win = null;
- function Gk_PopTart(mypage,myname,w,h,scroll)
- {
- LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
- TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
- settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes';
- win = window.open(mypage,myname,settings);
- }
- </SCRIPT>
- <SCRIPT LANGUAGE="Javascript">
- var win = null;
- function Gk_PopTart(mypage,myname,w,h,scroll)
- {
- LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
- TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
- settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=yes';
- win = window.open(mypage,myname,settings);
- }
- </SCRIPT>
- <SCRIPT LANGUAGE='JAVASCRIPT' TYPE='TEXT/JAVASCRIPT'>
- <!-- Popup Generator -->
- <!--
- var win=null;
- function NewWindow(mypage,myname,w,h,pos,infocus){
- if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
- if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
- else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
- settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=yes,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
- win.focus();}
- // -->
- </script>
- </head>
- <!-- [BEGIN] XS Dropdown & OnClick Menus -->
- <a href="javascript:void(1);" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '180px')" onMouseout="delayhidemenu()">Main Links</a> <img src="images/menu_sep.png"/>
- <a href="javascript:void(2);" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '180px')" onMouseout="delayhidemenu()">Help</a> <img src="images/menu_sep.png"/>
- <a href="javascript:void(3);" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '180px')" onMouseout="delayhidemenu()">Login / My Links</a> <img src="images/menu_sep.png"/>
- <!-- [END] XS Dropdown & OnClick Menus -->
It does create the menu, but it's above the logo instead of under it (see below), plus it's aligned on the left instead of in the middle. Can anyone help?
