TinyPortal

Development => Resources => Topic started by: yeshaib on July 08, 2007, 05:57:26 AM

Title: How do I do a DOCS area like here on the site?
Post by: yeshaib on July 08, 2007, 05:57:26 AM
like this
http://www.tinyportal.net/index.php?board=85.0
Title: Re: How do I do a DOCS area like here on the site?
Post by: IchBin on July 08, 2007, 06:16:36 AM
Its only a theme. Give the wiki theme a try. :)
Title: Re: How do I do a DOCS area like here on the site?
Post by: tick on July 08, 2007, 06:18:19 AM
You can install the wiki theme and set up a board to use that theme.  The wiki theme gives it that appearance.  The one that Bloc uses here if I am not mistaken is just for this site.  But you can accomplish the same layout of it with that theme.
Title: Re: How do I do a DOCS area like here on the site?
Post by: yeshaib on July 08, 2007, 06:40:18 AM
Very cool
So it's just the them on a specific board.
Title: Re: How do I do a DOCS area like here on the site?
Post by: tick on July 08, 2007, 06:47:07 AM
That is correct.  Click on the link you put up above and check out the linktree and it will show you exactly where its located from the forum view.   
Title: Re: How do I do a DOCS area like here on the site?
Post by: G6Cad on July 08, 2007, 10:29:51 AM
Here is another variation of the usage of WIKI theme.
On this site i have just used the SMF wiki theme as it have the options to add fast links to the side with in the index.template.php
www.familjegodis.se/docs
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 11, 2007, 06:02:58 PM
I'm trying to do the same thing.  I've created my boards, selected the wiki (smf only) theme (just for those boards) but it still shows up as the forum default theme (mesh tp).

Any ideas what I'm doing wrong?
Title: Re: How do I do a DOCS area like here on the site?
Post by: IchBin on July 11, 2007, 09:29:39 PM
You can set the boards to use a theme individually. Admin > Boards > Modify > Choose the theme you want to use.
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 11, 2007, 11:38:14 PM
Quote from: IchBinâ„¢ on July 11, 2007, 09:29:39 PM
You can set the boards to use a theme individually. Admin > Boards > Modify > Choose the theme you want to use.

I've done this.  WikiStyle has already been selected.  For some reason, it doesn't show up.  I didn't know if there was something that would block it.
Title: Re: How do I do a DOCS area like here on the site?
Post by: IchBin on July 12, 2007, 05:17:04 AM
Can you show us where this is at?
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 12, 2007, 06:35:50 AM
Quote from: IchBinâ„¢ on July 12, 2007, 05:17:04 AM
Can you show us where this is at?

http://www.ussriverside.us/index.php?board=39.0
Title: Re: How do I do a DOCS area like here on the site?
Post by: 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.
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 12, 2007, 05:57:28 PM
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.
Title: Re: How do I do a DOCS area like here on the site?
Post by: IchBin on July 12, 2007, 06:51:13 PM
For the record, I just viewed as a user just fine as well. :o
Title: Re: How do I do a DOCS area like here on the site?
Post by: 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?
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 13, 2007, 07:04:10 AM
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? 
Title: Re: How do I do a DOCS area like here on the site?
Post by: G6Cad 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
Title: Re: How do I do a DOCS area like here on the site?
Post by: 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'?

Title: Re: How do I do a DOCS area like here on the site?
Post by: tick on July 13, 2007, 04:43:00 PM
// 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.
Title: Re: How do I do a DOCS area like here on the site?
Post by: 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';
Title: Re: How do I do a DOCS area like here on the site?
Post by: clarkkent93 on July 13, 2007, 11:18:34 PM
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!
Title: Re: How do I do a DOCS area like here on the site?
Post by: IchBin on July 14, 2007, 03:59:01 AM
That looks Good! Nice work.