Welcome, Guest. Please Login or Register.
April 29, 2025, 12:52:53 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  |  Tutorial: Add a new menu button/link « previous next »
Pages: [1] 2 Reply Ignore Print
Author Topic: Tutorial: Add a new menu button/link  (Read 6520 times)
Shaun
Wannabe Mod Writer
Sr. Member
****
Posts: 361


YaBB SE Rules.

Tutorial: Add a new menu button/link
« on: December 29, 2001, 07:30:32 PM »
Reply with quote

Here's what I did to add a button named "chat".  I dunno if it's the best way 'cause I don't know PHP.  In the first <replace> step, make sure you replace "http://www.your url.com" with the url to your chat script.  Go to http://www.nextcelica.net/yabbse to see the "chat" button on the top menu.  My button does not link to a chat script because my server doesn't allow them.  Go ahead and save the chat button if you wanna use it.  If any of you guys who really know PHP know how to make it better, please do and I will update this mod.

<edit file>
Sources/Subs.php
</edit file>

<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>
</search for>
 
<replace>
$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>$menusep<a href=\"http://www.your url.com\">$img[chat]</a>";
</replace>

<edit file>
english.lng
</edit file>

<search for>
$txt[749] = "The 'number of posts' box can only contain digits.";
</search for>

<add after>
$txt[chat] = "Chat";
</add after>

<search for>
   $img[website_sm] = "<img src=\"$imagesdir/www_sm.gif\" alt=\"$txt[515]\" border=\"0\">";
</search for>

<add after>
  $img[chat] = "<img src=\"$imagesdir/chat.gif\" alt=\"$txt[chat]\" border=\"0\">";
</add after>




Logged

This guy uses objects like women man!
Allan_R
Full Member
***
Posts: 138


I'm a star trek fan!

WWW
Re:Tutorial: Add a new menu button/link
« Reply #1 on: December 29, 2001, 10:46:07 PM »
Reply with quote

where do we put the code???  ::)
Logged

8) Allan_R 8)
Hamster Brothers/Sisters webmaster


http://hamsterbros.mattsiegman.com/hb/YaBBImages/avatars/compfreak.gif[/img]
[img]
alexrolko
Guest
Re:Tutorial: Add a new menu button/link
« Reply #2 on: December 30, 2001, 07:43:21 AM »
Reply with quote

Quote from: Allan_R on December 29, 2001, 10:46:07 PMwhere do we put the code???  ::)

LOL you can either do it all manually... simply read the tags... Edit file, Search For, Replace...

or you can copy and paste into a file called 'Add_new_buttons.mod' and put it into the pakage directory, and then via the adminCP in the pakage manager... install it that way. (mind you both ways you must edit the code to fit your needs.)

Logged
sR_ReD
Noobie
*
Posts: 24


^HOTTIE^

ICQ - 147270828 WWW
Re:Tutorial: Add a new menu button/link
« Reply #3 on: January 05, 2002, 05:10:49 AM »
Reply with quote

Could this be a diff button?  I am pretty sure it would work but i just making sure.  Like for me could i have it take me to another forum or mabey back to my home page....

sR_ReD it's coming
Logged

Sacrifice Red It's Coming

Coming Soon
curious
Full Member
***
Posts: 178


WWW
Re:Tutorial: Add a new menu button/link
« Reply #4 on: January 05, 2002, 02:49:55 PM »
Reply with quote

Quote from: sR_ReD on January 05, 2002, 05:10:49 AMCould this be a diff button?  I am pretty sure it would work but i just making sure.  Like for me could i have it take me to another forum or mabey back to my home page....
Of course. The button can link to everything.
Just insert the correct URL and rename every "Chat", to whatever you want.
Logged
add_effect
Full Member
***
Posts: 140


heh heh

Re:Tutorial: Add a new menu button/link
« Reply #5 on: January 06, 2002, 04:51:11 PM »
Reply with quote

I didn't see any chat button at test board.
Logged

:: Innocence and Experience ::
Shaun
Wannabe Mod Writer
Sr. Member
****
Posts: 361


YaBB SE Rules.

Re:Tutorial: Add a new menu button/link
« Reply #6 on: January 07, 2002, 05:24:03 AM »
Reply with quote

