Jump to content
chrisnpg

Adding a menu tab with dropdown in backend/admin side

Recommended Posts

I have searched the forums and can not find anything close to this.

 

I want to add a few tabs on the menu in the admin side. It would be right after the "Help" tab.

I have opened up /client/admin/templates/v4/header.tpl file and added a few lines right under the others for the menu.

 

<li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu10, '');" onmouseout="this.className='navbutton';delayhidemenu();">Admin Portals</li>

Then opened up /client/admin/javascript/menu.js

 

I added in my code of

 

var menu10=new Array()
menu10[0]='<a href="/mainp/index.php" target="_blank">WP-Front Side</a>'
menu10[1]='<a href="/mainp/wp-admin" target="_blank">WP Admin Login</a>'
menu10[2]='<a href="http://mydomainname.info/stats">Check for Updates</a>'

Saved my changes and logged in and my new tab shows up but no drop down.

I rechecked all lines of code and all looks right.

Can I not use menu10 "two numbers" in the menu.js file?

 

If I change my option for menu? in the header.tpl file, the new tab has a drop down of what ever number I put in say like 2. Than I have the same drop down menu of tab "Clients". So I know that the tab code works, its just getting the menu.js code to work.

 

I am not sure if there is some other file I need to edit or add code to. All I can see is the two files and should be good to go.

 

I started to play around a bit and seen that menu6 in the menu.js file is not in use. So I changed my code in the header.tpl file to match and it worked but of course it was with the data already there for menu6. So I just changed the code to match what I need and it does not work.

So there must be somewhere else I need to change.

Anyone have any ideas as to what else needs changed and where?

 

 

 

Below here I am putting the full code of the two files that I am changing. Sorry for the long scroll.

 

This one is for menu.js

var menu1=new Array()
menu1[0]='<a href="index.php">Admin Home</a>'
menu1[1]='<a href="myaccount.php">My Account</a>'
menu1[2]='<a href="logout.php">Logout</a>'

var menu2=new Array()
menu2[0]='<a href="clients.php">View/Search Clients</a>'
menu2[1]='<a href="clientsadd.php">Add New Client</a>'
menu2[2]='<a href="massmail.php">Mass Mail Clients</a>'
menu2[3]='<a href="clientshostinglist.php">List All Products/Services</a>'
menu2[4]='<a href="clientshostinglist.php?type=hostingaccount">List Hosting Accounts</a>'
menu2[5]='<a href="clientshostinglist.php?type=reselleraccount">List Reseller Accounts</a>'
menu2[6]='<a href="clientshostinglist.php?type=server">List Server Accounts</a>'
menu2[7]='<a href="clientshostinglist.php?type=other">List Other Services</a>'
menu2[8]='<a href="clientsaddonslist.php">List Account Addons</a>'
menu2[9]='<a href="clientsdomainlist.php">List Domains</a>'
menu2[10]='<a href="cancelrequests.php">Cancellation Requests</a>'
menu2[11]='<a href="affiliates.php">Manage Affiliates</a>'

var menu3=new Array()
menu3[0]='<a href="orders.php">List All Orders</a>'
menu3[1]='<a href="orders.php?status=Pending">List Pending Orders</a>'
menu3[2]='<a href="orders.php?status=Active">List Active Orders</a>'
menu3[3]='<a href="orders.php?status=Fraud">List Fraud Orders</a>'
menu3[4]='<a href="orders.php?status=Cancelled">List Cancelled Orders</a>'
menu3[5]='<a href="ordersadd.php">Place New Order</a>'

var menu4=new Array()
menu4[0]='<a href="transactions.php">View Transaction List</a>'
menu4[1]='<a href="offlineccprocessing.php">Offline CC Processing</a>'
menu4[2]='<a href="gatewaylog.php">View Gateway Log</a>'
menu4[3]='<a href="invoices.php">List All Invoices</a>'
menu4[4]='<a href="invoices.php?status=Unpaid"> - Unpaid Invoices</a>'
menu4[5]='<a href="invoices.php?status=Paid"> - Paid Invoices</a>'
menu4[6]='<a href="invoices.php?status=Cancelled"> - Cancelled Invoices</a>'
menu4[7]='<a href="quotes.php">List All Quotes</a>'
menu4[8]='<a href="quotes.php?validity=Valid"> - Valid Quotes</a>'
menu4[9]='<a href="quotes.php?validity=Expired"> - Expired Quotes</a>'
menu4[10]='<a href="quotes.php?action=manage"> - Create New</a>'


var menu5=new Array()
menu5[0]='<a href="supportannouncements.php">Announcements</a>'
menu5[1]='<a href="supportdownloads.php">Downloads</a>'
menu5[2]='<a href="supportkb.php">Knowledgebase</a>'
menu5[3]='<a href="supporttickets.php">Support Tickets</a>'
menu5[4]='<a href="supporttickets.php?action=open">Open New Ticket</a>'
menu5[5]='<a href="supportticketpredefinedreplies.php">Predefined Replies</a>'
menu5[6]='<a href="supporttickets.php?view=flagged"> - My Flagged Tickets</a>'
menu5[7]='<a href="supporttickets.php?view=active"> - All Active Tickets</a>'
menu5[8]='<a href="supporttickets.php?view=Open"> - Open</a>'
menu5[9]='<a href="supporttickets.php?view=Answered"> - Answered</a>'
menu5[10]='<a href="supporttickets.php?view=Customer-Reply"> - Customer-Reply</a>'
menu5[11]='<a href="supporttickets.php?view=On Hold"> - On Hold</a>'
menu5[12]='<a href="supporttickets.php?view=In Progress"> - In Progress</a>'
menu5[13]='<a href="supporttickets.php?view=Closed"> - Closed</a>'
menu5[14]='<a href="networkissues.php">Network Issues</a>'
menu5[15]='<a href="networkissues.php"> - Open</a>'
menu5[16]='<a href="networkissues.php?view=scheduled"> - Scheduled</a>'
menu5[17]='<a href="networkissues.php?view=resolved"> - Resolved</a>'
menu5[18]='<a href="networkissues.php?action=manage"> - Add New</a>'

var menu6=new Array()
menu6[0]='<a href="http://webhostgalaxy.com/mainp/index.php" target="_blank">WP-Front Side</a>'
menu6[1]='<a href="/mainp/wp-admin" target="_blank">WP Admin Login</a>'
menu6[2]='<a href="systemupdates.php">Check for Updates</a>'

var menu7=new Array()
menu7[0]='<a href="addonmodules.php">Addon Modules</a>'
menu7[1]='<a href="utilitieslinktracking.php">Link Tracking</a>'
menu7[2]='<a href="browser.php">Browser</a>'
menu7[3]='<a href="calendar.php">Calendar</a>'
menu7[4]='<a href="todolist.php">To-Do List</a>'
menu7[5]='<a href="whois.php">WHOIS Lookup</a>'
menu7[6]='<a href="utilitiesresolvercheck.php">Domain Resolver Check</a>'
menu7[7]='<a href="systemintegrationcode.php">Integration Code</a>'
menu7[8]='<a href="whmimport.php">WHM Import Script</a>'
menu7[9]='<a href="systemdatabase.php">Database Status</a>'
menu7[10]='<a href="systemcleanup.php">System Cleanup</a>'
menu7[11]='<a href="systemphpinfo.php">PHP Info</a>'
menu7[12]='<a href="systemactivitylog.php">Activity Log</a>'
menu7[13]='<a href="systemadminlog.php">Admin Log</a>'
menu7[14]='<a href="systememaillog.php">Email Message Log</a>'
menu7[15]='<a href="systemmailimportlog.php">Ticket Mail Import Log</a>'
menu7[16]='<a href="systemwhoislog.php">WHOIS Lookup Log</a>'

