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?
which SMF version?
I am currently running
SMF 1.1.4
http://docs.simplemachines.org/index.php?topic=564.0
Thank you ... I will try to implement it.
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 :)
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 . '"> </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 . '"> </td>' : '';
Got it ... TARGET="_blank"