Welcome, Guest. Please Login or Register.
August 19, 2025, 09:51:55 AM
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  |  English User Help  |  English Help  |  Adding a link to the menu « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Adding a link to the menu  (Read 265 times)
mason
Noobie
*
Posts: 3


Hello

Adding a link to the menu
« on: January 20, 2003, 07:02:07 PM »
Reply with quote

I have been trying to add an icon of recent questions within the menu.

I have edited Subs.php from

$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>"; (after this it remain unaltered)

to

$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=\"$cgi;action=recent\">$img[recentq]</a>";
basically only $menusep<a href=\"$cgi;action=recent\">$img[recentq]</a>[/ added.

This didn't work although the html code did change to show the href but not the image code.

I then simply duplicated the menu code to display the home link twice, it worked perfectly so I assumed I need to do something re the recent question .gif. I checked it existing with all the other icons, it does.

I also looked through some to the other yabbse files and edited the yse141.ya file and added

$txt[889] = "Recent Questions:";
&
$img['recentq'] = $txt[889];

Guessing this might work, it hasn't.

Please could someone point me in the right direction to add the link/icon to the menu.

Many Thanks
Logged
Michele
Beta Tester
YaBB God
*****
Posts: 584


I can't wait for YaBB SE 2!

Mad+Moya WWW
Re:Adding a link to the menu
« Reply #1 on: January 20, 2003, 07:36:01 PM »
Reply with quote

Go back into your language file (english.lng) and just below where you added

$img['recentq'] = $txt[889];

There is another section where you put the path to the gif in... it should be easy enough to figure out once you see the section.

Good luck, Mad Moya
Logged

formerly Mad Moya
PfaBB - http://pfabb.lunabyte.com
mason
Noobie
*
Posts: 3


Hello

Re:Adding a link to the menu
« Reply #2 on: January 20, 2003, 08:19:55 PM »
Reply with quote

Tried editing the english.lng file once uploaded the menu disappeared from the forum.

Assuming I start from stratch what files should I have edited i.e. should I have edited Subs.php, yse141.ya and english.lng?

Am I basically adding the reference of the image?

This is all very new to me, until today I had never seen and .php!

Thanks
Logged
Michele
Beta Tester
YaBB God
*****
Posts: 584


I can't wait for YaBB SE 2!

Mad+Moya WWW
Re:Adding a link to the menu
« Reply #3 on: January 20, 2003, 09:07:43 PM »
Reply with quote

Make sure every line you add into english.lng ends with a semi-colon (;) - that's what PHP needs to know as the end of the instruction/command/function.

Leave yse141.ya alone, that was used during the install. You need to edit english.lng (which you did) and add a line. Double check your $txt[] and your $img[] lines again to make sure there isn't a typo.

Then you need to find this:

$img['postEvent'] = '<img src="' . $imagesdir . '/calendarpe.gif" alt="' . $txt['calendar23'] . '" border="0" />';

and add this right after it:

$img['recentq'] = '<img src="' . $imagesdir . '/recentq.gif" alt="' . $txt[889] . '" border="0" />';

You also need to edit index.php in the section where it defines all the action=stuff. If you're using v1.5.0, it will be after $actionArray = array( . If you're using v1.4.x, it will be in one of the FastFind sections.

In the subs.php, it looks like you did the changes correctly.

HTH, MM
Logged

formerly Mad Moya
PfaBB - http://pfabb.lunabyte.com
mason
Noobie
*
Posts: 3


Hello

Re:Adding a link to the menu
« Reply #4 on: January 20, 2003, 10:09:41 PM »
Reply with quote

Thanks for your help, I appear to be having a few problems, I am going to have another look in the morning, I will post my comment then.

Thanks for your help I am sure I will get there in the end!!

Mason
« Last Edit: January 20, 2003, 10:10:03 PM by mason » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Adding a link to the menu « 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.750 seconds with 21 queries.