I posted the button in the board.  I haven't applied the "mod" again since I tried another mod from here and it screwed everything up.  I only had the default "Sources" folder saved.  
Logged

This guy uses objects like women man!
tom2002
Noobie
*
Posts: 5


I'm a llama!

WWW
Re:Tutorial: Add a new menu button/link
« Reply #7 on: January 16, 2002, 04:40:40 AM »
Reply with quote

i followed your instructions to add the chat button on the top menu .  I modified the Sub.php & eng.lang .
But i don't see the chat button on the top menu .

could you help me.

tia
Logged
Shaun
Wannabe Mod Writer
Sr. Member
****
Posts: 361


YaBB SE Rules.

Re:Tutorial: Add a new menu button/link
« Reply #8 on: January 16, 2002, 04:45:29 PM »
Reply with quote

Did you download the "chat" button to your YaBBImages folder?
Logged

This guy uses objects like women man!
tom2002
Noobie
*
Posts: 5


I'm a llama!

WWW
Re:Tutorial: Add a new menu button/link
« Reply #9 on: January 16, 2002, 06:26:35 PM »
Reply with quote

yes, i did .
Logged
Delinquently insane
Foolish One
YaBB God
*****
Posts: 529


The One Surpassed By God!!!!

Re:Tutorial: Add a new menu button/link
« Reply #10 on: April 09, 2002, 05:00:29 AM »
Reply with quote

Could You Be So Kind In As To Sharing The Button.. The Site Seems To Be Down And I Have A Blank Image On My Front Page.. :P

Also Thanx For The Tip It Came In Handy  ;D
Logged

ALL MODS Cancelled projected terminated
myk
Jr. Member
**
Posts: 99


I'm a llama! *spit*

ICQ - 1938747 WWW
Re:Tutorial: Add a new menu button/link
« Reply #11 on: May 04, 2002, 09:53:22 AM »
Reply with quote

Now that I've successfully added "wootlands home" and "games" to the list of buttons, how do I properly remove "notifications" and "help"? I went through the code and basically did the opposite of adding a button in Subs but it had weird results. In my forums the buttons i removed are gone but when I use the same menu outside of my forums (on my homepage) the buttons are still there. I know it points to SSI.php but I dont know what to change in there (if anything) to make the unwanted buttons not show. Help?
Logged

claimed mods:
none. the world is better off with me on the receiving end of mods rather than the giving end
ShujiYomo
Full Member
***
Posts: 156


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

Re:Tutorial: Add a new menu button/link
« Reply #12 on: May 21, 2002, 11:43:39 PM »
Reply with quote

Okay, I recently added the open directory to my site. So, I followed this tutorial and added a link to the open directory page.

I'm using SSI.php on the open directory page to pull in the menu, so that it's integrated with the site. The only trouble is that I lose the "Web Search" button that I added while on the open directory page. Is there something else I need to do to fix that?

You can see what I mean at http://www.monsterhunt.org/support ... just click on Web Search and then look at the menu

EDIT BELOW

I thought I had it figured out, but now I'm getting lots of SSI.php errors in my open directory section. I'm lost again.
« Last Edit: May 22, 2002, 12:11:50 AM by ShujiYomo » Logged
ShujiYomo
Full Member
***
Posts: 156


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

Re:Tutorial: Add a new menu button/link
« Reply #13 on: May 22, 2002, 12:14:50 AM »
Reply with quote

My fault, I haven't slept. To make the correct changes in SSI.php, do the following:

<edit file>
SSI.php
</edit file>

<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>
</search for>

<replace>
$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>$menusep<a href=\"http://www.your url.com\">$img[chat]</a>";
</replace>

That will make the button also show up on pages using SSI.php to display your menu.
« Last Edit: May 22, 2002, 12:15:13 AM by ShujiYomo » Logged
Yngwiedis
Full Member
***
Posts: 111


Yngwie Rules !!!

WWW
Re:Tutorial: Add a new menu button/link
« Reply #14 on: July 09, 2002, 03:57:36 PM »
Reply with quote

Is there any way to open the link in to a pop up window ?
Something like javascript:void(0) ?
Logged
Pages: [1] 2 Reply Ignore Print 
YaBB SE Community  |  Development  |  Graphics and Templates  |  Tutorial: Add a new menu button/link « 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.035 seconds with 18 queries.