News: When asking for support, it helps us and you, if you read the Posting Guidelines

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 15, 2019, 06:39:32 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189280
  • Total Topics: 20775
  • Online Today: 67
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 2
Guests: 46
Total: 48

Author Topic: How do I do a DOCS area like here on the site?  (Read 14766 times)

0 Members and 1 Guest are viewing this topic.

clarkkent93

  • Guest
Re: How do I do a DOCS area like here on the site?
« Reply #20 on: July 13, 2007, 04:18:34 PM »
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:
Code: [Select]
// 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:
Code: [Select]
// 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!

Code: [Select]
// 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.
Code: [Select]
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!

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: How do I do a DOCS area like here on the site?
« Reply #21 on: July 13, 2007, 08:59:01 PM »
That looks Good! Nice work.