Hi There,
although I cannot show it now (new site in development) I did the same on the next version of my board. I took the <yabb menu> tag away from it's place in the template and put it in a left side menu table.
I changed the following in subs.php
$yymenu = "<a href=\"$scripturl\">$img[home]</a>$menusep<a href=\"$helpfile\" target=_blank>$img[help]</a>$menusep<a href=\"$cgi;action=search\">$img[search]</a>";
if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<a href=\"$cgi;action=admin\">$img[admin]</a>"; }
if($username == "Guest") { $yymenu .= $menusep."<a href=\"$cgi;action=login\">$img[login]</a>$menusep<a href=\"$cgi;action=register\">$img[register]</a>";
} else {
$yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$username\">$img[profile]</a>";
if($enable_notification) { $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>"; }
$yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
}
and replaced it by
$yymenu = "<table width=\"80\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>$img[h7s]</td></tr><tr><td><a href=\"$scripturl\">$img[home]</a></td></tr><tr><td><a href=\"$helpfile\" target=_blank>$img[help]</a></tr></td><tr><td><a href=\"$cgi;action=search\">$img[search]</a></tr></td>";
if($settings[7] == 'Administrator') { $yymenu = $yymenu.$menusep."<tr><td><a href=\"$cgi;action=admin\">$img[admin]</a></td></tr>"; }
if($username == "Guest") { $yymenu .= $menusep."<tr><td><a href=\"$cgi;action=login\">$img[login]</a></td></tr>$menusep<tr><td><a href=\"$cgi;action=register\">$img[register]</a></td></tr></table>";
} else {
$yymenu .= "$menusep<tr><td><a href=\"$cgi;action=profile;user=$username\">$img[profile]</a></td></tr>";
if($enable_notification) { $yymenu .= "$menusep<tr><td><a href=\"$cgi;action=shownotify\">$img[notification]</a></td></tr>"; }
$yymenu .= "$menusep<tr><td><a href=\"$cgi;action=logout\">$img[logout]</a></td></tr></table>";
}
Mind you this is not a generic solution:
- I created a table that would fit my other part of the menu
- I added a picture (have to add that one as well in the english.lng file or else it won't work)
- As you can only choose between all buttons or all text menus and I wanted only text for the new left menu and the rest buttons I also changed the corresponing lines in english.lng, for example:
$img['help'] = "<img src=\"$imagesdir/help.gif\" alt=\"$txt[119]\" border=\"0\">";
replaced by
$img['help'] = $txt[119];//"<img src=\"$imagesdir/help.gif\" alt=\"$txt[119]\" border=\"0\">";
(I just commented out the original part as I always forgot what I changed and will hae no clue what happened when 1.3 comes out
Oh, and ofcourse you could just take the <yabb menu>
out and replace it by direct links, but then it is not dynamic anymore (the menu changes depending if you're logged in or not, if you are admin etc.)
Hey if this was more generic, I could be a mod writer!
Good luck