News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

(Another) Add Links to Menu Bar (Need specifics, Please)

Started by mcbass, February 11, 2007, 09:28:29 AM

Previous topic - Next topic

mcbass

Greetings,
               I've searched and read everything I can find on adding a url to the SMF menu, and have found exactly where to do it in the index.template file. I've got very limited php experience, but am able to copy the info for say..the "help" link on the menu and make it appear twice.

What I cannot figure out how to do is to change the second "help" section on the munu to "Gallery" (my own) and then insert a url. So, basically, I can cut and paste, but not much else!

Can anyone help me out?

Regards,

mcbass


mcbass

Thanks for your reply. I've tried a bunch of stuff from that thread and can't figure out a way to use it to solve my issue because I'm not using the default theme not RC2. Not that that probably matters in reality.

I WAS able to get the code for the outside linkworking. Basically what I have now on the top menu is a second "help" link that points to my outside gallery.

*How do I go about changing the text on that menu bar? I've changed the word "help" to gallery everywhere it appears in the line of code to no avail. I've even changed the $txt[109] to gallery, with a variety of quotes ect, but it doesn't work.

Thanks for you help, I'm still looking while I wait!

mc

mcbass

Hey, this is what I have so far..

// The [Gallery]! Testing how to add MC's own menu buttons...
   echo $tab1, $ca== 'Gallery' ? '1' : '2' , '"><a href="http://www.mcbass.com/gallery/main.php?g2_view=core.ShowItem&g2_itemId=322 [nofollow]" >'.$txt[119]. '</a></td>';



As I mentioned above, the URL is working fine now, the text (should read "Gallery" is where I'm having the issue..

Thanks!

mc

Peter Duggan

#4
Assuming you're only using English (?) and it's only for your forum, the simplest way is just to hardcode the text:

<a href="http://www.mcbass.com/gallery/main.php?g2_view=core.ShowItem&g2_itemId=322">Gallery</a>

But isn't that a link to a specific item instead of a general URL for your Gallery you've quoted in there?

(NB Don't forget your alt text!)

Silly me (we're not talking images here)! It's just that my brain's addled through doing some anchors with title text recently...

mcbass

Got it!
Thanks much for you help...have a nice Sunday!

Regards,

mcbass

Advertisement: