TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 18, 2024, 10:06:23 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,164
  • Total Topics: 21,219
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 77
  • Total: 78
  • tino

How do I do a DOCS area like here on the site?

Started by yeshaib, July 08, 2007, 05:57:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

clarkkent93

Quote from: IchBinâ„¢ on July 13, 2007, 11:03:34 PM
Quote from: clarkkent93 on July 13, 2007, 04:27:27 PM
Quote from: G6â„¢ on July 13, 2007, 10:21:58 AM
You add the button in your index.template.php
Copy the forum button and change the forum to docs and then change the url to where the button should point to

I want to make sure I get this right. 

This is where the docs is located: index.php?board=39.0

Forum button code is:
// Show the [forum] button.
   echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' : '' , '
            <td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back2' , '">
               <a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
            </td>' , $current_action=='forum' ? '<td class="maintab_active_last"> </td>' : '';



change to:
// Show the [docs] button.
   echo ($current_action=='docs' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' : '' , '
            <td valign="top" class="maintab_' , $current_action=='docs' ? 'active_back' : 'back2' , '">
               <a href="', $scripturl, '?action=docs">'.$txt['tp-forum'].'</a>
            </td>' , $current_action=='docs' ? '<td class="maintab_active_last"> </td>' : '';


I don't know how to put the url in there and do I replace 'tp-forum' with 'docs'?



Almost Bud!

// Show the [docs] button.
   echo ($current_action=='docs' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first"> </td>' : '' , '
            <td valign="top" class="maintab_' , $current_action=='docs' ? 'active_back' : 'back2' , '">
               <a href="', $scripturl, '?board=39">Docs</a>
            </td>' , $current_action=='docs' ? '<td class="maintab_active_last"> </td>' : '';


You also need to add this above to make it so that the button will highlight when in the forum section. Add it shortly after the others where $current_action is set.

if (isset($_GET['board']) && $_GET['board'] == 39)
$current_action = 'docs';


Thanks.  I don't know if I did it right but it's there.

I'd like to thank everybody for their help!

IchBin