Help needed adding a link/button to my SMF header section

Started by Darkmatter, April 08, 2008, 06:48:43 PM

Previous topic - Next topic

Darkmatter

I recently got a request from members of my forum about adding a link back to my website's home page from the SMF forum.

At first glance I thought the best place to add this feature would be next to the Logout/Login button which appears on every SMF page as follows.

Home Help Search Admin Profile My Messages Calendar Members Logout ReturnToMyWebsite


Where are these buttons loaded (which file) and how easy is it to add a new button next to the Logout/Login button which will enable members to pop back to the splash page of my site. Basically, pressing the ReturnToMyWebsite button will just take them back to my homepage http://www.abc-xyz.com

Or is there an easier way to implement this requested feature?

metallica48423

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

Darkmatter


metallica48423

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

Darkmatter


HellBent

Here's the code:

// Show [mywebsite] button.

echo '<td><a href="http://www.yourwebsite.com/"  target="_self">Your Website</a></td>';


That works for me anyhow :)

Darkmatter

#6
One more question. I tried the above and it works great. One of the new  buttons which I added is a TV button.  The only problem with the TV button is it opens up the TV show in the same window as the forum. How do I open a separate window when using the TV button. Below is my code which opens a TV window in the current window..

// Show the [TV] button.
   echo ($current_action=='tv' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'tv' ? 'active_back' : 'back' , '">
               <a href="http://www.jumptv.com/en/channel/cns/">TV</a>
            </td>' , $current_action == 'tv' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Advertisement: