MyBB Central

Full Version: Drop Down Menu In Header Block
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Ok so i have a problem.

i have got a theme and i need to implement a drop down menu for like search keys and other links.

The template is header_welcomeblock_member


[Image: attachment.php?aid=10996]

so i need something like the above i have the code for it but it doesnt work well with it.

PHP Code:
<table border="0" cellspacing="{$theme['borderwidth']}cellpadding="{$theme['tablespace']}class="tborder" align="center">
<
tr>
<
td class="trow1" width="100%"><navigation></td>
<
td class="trow3" nowrap="nowrap" style="padding:6px; font-size:11px">
{
$lang->welcome_back}<br />
{
$lang->welcome_current_time}<br />
<
a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}
</
td>
</
tr>
</
table>
<
div align="center">
<
table class="tborder" border="0" cellspacing="0" cellpadding="3" align="center" style="border-top-width:0px; font-size:11px">
<
tr align="center" class="trow6">
<
td class="welcome"><a href="{$mybb->settings['bburl']}/usercp.php"><b>{$lang->welcome_usercp}</b></a></td>
<
td class="welcome"><a href="{$mybb->settings['bburl']}/modcp.php"><b>{$modcplink}</b></a></td>
<
td class="welcome"><a href="{$mybb->settings['bburl']}/admincp.php"><b>{$admincplink}</b></a></td>
<
td class="welcome"><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList', 200, 300);"><b>{$lang->welcome_open_buddy_list}</b></a></td>
<
td class="welcome"><a href="{$mybb->settings['bburl']}/misc.php?action=help"><b>{$lang->toplinks_help}</b></a></td>
<
td class="welcome"><a href="{$mybb->settings['bburl']}/calendar.php"><b>{$lang->toplinks_calendar}</b></a></td>
<
td class="welcome"><a href="search.php?action=getnew"><b>{$lang->welcome_newposts}</b></a></td>
<
td class="welcome"><a href="$settings[bburl]/search.php"><b>{$lang->toplinks_search}</b></a></td>
<
td class="welcome"><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><b>{$lang->welcome_logout}</b></a></td>
</
tr>
</
table>
</
div

The above is the theme i want to use and i want to add a drop down menu too it!

PHP Code:
<table border="0" class="tborder" cellspacing="1">
    <
tr>
        <
td class="trow1"><navigation></td>
        <
td  class="trow2" width="20%" nowrap="nowrap">
            <
table border="0">
                <
tr
                    <
td class="smalltext">{$lang->welcome_back}<br/><a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms} </a>{$lang->welcome_pms_usage}
                    </
td>
                </
tr
            </
table>
        </
td>
    </
tr>
</
table>
<!-- 
userbar -->
<
table border="0" class="usrbar_tab" align="center" cellspacing="1">
    <
tr>
        <
td class="usrbar" align="center"><a href="{$mybb->settings['bburl']}/usercp.php">UserCp</a></td>
        <
td class="usrbar" align="center"><a href="{$mybb->settings['bburl']}/calendar.php">Calendar</a></td>
        <
td class="usrbar" align="center"><a href="{$mybb->settings['bburl']}/memberlist.php">Memberlist</a></td>
        <
td class="usrbar" align="center"><a href="#" id="search" onclick="return openMenu(this)" class="popup_button">Search <img src="images/vbx/popdown.gif"></a></td>        
        <
td class="usrbar" align="center"><a href="#" id="usercp" onclick="return openMenu(this)" class="popup_button">Quick Links <img src="images/vbx/popdown.gif"></a></td>
        <
td class="usrbar" align="center"><a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a></td>
        
    <
tr>
</
table
<!-- /
userbar -->

<!-- 
user cp tools menu -->
<
div class="popbase_usrbar" id="usercp-popup" style="display:none">
<
table cellpadding="4" cellspacing="1" border="0" class="smalltext" width="150px">
<
tr><td class="tcat">Quick Links</td></tr>
<
tr><td class="myvb_pop" ><a href="search.php?action=getnew"><font color="black">View New Posts</a></td></tr></font>
<
tr><td class="myvb_pop"><a href="misc.php?action=markread"><font color="black">Mark Forums Read</a></td></tr></font>
<
tr><td class="myvb_pop"><a href="#" onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup', 'buddyList',350, 350);"><font color="black">{$lang->welcome_open_buddy_list}</a></td></tr></font>
<
tr><td class="myvb_pop" align="center"><a href="{$mybb->settings['bburl']}/search.php?action=getdaily"><font color="black">Today's Posts</font></a></td></tr>
<tr><td class="tcat"><a href="usercp.php">User CP</a></td></tr>
<tr><td class="myvb_pop"><a href="usercp.php?action=editsig"><font color="black">Change Signature</a></td></tr></font>
<tr><td class="myvb_pop"><a href="usercp.php?action=avatar"><font color="black">Change Avatar</a></td></tr></font>
<tr><td class="myvb_pop"><a href="usercp.php?action=profile"><font color="black">Edit Profile</a></td></tr></font>
<tr><td class="myvb_pop"><a href="usercp.php?action=options"><font color="black">Edit Options</a></td></tr></font>

<tr><td class="tcat">Miscellaneous</td></tr>
<tr><td class="myvb_pop"> <a href="private.php"><font color="black">Private Messages</a></td></tr></font>
<tr><td class="myvb_pop"><a href="usercp.php?action=subscriptions"><font color="black">Subscribed Threads</a></td></tr></font>
<tr><td class="myvb_pop"><a href="member.php?action=profile&amp;uid={$mybb->user['
uid']}"><font color="black">View Profile</a></td></tr></font>
<tr><td class="tfoot">&nbsp</td></tr>
</table>
</div>

