DiageoLiam |
07-19-2009 07:29 PM |
Javascript menu's don't work in a theme.
Hi there,
I have recently finished installing and customizing a new theme for my Vbulletin, however, after testing I have discovered that none of my javascript menus (for example the 'Quick Links'/'New Notifications' menus) simply don't work in that theme. Whenever they are clicked, nothing happens. However, when I change the theme, the desired menu will appear.
As shown below:
http://img195.imageshack.us/img195/2662/tempibl.jpg
Below is code for the 'Header' template in my broken theme; this includes code for the notifications and quick links menus.
HTML Code:
<!-- logo -->
<a name="top"></a>
<div id="container" style="width:$stylevar[outertablewidth]">
<div id="header">
<div id="logo"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></div>
<if condition="$show['guest']"><div id="forms">
<form action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, $show[nopasswordempty])">
<script type="text/javascript" src="clientscript/vbulletin_md5.js?v=$vboptions[simpleversion]"></script>
<input name="vb_login_username" id="navbar_username" accesskey="u" tabindex="101" value="$vbphrase[username]" onfocus="if (this.value == '$vbphrase[username]') this.value = '';" type="text" class="form" /><input name="vb_login_password" id="navbar_password" tabindex="102" type="password" class="form" /><input name="" type="submit" class="login" value="" />
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="vb_login_md5password" />
<input type="hidden" name="vb_login_md5password_utf" />
</form>
<a href="register.php$session[sessionurl_q]" rel="nofollow">Register</a> or have you <a href="login.php?do=lostpw">forgotten your password</a>?
</div><else />
<div id="userbox"><strong><phrase 1="$bbuserinfo[username]">$vbphrase[welcome_x]</phrase></strong><br />
<phrase 1="$pmbox[lastvisitdate]" 2="$pmbox[lastvisittime]">$vbphrase[last_visited_x_at_y]</phrase>
<div><span id="notifications"><a href="usercp.php$session[sessionurl_q]">$vbphrase[your_notifications]:</a> <strong>$notifications_total</strong></span></div>
</div></if>
<if condition="$notifications_total">
<!-- notifications menu -->
<div class="vbmenu_popup" id="notifications_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td class="thead" colspan="2">$vbphrase[your_notifications]</td></tr>
$notifications_menubits
</table>
</div></if>
</div>
<div id="nav">
<ul>
<li><a href="$vboptions[homeurl]">Home</a></li>
<if condition="$show['member']">
<li><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></li>
</if>
<if condition="$show['registerbutton']">
<li><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></li>
</if>
$template_hook[navbar_buttons_left]
<li><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></li>
<li><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></li>
<li><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></li>
<if condition="$show['popups']">
<if condition="$show['searchbuttons']">
<if condition="$show['member']">
<li><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></li>
<else />
<li><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></li>
</if>
<li<if condition="$show['guest']"> id="last"</if>><a id="navbar_search" href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search",true); </script></if></li>
</if>
<if condition="$show['member']">
<li><a id="usercptools" href="$show[nojs_link]#usercptools">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools",true); </script></li>
</if>
<else />
<if condition="$show['searchbuttons']">
<li><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></li>
<if condition="$show['member']">
<li><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></li>
<else />
<li><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></li>
</if>
</if>
<li><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></li>
<if condition="$show['member']">
<li><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></li>
</if>
</if>
$template_hook[navbar_buttons_right]
<if condition="$show['member']">
<li id="last"><a href="login.php?$session[sessionurl]do=logout&logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></li>
</if>
</ul>
</div>
<div id="headlines">
<img src="$stylevar[imgdir_misc]/icon.gif" alt="icon" width="8" height="8" />$vbphrase[all_times_are_gmt_x_time_now_is_y] <if condition="$show['guest']"><span>|</span> Welcome to Ditch the Label, please <a href="register.php$session[sessionurl_q]" rel="nofollow">register</a> to access all of our features.</if>
</div>
<!-- content table -->
<script type="text/javascript" src="$vboptions[bburl]/clientscript/rainbow.js"></script>
$spacer_open
$_phpinclude_output
Any help would really be appreciated! Thanks :)
PS. I have tried copying working code from one theme to the broken one, but it still doesn't work.
--------------- Added [DATE]1248035904[/DATE] at [TIME]1248035904[/TIME] ---------------
Oh, never mind... it was something to do with the footer!
|