vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Subforum Panel (https://vborg.vbsupport.ru/showthread.php?t=99999)

DanLai 11-02-2005 10:00 PM

Subforum Panel
 
Description. This is a Mod to make sub-forums appear in a small panel that can be toggled on and off. I just feel the Subforum Drop-down Menu mod is not enough so I have made this one. Select either one as your liking!! :rolleyes:
  1. The state of on/off is saved in cookies
  2. Hierachy show for at most 2 level of sub-forums

Screenshot.
https://vborg.vbsupport.ru/attachmen...id=36955&stc=1

Step 1. Open:
forumhome_forumbit_level1_nopost
forumhome_forumbit_level1_post
forumhome_forumbit_level2_nopost
forumhome_forumbit_level2_post


Find:
Code:

<strong>$vbphrase[subforums]</strong>: $forum[subforums]
Replace with:
Code:

<!-- Subforum panel --------------------------------------->
<div onclick="toggleSubforumList($forum[forumid],true)" style="cursor:pointer;font-weight:bold;">$vbphrase[show_forum_list] &gt;&gt;</div>
<div id="$forum[forumid]" class="vbmenu_popup" style="display:none">

<table>
<tr>
<td>
$forum[subforums]
</td>
</tr>
</table>

<script type="text/javascript">
<!--
if(fetch_cookie($forum[forumid]) == 'Y')
{
toggleSubforumList($forum[forumid],false);
}
// -->
</script>

</div>
<!-- Subforum panel --------------------------------------->

Step 2. Open:
forumhome_subforumbit_nopost
forumhome_subforumbit_post


Replace the templates with:
Code:

<!-- Subforum panel --------------------------------------->
<if condition="$forum[depth] == '3'">
&nbsp; &nbsp;
</if>

<img class="inlineimg" src="$stylevar[imgdir_statusicon]/subforum_$forum[statusicon].gif" alt="" /> <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<!-- Subforum panel --------------------------------------->

Step 3. Open:
forumhome_subforumseparator_nopost
forumhome_subforumseparator_post


Replace the templates with:
Code:

<!-- Subforum panel --------------------------------------->
<br />
<!-- Subforum panel --------------------------------------->

Step 4. Open:
Common Templates

Add to the bottom:
Code:

<script type="text/javascript">
function getItem(id)
{
        var itm = false;
        if(document.getElementById)
        itm = document.getElementById(id);
        else if(document.all)
        itm = document.all[id];
        else if(document.layers)
        itm = document.layers[id];
       
        return itm;
}

function toggleSubforumList(id,use_cookie)
{
        itm = getItem(id);
       
        if(!itm)
        return false;

        if(itm.style.display == 'none')
        {
                var expireDate = new Date();
                expireDate.setYear(expireDate.getFullYear()+1);
                itm.style.display = '';
                if (use_cookie) set_cookie(id,'Y',expireDate);
        }
        else
        {
                itm.style.display = 'none';
                if (use_cookie) delete_cookie(id);
        }

        return false;
}
</script>

Step 5. Add a phrase "show_forum_list", it maybe like: "Show forum list >>"

Caution. Some cookies will be generated when using this mod. The state of on/off is kept per-browser but not per-user. Non-cookie-enabled users cannot keep the state of on/off of the forum panel.

Brent H 11-03-2005 04:18 PM

This looks great! Thanks for this.

Installed and working flawlessly.

Snake 11-03-2005 04:40 PM

Looking good. Thanks!

Brent H 11-03-2005 06:32 PM

Would it be possible to turn Show forum list into Hide forum list once it's open?

BoYagoob 11-03-2005 07:02 PM

Very Nice :)

Odysseus 11-03-2005 08:36 PM

Though that is not suitable for my own board, I can imagine it to be useful for many people.
Thanks for sharing.

Boofo 11-03-2005 08:46 PM

Text file, please? ;)

krvaricp 11-04-2005 11:35 AM

Very nice hacks :). Thank you very much.

*Clicked Install

DeMiNe0 11-04-2005 11:03 PM

Nice hack. Installed.


Nice Threadid BTW :)
99999

^_^

tasarimdunyasi 11-05-2005 09:24 PM

I want this subforum panel always open . . . is it possible ?

that is to say user don not click for open.

yellowchaser 11-07-2005 03:56 AM

I agree, can it be left open?

Sooner95 11-18-2005 04:59 PM

works! installed! clicked!

also...i modified it a bit, for one of my themes.. drop down box took on a dark background..lol

no biggie

editted this

Quote:

<table>
<tr>
<td>
$forum[subforums]
</td>
</tr>
</table>
and just added a bgcolor to the opening table. Incase anyone else runs across this. Otherwise, works greats, looks even better. Thx!

Wordplay 12-03-2005 11:02 PM

what are common templates?

Smiry Kin's 12-20-2005 12:06 AM

work ok in 3.5.2? jsut checking before i go editing all them templates!

is possible to put all this into a product/template?

MentaL 12-20-2005 01:38 AM

wow o_o

yukayumi 12-31-2005 03:31 PM

Nice hack,thanks.But one question: there's a "Done but with error on pages" in the bottom of my forumhome (but not in forumdisplay).It's really bugging me with that error.Anyone with the same problem or is it just only me?

sportsoutlaw 12-31-2005 09:22 PM

I like this hack. If my forum gets to where I have a large amount of sub-forums, I may go with this. for now, I will use the columns hack.

Nice Job

kartik786 01-06-2006 08:39 PM

Can you tell me
Quote:

Step 4. Open:
Common Templates
Common templates exactly means what ?? Where can i see it in the admin CP ??

naqalone 01-07-2006 12:11 PM

Many Thanks.It's so nice.

silurius 01-09-2006 04:56 PM

Very nice mod. I would install this if I could control it on a per-forum and/or per-usergroup basis, and if I could turn it off and on globally. Anyone feel like expanding this?

yingzhou 04-13-2007 10:48 PM

The Common Templates can be FORUMHOME or some thing else. :D

You can add that code in navbar template so this can be load in whole Forum.

HaCaoChien 06-20-2007 05:36 PM

When I click to "Show sub-forum >>" I expand sub-forum list but it go to the first sub-forum. Please help. Thanks

JohnBee 09-04-2007 06:47 PM

Hi I love this hack, but how can we make it look like yours(image)?
Although everything seems to work, my sub/subforums are not nested as your image displays


All times are GMT. The time now is 04:15 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02544 seconds
  • Memory Usage 1,764KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete