Changing buttons in menu.php

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

Changing buttons in menu.php

Postby Filsorrow » Wed Aug 23, 2006 4:40 pm

Hi...Im not completely sure if this is the right place to put this question but what the hell.

recently I have been trying to edit the menu.php in the lib folder. I know what Im doing in there and everything is fine. I have my menu looking what i want it to look like. What I wasnt to know is how to change the names of the buttons. If you change...say the proffesions button to another name it just comes up with a blank button.

Well...I have added another link the menu and i want to name it DKPrules but when i do this I just get a blank button. I think it is something to do with $wordings. But im not sure what.
Could someone help me with this so i can have a button called DKPaddon.

Thanks
Image
Filsorrow
WR.net Apprentice
WR.net Apprentice
 
Posts: 16
Joined: Tue Jul 04, 2006 5:12 pm

Changing buttons in menu.php

Postby PleegWat » Wed Aug 23, 2006 9:40 pm

The $wordings are the localization strings. They are defined in enUS.php and deDE.php
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Changing buttons in menu.php

Postby zeryl » Wed Aug 23, 2006 10:41 pm

$wordings['enUS']['dkprules'] = 'DKPRules';

and to show it in the menu

$wordings[$roster_conf['roster_lang']]['dkprules']

Hope this helps.
User avatar
zeryl
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 194
Joined: Tue Jul 04, 2006 12:59 pm
Location: Saint Louis

Re: Changing buttons in menu.php

Postby Filsorrow » Thu Aug 24, 2006 1:01 am

Thanks alot guys....Problem solved
Image
Filsorrow
WR.net Apprentice
WR.net Apprentice
 
Posts: 16
Joined: Tue Jul 04, 2006 5:12 pm

Re: Changing buttons in menu.php

Postby lithanos » Thu Aug 24, 2006 12:16 pm

Hopefully noone minds me posting in the one. My question is similar
Im not a coder. Know very little. I can figure things out for the most part when someone points me in the right direction. You know trial and error.
Anyways. I would like to add another button. What i dont know how to do is add the button and link it to another site. Not sure where i need to start and i rather not screw up the roster after spending alot of time getting it to work.
If anyone gets some spare time can ya point me in the right direction with where i need to start? I appreciate your time Thank you
lithanos
WR.net Apprentice
WR.net Apprentice
 
Posts: 18
Joined: Tue Jul 04, 2006 7:34 pm

Changing buttons in menu.php

Postby PleegWat » Thu Aug 24, 2006 1:12 pm

In menu.php, starting line 150 or so (don't have a 1.7.0 at hand), there are serveral lines like these:

Code: Select all
if( $roster_conf['menu_alt_page'] )
    print 
'        <li><a href="'.$roster_conf['roster_dir'].'/indexalt.php">'.$wordings[$roster_conf['roster_lang']]['alternate'].'</a></li>'."\n"


Each of those represents a button. In the spot where you want to add your button, add the following:

[code=php]print ' <li><a href="http://yourdomain.com/yourlinkhere">yourbuttontexthere</a></li>'."\n";
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Changing buttons in menu.php

Postby lithanos » Thu Aug 24, 2006 1:30 pm

Thank you very much. I was attempting to copy one of the alreayd made links and modfiy the code. Of course since i know crap about coding my attempts to modify them didnt turn out to well. I like to go and and see what code i can modify and actualy make something do something. Doesnt always work lol
i really appreciate the Code you posted.
thank you VERY VERY much
lithanos
WR.net Apprentice
WR.net Apprentice
 
Posts: 18
Joined: Tue Jul 04, 2006 7:34 pm


Return to General Code Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron