Welcome, Guest. Please Login or Register.
May 08, 2025, 09:53:02 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  change menu mod?? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: change menu mod??  (Read 826 times)
essentialmadonna
Noobie
*
Posts: 20


I'm a llama!

change menu mod??
« on: November 26, 2002, 05:04:53 PM »
Reply with quote

how would I go about changing the way the menu appears, currently it goes horizontally along the page but I would like it to go vertically, so it fits tidly down one side.  I know I could leave the menu out and just put in my own links on my template, but that way the admin and global moderator link would be available to all to see, even if they can't use it

does anyone know

hopefully you do
Logged
Dude
Guest
Re:change menu mod??
« Reply #1 on: November 26, 2002, 08:06:48 PM »
Reply with quote

In subs.php look for this:
   $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 {
      $euser = urlencode($username);
      $yymenu .= "$menusep<a href=\"$cgi;action=profile;user=$euser\">$img[profile]</a>";
      if($enable_notification) { $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>"; }
      // Calendar.
if ($modSettings['cal_enabled'] == 1)
$yymenu .= "$menusep<a href=\"$scripturl?action=calendar\">$img[calendar]</a>";

      $yymenu .= "$menusep<a href=\"$cgi;action=logout\">$img[logout]</a>";
   }


and replace it with this

   $yymenu = "<a href=\"$scripturl\">$img[home]</a><br /><a href=\"$helpfile\" target=_blank>$img[help]</a>
   <br />
   <a href=\"$cgi;action=search\">$img[search]</a>";
   if($settings[7] == 'Administrator')
      $yymenu .= "<br /><a href=\"$cgi;action=admin\">$img[admin]</a>";
   if($username == "Guest")
   {
      $yymenu .= "<br /><a href=\"$cgi;action=login\">$img[login]</a>
      <br /><a href=\"$cgi;action=register\">$img[register]</a>";
   }
   else
   {
      $euser = urlencode($username);
      $yymenu .= "<br /><a href=\"$cgi;action=profile;user=$euser\">$img[profile]</a>";
      if($enable_notification)
         $yymenu .= "<br /><a href=\"$cgi;action=shownotify\">$img[notification]</a>";
      // Calendar.
      if ($modSettings['cal_enabled'] == 1)
         $yymenu .= "<br /><a href=\"$scripturl?action=calendar\">$img[calendar]</a>";
      $yymenu .= "<br /><a href=\"$cgi;action=logout\">$img[logout]</a>";
   }

I haven't tested it but it should work.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:change menu mod??
« Reply #2 on: November 26, 2002, 10:39:20 PM »
Reply with quote

just change $menusep value to <br /> ;)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Dude
Guest
Re:change menu mod??
« Reply #3 on: November 27, 2002, 09:26:19 AM »
Reply with quote

Quote from: Spaceman-Spiff on November 26, 2002, 10:39:20 PMjust change $menusep value to <br /> ;)

uh, $menusep is used in more places than just the menu.  ;)
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:change menu mod??
« Reply #4 on: November 27, 2002, 10:16:33 PM »
Reply with quote

oh my... i didnt know that...
then u can put it before the menu code:
$menusep = "<br>";
and reset it again after the menu:
$menusep = "&nbsp;";
;)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
Dude
Guest
Re:change menu mod??
« Reply #5 on: November 28, 2002, 09:21:21 AM »
Reply with quote

That would work.

Maybe something like this may even be better.
before the menu:
$tmpmenusep = $menusep;
$menusep = '<br />';

do the menu then

$menusep = $tmpmenusep;

that way you could change menusep in the .lng file without worrying about it here.

We ought to package this up as a mod. Should be the easiest one ever.  ;D
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  change menu mod?? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.160 seconds with 20 queries.