Welcome, Guest. Please Login or Register.
May 13, 2025, 06:27:09 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  |  Mod Ideas and Creation  |  How do i add an extra item to yymenu in Subs.php? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: How do i add an extra item to yymenu in Subs.php?  (Read 818 times)
ken124578
Noobie
*
Posts: 38


I'm a llama!

How do i add an extra item to yymenu in Subs.php?
« on: April 27, 2003, 07:52:48 PM »
Reply with quote

I want to add a few extra things, like a link to the rules page (rules)

And in the future a link to a FAQ.

What do i have to edit/type and where should i put it?
« Last Edit: April 27, 2003, 07:53:25 PM by ken124578 » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #1 on: April 27, 2003, 08:31:39 PM »
Reply with quote

just put the html code, but u'll need to escape the quote signs if u're using double quotes for the string
example, if u wanna add a link to rules.php using YaBBImages/rules.gif for the button:
search for   $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>";add after:   $yymenu .= "$menusep<a href=\"rules.php\"><img src=\"$imagesdir/rules.gif\" alt=\"Rules\" border=\"0\" /></a>";
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #2 on: April 28, 2003, 05:17:40 AM »
Reply with quote

But what if it's rules.html?

should it then be

  $yymenu .= "$menusep<a href=\"rules.html\"><img src=\"$imagesdir/rules.gif\" alt=\"Rules\" border=\"0\" /></a>";



Or should i save it as .php?
« Last Edit: April 28, 2003, 05:18:10 AM by ken124578 » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #3 on: April 28, 2003, 05:21:47 AM »
Reply with quote

as i said before, it's just html code + escaping the quotes
if your file is .html then just change the code to .html, also with the image
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #4 on: April 28, 2003, 08:28:30 AM »
Reply with quote

I get an error when i add that line to Subs.php and upload it, do i have to edit my index.php?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #5 on: April 28, 2003, 02:25:42 PM »
Reply with quote

pls copy and paste the error msg and the line that you changed in Subs.php including 1 line above and under it
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #6 on: April 28, 2003, 05:09:56 PM »
Reply with quote

Error message:

QuoteWarning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/emperor/public_html/Forum/Sources/Subs.php on line 161

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/emperor/public_html/Forum/Sources/Subs.php on line 161

Fatal error: Call to undefined function: clicklog() in /home/emperor/public_html/Forum/index.php on line 56

The line that i changed (including the one above and under it)

   $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>";
     $yymenu .= "$menusep<a href=\"rules.html\"><img src=\"$imagesdir/Forum Rules.gif\" alt=\"Forum Rules\" border=\"0"\" /></a>";
   if ($settings[7] == 'Administrator')


The line i added was      $yymenu .= "$menusep<a href=\"rules.html\"><img src=\"$imagesdir/Forum Rules.gif\" alt=\"Forum Rules\" border=\"0"\" /></a>";
« Last Edit: April 28, 2003, 05:10:30 PM by ken124578 » Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #7 on: April 28, 2003, 06:10:37 PM »
Reply with quote

this code: border=\"0"\"is supposed to be border=\"0\"you added an extra " there ;)
« Last Edit: April 28, 2003, 06:11:46 PM by Spaceman-Spiff » Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #8 on: May 09, 2003, 12:00:01 PM »
Reply with quote

How do i create a link to my site's home?

     $yymenu .= "$menusep<a href=\"index.php\">Site Home<a>";


     $yymenu .= "$menusep<a href=\"\">Site Home<a>";


I tried those and they both don't work.
Logged
CrazyC
Jr. Member
**
Posts: 85


My name says enough.

WWW
Re:How do i add an extra item to yymenu in Subs.php?
« Reply #9 on: May 12, 2003, 02:32:05 AM »
Reply with quote

Quote from: ken124578 on May 09, 2003, 12:00:01 PM
How do i create a link to my site's home?

     $yymenu .= "$menusep<a href=\"index.php\">Site Home<a>";


     $yymenu .= "$menusep<a href=\"\">Site Home<a>";


I tried those and they both don't work.
The first one you type will work, but...  your HTML code is wrong. The <a> is supposed to be </a>
Logged

CrazyC
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #10 on: May 12, 2003, 03:59:46 PM »
Reply with quote

I get this error when i try to do that:

Quote
Parse error: parse error, unexpected T_ELSE in /home/emperor/public_html/Forum/Sources/Subs.php on line 168

Fatal error: Call to undefined function: clicklog() in /home/emperor/public_html/Forum/index.php on line 58

???
Logged
CrazyC
Jr. Member
**
Posts: 85


My name says enough.

WWW
Re:How do i add an extra item to yymenu in Subs.php?
« Reply #11 on: May 13, 2003, 02:36:28 AM »
Reply with quote

Ok, start over with your original Subs.php.

Search 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>";
Now insert this after it:
     $yymenu .= "$menusep<a href=\"index.php\">Site Home</a>";

That's the EXACT code if your index.php is in your webserver's root directory.  That will NOT open and index.php in the yabbse installation directory or any other directory on your site.

If by chance you're looking to make a link to the main yabb index.php, that is already in the menu.
« Last Edit: May 13, 2003, 02:37:22 AM by CrazyC » Logged

CrazyC
ken124578
Noobie
*
Posts: 38


I'm a llama!

Re:How do i add an extra item to yymenu in Subs.php?
« Reply #12 on: May 13, 2003, 01:31:41 PM »
Reply with quote

ok, but what if i want to have it on the right? (where the logout button is)
Logged
CrazyC
Jr. Member
**
Posts: 85


My name says enough.

WWW
Re:How do i add an extra item to yymenu in Subs.php?
« Reply #13 on: May 15, 2003, 08:38:06 PM »
Reply with quote

Insert the line into the group of $yymenu variables where you want it to display.  Each of the other menu lines look very similar to what you are adding and the one you were searching for.  Each $yymenu= line is for each button on your menu, the top of that section being the button all the way on the left and the bottom of the section being on the right.
Logged

CrazyC
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  How do i add an extra item to yymenu in Subs.php? « 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.167 seconds with 21 queries.