Welcome, Guest. Please Login or Register.
November 29, 2024, 01:32:44 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Graphics and Templates  |  New to templates « previous next »
Pages: [1] Reply Ignore Print
Author Topic: New to templates  (Read 2053 times)
ShujiYomo
Full Member
***
Posts: 156


It's a bird... It's a plane ... No! It's the Yomo!

New to templates
« on: March 27, 2002, 08:41:12 PM »
Reply with quote

I'm kind of new to templates, so please bear with me ....

Where are the items like <yabb menu> being pulled from? I want to have a vertical menu to the left of the main forum, but I can't find where to edit that kind of setting. Basically, I want to put line breaks between each of the menu options so that it loads a bit differently. Any help would be appreciated.
Logged
Dic
Noobie
*
Posts: 44


Re:New to templates
« Reply #1 on: March 28, 2002, 03:01:10 AM »
Reply with quote

u mean u want to edit the tag <yabb menu>
is so look in  sources/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>";
   }

find that and add some line breaks in it and u can use it verticaly

do a search in this forum there is a tutorial on how to add a new button to this also
Logged
curious
Full Member
***
Posts: 178


WWW
Re:New to templates
« Reply #2 on: March 28, 2002, 03:21:18 PM »
Reply with quote

Quote from: Dic on March 28, 2002, 03:01:10 AMdo a search in this forum there is a tutorial on how to add a new button to this also

No need to search. There's a sticky topic in this forum.
http://www.yabb.info/community/index.php?board=144;action=display;threadid=3265
Logged
7summits
Noobie
*
Posts: 47


Made it ma! On top of the world!

WWW
Re:New to templates
« Reply #3 on: March 28, 2002, 07:00:09 PM »
Reply with quote

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!
 :D

Good luck

Logged

http://7summits.com will take you to the highest points on the continents! Climb Kilimanjaro, Aconcagua and more...
New YabbSe soon!
ShujiYomo
Full Member
***
Posts: 156


It's a bird... It's a plane ... No! It's the Yomo!

Re:New to templates
« Reply #4 on: March 28, 2002, 07:04:13 PM »
Reply with quote

Thanks, guys.
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Graphics and Templates  |  New to templates « 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.049 seconds with 21 queries.