<!-- header quick search form -->
<div class="popbase" id="search-popup" style="display:none">
<table cellpadding="4" cellspacing="1" border="0" class="smalltext">
    <tr>
        <td class="tcat">Search</td>
    </tr>
    <tr>
        <td class="myvb_pop">
        <form method="post" action="$settings[bburl]/search.php">
        <input type="hidden" name="action" value="do_search" />
        <input type="hidden" name="postthread" value="1" />
        <input type="hidden" name="forums" value="all" />
        <input type="hidden" name="showresults" value="threads" />
        <input type="text" name="keywords" value="" />
        <input type="submit" class="button" name="submit" value="Find" />
</form>        </td>
    </tr>
    <tr>
        <td class="myvb_pop"><a href="search.php">Advanced Search</a></td>
    </tr>
</table>
</div>
<!-- / header quick search form --> 

This is a code i have from the theme that already has the drop down menu working. except i cannot transfer it! PLease can someone help me?
lol...I just answered this on mybboard.net
ok thanks xD

it didnt fix the problem... here is a better example


i have used this in header_welcomeblock_member

Code:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" align="center">
<tr>
<td class="trow1" width="100%"><navigation></td>
<td class="trow3" nowrap="nowrap" style="padding:6px; font-size:11px">
{$lang->welcome_back}<br />
{$lang->welcome_current_time}<br />
<a href="{$mybb->settings['bburl']}/private.php">{$lang->welcome_pms}</a> {$lang->welcome_pms_usage}
</td>
</tr>
</table>
<!-- userbar -->

<table border="0" class="usrbar_tab" align="center" cellspacing="1">

&nbsp;&nbsp;&nbsp;&nbsp;<tr>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a
href="{$mybb->settings['bburl']}/usercp.php">UserCp</a></td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a
href="{$mybb->settings['bburl']}/calendar.php">Calendar</a></td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a
href="{$mybb->settings['bburl']}/memberlist.php">Memberlist</a></td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a href="#"
id="search" onclick="return openMenu(this)"
class="popup_button">Search <img
src="images/vbx/popdown.gif"></a></td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a href="#"
id="usercp" onclick="return openMenu(this)"
class="popup_button">Quick Links <img
src="images/vbx/popdown.gif"></a></td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="usrbar" align="center"><a
href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a></td>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;&nbsp;<tr>

</table>

<!-- /userbar -->



<!-- user cp tools menu -->

<div class="popbase_usrbar" id="usercp-popup" style="display:none">

<table cellpadding="4" cellspacing="1" border="0" class="smalltext" width="150px">

<tr><td class="tcat">Quick Links</td></tr>

<tr><td class="myvb_pop" ><a
href="search.php?action=getnew"><font color="black">View New
Posts</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="misc.php?action=markread"><font color="black">Mark
Forums Read</a></td></tr></font>

<tr><td class="myvb_pop"><a href="#"
onclick="MyBB.popupWindow('{$mybb->settings['bburl']}/misc.php?action=buddypopup',
'buddyList',350, 350);"><font
color="black">{$lang->welcome_open_buddy_list}</a></td></tr></font>

<tr><td class="myvb_pop" align="center"><a
href="{$mybb->settings['bburl']}/search.php?action=getdaily"><font
color="black">Today's
Posts</font></a></td></tr>

<tr><td class="tcat"><a href="usercp.php">User CP</a></td></tr>

<tr><td class="myvb_pop"><a
href="usercp.php?action=editsig"><font color="black">Change
Signature</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="usercp.php?action=avatar"><font color="black">Change
Avatar</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="usercp.php?action=profile"><font color="black">Edit
Profile</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="usercp.php?action=options"><font color="black">Edit
Options</a></td></tr></font>



<tr><td class="tcat">Miscellaneous</td></tr>

<tr><td class="myvb_pop"> <a
href="private.php"><font color="black">Private
Messages</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="usercp.php?action=subscriptions"><font
color="black">Subscribed
Threads</a></td></tr></font>

<tr><td class="myvb_pop"><a
href="member.php?action=profile&amp;uid={$mybb->user['uid']}"><font
color="black">View
Profile</a></td></tr></font>

<tr><td class="tfoot">&nbsp</td></tr>

</table>

</div>



<!-- header quick search form -->

<div class="popbase" id="search-popup" style="display:none">

<table cellpadding="4" cellspacing="1" border="0" class="smalltext">

&nbsp;&nbsp;&nbsp;&nbsp;<tr>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="tcat">Search</td>

&nbsp;&nbsp;&nbsp;&nbsp;</tr>

&nbsp;&nbsp;&nbsp;&nbsp;<tr>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="myvb_pop">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<form method="post" action="$settings[bburl]/search.php">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="action" value="do_search" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="postthread" value="1" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="forums" value="all" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="showresults" value="threads" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="keywords" value="" />

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" class="button" name="submit" value="Find" />

</form>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

&nbsp;&nbsp;&nbsp;&nbsp;</tr>

&nbsp;&nbsp;&nbsp;&nbsp;<tr>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<td class="myvb_pop"><a href="search.php">Advanced Search</a></td>

&nbsp;&nbsp;&nbsp;&nbsp;</tr>

</table>

</div>

<!-- / header quick search form -->

and well look at it on my site http://www.movie-247.net
OK. for those who cant see the problem here it is!


also you can log in with
User: mybb
Pass:tester

[Image: attachment.php?aid=11697]
i want to thank -Steve- and Labrocca

for helpping me with this issue. all i did was simple edit the Myvb template and added the JS links into the 'headerinclude' template

thanks for your help. and sorry for me being so stupid lol Tongue

[Image: guide2zu0.jpg]