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

Recent

Welcome to TinyPortal. Please login or sign up.

April 25, 2024, 09:14:26 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,173
  • Total Topics: 21,219
  • Online today: 319
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 186
  • Total: 187
  • @rjen

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.


IchBin

Well it works fine for me as a guest. If you'd like to PM me an account to test it with I'll take a look.

clarkkent93

Quote from: IchBinâ„¢ on July 12, 2007, 02:03:12 PM
Well it works fine for me as a guest. If you'd like to PM me an account to test it with I'll take a look.

Done deal.  Please check your PM.

I do find it interesting that guests can see it but users can't.  I wonder if I set some of the settings wrong.  It wouldn't surprise me.

IchBin

For the record, I just viewed as a user just fine as well. :o

bloc

Maybe..as a admin you can override any theme set, maybe you have set yourself up for another theme?

clarkkent93

#15
Quote from: Bloc on July 13, 2007, 12:15:58 AM
Maybe..as a admin you can override any theme set, maybe you have set yourself up for another theme?

You gave me an idea when you mentioned that.  I set up a new board and chose "override member theme".  That seemed to do it.  I'll have to check the admin account and see if I checked that for some unknown reason.

Now for a most likely stupid question, what's the best way to add the button "Docs" in the navigation? 

G6Cad

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

clarkkent93

#17
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'?


tick

// 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="http://a link to your board">Docs</a>
            </td>' , $current_action=='docs' ? '<td class="maintab_active_last"> </td>' : '';


Try this one.  Just replace the "http://a link to your board" with yours.

IchBin

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';