News:

Wondering if this will always be free?  See why free is better.

Main Menu

Link Tree question

Started by iownrevo33, April 20, 2008, 06:47:52 PM

Previous topic - Next topic

iownrevo33

Hey guys.
I want to add a link to the link tree at the top of my forum.  I know what file to go, but how do I do it?
This link will not be a link for the forum, it will be a link leading to an html website.

Thanks,
Matt

Nathaniel

It depends on exactly where you want the link to be, some templates actually have a field in the admin options which allows you to put some extra html next to the logo in the header, this would be the easiet soluction for you.

Otherwise if you post the code which you want to change or at least the name of the template, as well as where you want to place the link then people can help you more easily.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

metallica48423

by linktree, are you speaking of the button/tab array at the top, or this:

QuoteSimple Machines Community Forum > Customizing SMF > SMF Coding Discussion (Moderator: Grudge) > Topic: Link Tree question 

also, your current SMF version would be handy :)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

iownrevo33

Ok,
I have SMF 1.4
Using Theme:  Dilber MC
I am talking about the button thing at the top.  Not the quote you used

I would like to add a "home" button that links to the main page of my website, which isn't a forum page.  Then I would like to change the button that already says "home" to "forum"
Photo:


If you need more info, just ask.
Thanks,
Matt

PS.  How come under "Addictional Options" I can't post photos?  That is for here.

metallica48423

I don't think this board allows for attachments.

could you paste your index.template.php into a pastbin such as http://www.pastebin.ca and then link to it?  I'm not overly familiar with the theme although it shouldn't be difficult to do :)
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Nathaniel

#5
Easy, I've been working with this theme to create a mod menu system, anyway here's the code for that task.

Change this code:
// Show the [home] button.
echo'
<td align="center" class="menubg' , $current_action == 'home' ? '2' : '' , '">
<a href="', $scripturl, '">' , $txt[103] , '</a>
</td>';


To this code:
// Show the [home] button.
echo'
<td align="center" class="menubg ">
<a href="(Insert Webaddress here)">' , $txt[103] , '</a>
</td>';
// Show the [Forums] button.
echo'
<td align="center" class="menubg' , $current_action == 'home' ? '2' : '' , '">
<a href="', $scripturl, '">Forums</a>
</td>';


Or something simillar based on exactly what you want it to look like.

Edit: Remember that this is in the template_menu() function from the index.template.php file from the dilbar mc theme (Awesome theme!).
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

iownrevo33

Ok, thanks LHVWB  I'll quickly try that.

metallica48423: I guess I don't need to do what you said, right?

Bulakbol

If you are okay with LHVWB 's code, then you don't have to do anything anymore. Does LHVWB 's code helped you?
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

iownrevo33

#8
Well, I tried it.  I was able to change the name for the forums, but can't figure out the other one.

Here is what I have right now:
// Show the [home] button.      echo'
              <td align="center" class="menubg ">                 
<a href="http://explosiveracing.890m.com/home.html">' , $txt[103] , '</a>               </td>';

I've tried a few different things, but they don't work.
Any ideas?

Thanks

metallica48423

// Show the [home] button.     
echo '
     <td align="center" class="menubg ">                 
          <a href="http://explosiveracing.890m.com/home.html">' , $txt[103] , '</a>               
     </td>';


echo ' needs to be on a line thats not commented out
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

iownrevo33

#10
Oh, Ok thanks.

I quickly try that

EDIT:  It worked.  Thank-you

iownrevo33

Ok, another problem.
I didn't feel like making a new thread.

So, I have another link to put up there.  I did everything correct, but it doesn't display right.  It is the same name as the other one. 

I think its because of the $txt[103].
I tried different numbers, but it showed up as different things.  Any ideas guys?
Thanks

metallica48423

what is it showing up as?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

iownrevo33

Well, currently, nothing.  I deleted it.

But I had my new "home" button, and then "forums" and then I wanted "chat" But it showed "home". 

metallica48423

$txt[103] displays 'home'.  It is a language string entry ( i think that one is set in index.english.php.

Were you trying to use that for multiple buttons or?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

Bulakbol

If you want to, you can hard code the text string.

// Show the [home] button.
echo '
      <td align="center" class="menubg ">
               <a href="http://explosiveracing.890m.com/home.html">Chat</a>
       </td>';

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

iownrevo33

Sorry, I forgot about this.

Metallica, I wanted to use it for multiple buttons.
Johny, thanks for that code, I got it figured out.

Thank for the help.

Advertisement: