TinyPortal

Development => Support => Topic started by: dkharp on December 14, 2011, 01:30:36 AM

Title: change tab link
Post by: dkharp on December 14, 2011, 01:30:36 AM
Hello,

Long time supporter and off and on user. When you install tp it creates a home tab. I was wondering how can you change the name of the home tab and get it to point to an external page. I am also wondering how you can get the forum tab to point to an external page?

So home tab would be: welcome and the link would be http://www.mogunowners.com/welcometomog
and the forum tab changed to an external link. http://www.mogunwoners.com


Thanks folks!
Title: Re: change tab link
Post by: ZarPrime on December 14, 2011, 04:56:45 AM
When TinyPortal is installed, the Forum button is added.  This is done in the ./Sources/Subs.php file.  If you go to the TinyPortal page on the SMF Mod Site (http://custom.simplemachines.org/mods/index.php?mod=97) and click "parse" to the right, below where it says "Download this mod", you can see the changes that are made to that file on the next page.  The Home button is not changed.  Probably the easiest way to change that is to do a redirect in your site CPanel.  Otherwise you would have to dig into the SMF code to see where that url is specified.

ZarPrime
Title: Re: change tab link
Post by: IchBin on December 14, 2011, 05:34:03 PM
You only need to change the 'href' part in the button code. For example in Subs.php you can find the home code here:
'home' => array(
'title' => $txt['home'],
'href' => $scripturl,
'show' => true,
'sub_buttons' => array(
),
'is_last' => $context['right_to_left'],
),


Just change 'href' to whatever you need.
'href' => 'http://www.yourdomain.com',

You can do the same to the forum button in the same section of Subs.php