var menu8=new Array()
menu8[0]='<a href="configgeneral.php">General Settings</a>'
menu8[1]='<a href="configadminroles.php">Administrator Roles</a>'
menu8[2]='<a href="configadmins.php">Administrators</a>'
menu8[3]='<a href="configservers.php">Servers</a>'
menu8[4]='<a href="configauto.php">Automation Settings</a>'
menu8[5]='<a href="configgateways.php">Payment Gateways</a>'
menu8[6]='<a href="configtax.php">Tax Setup</a>'
menu8[7]='<a href="configemailtemplates.php">Email Templates</a>'
menu8[8]='<a href="configproducts.php">Products/Services</a>'
menu8[9]='<a href="configproductoptions.php">Configurable Options</a>'
menu8[10]='<a href="configaddons.php">Product Addons</a>'
menu8[11]='<a href="configpromotions.php">Promotions/Coupons</a>'
menu8[12]='<a href="configdomains.php">Domain Pricing</a>'
menu8[13]='<a href="configticketdepartments.php">Support Departments</a>'
menu8[14]='<a href="configticketspamcontrol.php">Spam Control</a>'
menu8[15]='<a href="configbannedips.php">Banned IPs</a>'
menu8[16]='<a href="configbannedemails.php">Banned Emails</a>'
menu8[17]='<a href="configregistrars.php">Domain Registrars</a>'
menu8[18]='<a href="configfraud.php">Fraud Protection</a>'
menu8[19]='<a href="configcustomfields.php">Custom Client Fields</a>'
menu8[20]='<a href="configbackups.php">Database Backups</a>'

var menu9=new Array()
menu9[0]='<a href="http://wiki.whmcs.com/" target="_blank">Documentation</a>'
menu9[1]='<a href="systemlicense.php">License Information</a>'
menu9[2]='<a href="licenseerror.php?licenseerror=change">Change License Key</a>'
menu9[3]='<a href="systemupdates.php">Check for Updates</a>'
menu9[4]='<a href="systemsupportrequest.php">Support Request</a>'
menu9[5]='<a href="http://dev.whmcs.com/" target="_blank">Dev Tracker</a>'
menu9[6]='<a href="http://forum.whmcs.com/" target="_blank">Community Forums</a>'

/* var menu6=new Array()
menu6[0]='<a href="reports.php?report=orders">Monthly Signups</a>'
menu6[1]='<a href="reports.php?report=productssales">Products Sales Sum.</a>'
menu6[2]='<a href="reports.php?report=recurringincomesummary">Recurring Income Sum.</a>'
menu6[3]='<a href="reports.php?report=serverrevenue">Server Revenue Breakd.</a>'
menu6[4]='<a href="reports.php?report=supporttickets">Support Tickets Sum.</a>'
menu6[5]='<a href="reports.php?report=promotionssummary">Promotions Summary</a>'
menu6[6]='<a href="reports.php?report=usagesummary">Disk Space & BW Usage</a>'
menu6[7]='<a href="reports.php?report=dailyperformance">Daily Performance</a>'
menu6[8]='<a href="reports.php?report=top10clientsinvoices">Top 10 Clients by Income</a>'
The above code for menu 6 is not being used in whmcs that I could see. So I marked this out and put in the code that I
needed to use for the wordpress tab in the admin area. So if there is any problems after taking it out just put it back in.
*/

var menuwidth='170px' //default menu width
var menubgcolor='#E7EDF4'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

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="-500px"
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

This code is for file /client/admin/templates/v4/header.tpl

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<title>WHMCS - {$pagetitle}</title>
<link href="templates/v4/style.css" rel="stylesheet" type="text/css" />
<link href="../includes/jscript/css/ui.all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../includes/jscript/jquery.js"></script>
<script type="text/javascript" src="../includes/jscript/jqueryui.js"></script>
<script type="text/javascript" src="../includes/jscript/adminmenu.js"></script>
<script type="text/javascript" src="../includes/jscript/adminsearchbox.js"></script>

<!-- 4 lines added for light window where needed. Chris -->
<script type="text/javascript" src="/mainp/wp-includes/js/lightwindow/javascript/prototype.js"></script>
<script type="text/javascript" src="/mainp/wp-includes/js/lightwindow/javascript/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="/mainp/wp-includes/js/lightwindow/javascript/lightwindow.js"></script>
<link rel="stylesheet" href="/mainp/wp-includes/js/lightwindow/css/lightwindow.css" type="text/css" media="screen" />

{literal}<script>
 $(document).ready(function(){
    $("#intellisearchval").keyup(function () {
       var intellisearchlength = $("#intellisearchval").val().length;
       if (intellisearchlength>2) {
       $.post("search.php", { intellisearch: "true", value: $("#intellisearchval").val() },
         function(data){
           $("#searchresults").html(data);
           $("#searchresults").slideDown("slow");
         });
       }
   });
   $("#intellisearchcancel").click(function () {
       $("#intellisearchval").val("");
       $("#searchresults").slideUp("slow");
   });
   $(".datepick").datepicker({
       dateFormat: "{/literal}{$datepickerformat}{literal}",
       showOn: "button",
       buttonImage: "images/showcalendar.gif",
       buttonImageOnly: true,
       showButtonPanel: true
   });
   {/literal}{$jquerycode}{literal}
 });{/literal}
 {$jscode}
</script>
</head>
<body>
<div id="topnav">
 <div id="welcome">Welcome Back <strong>{$admin_username}</strong>  - <a href="../" title="Client Area">Client Area</a> | <a href="myaccount.php" title="My Account">My Account</a> | <a href="logout.php" title="Logout">Logout</a></div>
 <div id="date">{$smarty.now|date_format:"%A | %d %B %Y | %H:%M %p"}</div>
 <div class="clear"></div>
</div>
<div id="logo_container"><img class="banner" src="templates/v4/images/logo.gif" alt="WHMCS" width="400" height="115" border="0" />
 <div id="intellisearch"><strong>Intelligent Search</strong><br />
   <div style="padding-top: 5px;" align="center">
     <input type="text" id="intellisearchval" />
     <img src="images/delete.gif" alt="Cancel" width="16" height="16" class="absmiddle" id="intellisearchcancel" />
     </div>
   <div align="left" id="searchresults"></div>
 </div>
</div>
<div id="navigation">
 <ul>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu1, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='index.php'"><a href="index.php" title="Home">Home</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu2, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='clients.php'"><a href="clients.php" title="Clients">Clients</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu3, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='orders.php'"><a href="orders.php" title="Orders">Orders</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu4, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='transactions.php'"><a href="transactions.php" title="Billing">Billing</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu5, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='supportcenter.php'"><a href="supportcenter.php" title="Support">Support</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';" onmouseout="this.className='navbutton';" onclick="window.location='reports.php'"><a href="reports.php" title="Reports">Reports</a></li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu7, '');" onmouseout="this.className='navbutton';delayhidemenu();">Utilities</li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu8, '');" onmouseout="this.className='navbutton';delayhidemenu();">Setup</li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu9, '');" onmouseout="this.className='navbutton';delayhidemenu();">Help</li>
   <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu6, '');" onmouseout="this.className='navbutton';delayhidemenu();">Admin Portals</li>

   </ul>
</div>
<div id="content_container">
 <div id="left_side">

{include file="v4/sidebar.tpl"}

 </div>
 <div id="content">
   <h1>{$pagetitle}</h1>
   <div id="content_padded">

Share this post


Link to post
Share on other sites

one thing I see you have 2 x

/* var menu6=new Array()

 

 

1st for:

var menu6=new Array()
menu6[0]='<a href="http://webhostgalaxy.com/mainp/index.php" target="_blank">WP-Front Side</a>'
menu6[1]='<a href="/mainp/wp-admin" target="_blank">WP Admin Login</a>'
menu6[2]='<a href="systemupdates.php">Check for Updates</a>'

 

 

 

2nd for:

/* var menu6=new Array()
menu6[0]='<a href="reports.php?report=orders">Monthly Signups</a>'
menu6[1]='<a href="reports.php?report=productssales">Products Sales Sum.</a>'
menu6[2]='<a href="reports.php?report=recurringincomesummary">Recurring Income Sum.</a>'
menu6[3]='<a href="reports.php?report=serverrevenue">Server Revenue Breakd.</a>'
menu6[4]='<a href="reports.php?report=supporttickets">Support Tickets Sum.</a>'
menu6[5]='<a href="reports.php?report=promotionssummary">Promotions Summary</a>'
menu6[6]='<a href="reports.php?report=usagesummary">Disk Space & BW Usage</a>'
menu6[7]='<a href="reports.php?report=dailyperformance">Daily Performance</a>'
menu6[8]='<a href="reports.php?report=top10clientsinvoices">Top 10 Clients by Income</a>'
The above code for menu 6 is not being used in whmcs that I could see. So I marked this out and put in the code that I
needed to use for the wordpress tab in the admin area. So if there is any problems after taking it out just put it back in.
*/

 

and menu6 is reports

Share this post


Link to post
Share on other sites

yes I put the /* */ in there to comment it out. I did that so I could test things with using menu6 but did not want to delete the code that was there for it.

 

I tested all of those links for menu6 and all had errors, and I did not see it used anywhere in the header.tpl file.

 

So other than that what could be wrong?

 

Can menu10 or menu22 or what ever number I want to use, can it be used?

And if so why dont the drop down display?

Share this post


Link to post
Share on other sites
yes I put the /* */ in there to comment it out. I did that so I could test things with using menu6 but did not want to delete the code that was there for it.

 

I tested all of those links for menu6 and all had errors, and I did not see it used anywhere in the header.tpl file.

 

So other than that what could be wrong?

 

Can menu10 or menu22 or what ever number I want to use, can it be used?

And if so why dont the drop down display?

 

this is just a example. cange as needed.

 

 

1. Open menu.js located in your whmcsdirectory/admin/javascript directory.

 

Add the following menu items after menu9:

 

var menu10=new Array()
menu10[0]='<a href="addonmodules.php?module=enom_extended">Home</a>'
menu10[1]='<a href="addonmodules.php?module=enom_extended&page=settings">Settings</a>'
menu10[2]='<a href="addonmodules.php?module=enom_extended&page=domains">Domains</a>'
menu10[3]='<a href="addonmodules.php?module=enom_extended&page=domaindetail">Domain Detail</a>'
menu10[4]='<a href="addonmodules.php?module=enom_extended&page=transfers">Transfers</a>'
menu10[5]='<a href="addonmodules.php?module=enom_extended&page=sslcerts">SSL Certificates</a>'
menu10[6]='<a href="addonmodules.php?module=enom_extended&page=refillaccount">Refill Account</a>'
menu10[7]='<a href="addonmodules.php?module=enom_extended&page=utilities">Utilities</a>'
menu10[8]='<a href="addonmodules.php?module=enom_extended&page=modconfig">Configuration</a>'

 

2. for v4 template:

Open header.tpl located in your whmcsdirectory/admin/templates/v4/ directory.

or

 

2. for original template:

Open header.tpl located in your whmcsdirectory/admin/templates/original/ directory.

 

search for "<span class="navbutton"" Add the following at the end of the list.

 

<span class="navbutton" onMouseOver="this.className='navbuttonover';dropdownmenu(this, event, menu10, '');" onMouseOut="this.className='navbutton';delayhidemenu();" onClick="window.location='addonmodules.php?module=enom_extended'">eNom</span>

 

3. If the menu does not show up you may need to clear your browser cache as well as empty your templates_c directory.

Share this post


Link to post
Share on other sites

so yes use menu10 put back menu6 as it was.

also it is not whmcsdirectory/admin/javascript now but includes/jscript/adminmenu.js

 

also ref menu 6:

 

you could change this:

 

    <li class="navbutton" onmouseover="this.className='navbuttonover';" onmouseout="this.className='navbutton';" onclick="window.location='reports.php'"><a href="reports.php" title="Reports">Reports</a></li>

 

to this:

 

    <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu6, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='reports.php'"><a href="reports.php" title="Reports">Reports</a></li>

 

then menu 6 Reports will then drop down to.

Edited by thehost5968

Share this post


Link to post
Share on other sites

That is something I forgot to do is clean out the templates_c folder.

 

Ok I changed the menu.js file back to the way it was and added in all the code for menu10.

Than I looked for "<span class="navbutton"" in the header.tpl file but not there.

I remembered seeing code like that in the topmenu.tpl and I added it to the end of it witch is after menu9. I did take out "onClick="window.location='addonmodules.php?module=enom_extended'">" as that is not needed.

So now I have a line added to the topmenu.tpl file that looks just like the others but showing as menu10. Gave it the matching name for the tab that is being added!

 

Changed my code in the header.tpl file to for the tab being added

 

<li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu10, '');" onmouseout="this.className='navbutton';delayhidemenu();">Admin Portals</li>

 

Cleaned out the templates_c folder and all my history in the browser and still the same.

The tab shows but no drop down menu.

I even went to another computer to test it and it does the samething.

Share this post


Link to post
Share on other sites

 

    <li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu6, '');" onmouseout="this.className='navbutton';delayhidemenu();" onclick="window.location='reports.php'"><a href="reports.php" title="Reports">Reports</a></li>

 

 

should be :

<li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu10, '');" onmouseout="this.className='navbutton';delayhidemenu();" onClick="window.location='addonmodules.php?module=enom_extended'"><a href="addonmodules.php?module=enom_extended" title="eNom">eNom</a></li>

Share this post


Link to post
Share on other sites
That is something I forgot to do is clean out the templates_c folder.

 

Ok I changed the menu.js file back to the way it was and added in all the code for menu10.

Than I looked for "<span class="navbutton"" in the header.tpl file but not there.

I remembered seeing code like that in the topmenu.tpl and I added it to the end of it witch is after menu9. I did take out "onClick="window.location='addonmodules.php?module=enom_extended'">" as that is not needed.

So now I have a line added to the topmenu.tpl file that looks just like the others but showing as menu10. Gave it the matching name for the tab that is being added!

 

Changed my code in the header.tpl file to for the tab being added

 

<li class="navbutton" onmouseover="this.className='navbuttonover';dropdownmenu(this, event, menu10, '');" onmouseout="this.className='navbutton';delayhidemenu();">Admin Portals</li>

 

Cleaned out the templates_c folder and all my history in the browser and still the same.

The tab shows but no drop down menu.

I even went to another computer to test it and it does the samething.

 

what version of WHMCS are you using?

 

V4 or V3

 

as V4 dones not have menu.js but has includes/jscript/adminmenu.js

Share this post


Link to post
Share on other sites

I am using the latest version.

 

Your Version 4.0.2

 

I did find the file includes/jscript/adminmenu.js and put my data in it and it works.

 

I just assumed that the changes needed to be under the admin dir.

 

Why did some of the admin / backend get moved out of the admin folder?

So do you know why the files that I was messing with are still included in the new version?

 

But anyways that fixed my problem.

 

I thank you very much for all your help.

Share this post


Link to post
Share on other sites

so the likes of jscript can be use site wide with out use admin in the link on the front end if you used then. and so we did not have to have 2 x of the same files this way is the better way.

 

If you mean topmenu.tpl they are not if you have then in your install I would say that when it was upgraded they where not removed now if you have this file or more then d/load a fresh set of v4 from whmcs clientarea and do a comparea and remove any old files as if you do not you may get some error if there are any conflicts with old and new.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated