TinyPortal

Development => Support => Topic started by: katoona on May 10, 2007, 02:48:47 AM

Title: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 02:48:47 AM
Is there any way I can place the forum links on the frontpage?

Any help will be appreciated.  ;D
Title: Re: Forum links (help, search, members etc) on front page
Post by: tick on May 10, 2007, 02:51:08 AM
What theme are you using?
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 02:53:09 AM
Oops, sorry, I am using TPstyle design by Bloc.

Title: Re: Forum links (help, search, members etc) on front page
Post by: Shadow on May 10, 2007, 02:55:03 AM
Well, Yes, You can add links to the frontpage on tiny portal.

You always can add them in a Menu Manager and have it on the right or left.  Of if you are using a frontblock you can put links on there too
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 03:03:06 AM
On the Novelty theme the links underneath the logo to the left are there on every page, but in the TP Style theme they are not present on the frontpage, and I have tried every possible setting.

Title: Re: Forum links (help, search, members etc) on front page
Post by: tick on May 10, 2007, 03:04:00 AM
Find  in you index template.php   


// check if the no-forum general variable is set
   if(isset($context['TPortal']['not_forum']) && $context['TPortal']['not_forum'])
      $is_forum=false;


and change to
// check if the no-forum general variable is set
   if(isset($context['TPortal']['not_forum']) && $context['TPortal']['not_forum'])
      $is_forum=true;


I did just a quick test on this and it seemed fine.    Make a backup first.
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 03:11:41 AM
It worked - thank you very much.  ;D
Title: Re: Forum links (help, search, members etc) on front page
Post by: tick on May 10, 2007, 03:12:31 AM
Sure thing.  Glad to have helped you .   ;D
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 03:27:02 AM
one more thing - when I enter the forum the forum button lights up (current action), but I also want the forum button to light up when I enter an article. Is is possible to create an action for this?
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 03:27:39 AM
Quote// Work out where we currently are.
   $current_action = 'home';
   $is_forum=true;
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers'))){
      $current_action = 'admin';
   }
   if (in_array($context['current_action'], array('bugtracker','search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin'))){
      $current_action = $context['current_action'];
   }
   if ($context['current_action'] == 'search2'){
      $current_action = 'search';
   }   

Somewhere in this code? (Current action= article) if possible?
Title: Re: Forum links (help, search, members etc) on front page
Post by: IchBin on May 10, 2007, 07:04:39 AM
Search my posts, I've posted this quite a few times.
Title: Re: Forum links (help, search, members etc) on front page
Post by: katoona on May 10, 2007, 01:48:19 PM
Quote from: IchBinâ„¢ on May 10, 2007, 07:04:39 AM
Search my posts, I've posted this quite a few times.

Thanks, I found it and it works like a charm.