Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Subforum Panel Details »»
Subforum Panel
Version: 1.00, by DanLai DanLai is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 11-02-2005 Last Update: Never Installs: 30
 
No support by the author.

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!!
  1. The state of on/off is saved in cookies
  2. Hierachy show for at most 2 level of sub-forums

Screenshot.


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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 11-07-2005, 03:56 AM
yellowchaser yellowchaser is offline
 
Join Date: Jan 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I agree, can it be left open?
Reply With Quote
  #13  
Old 11-18-2005, 04:59 PM
Sooner95 Sooner95 is offline
 
Join Date: Apr 2003
Location: I don't know
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #14  
Old 12-03-2005, 11:02 PM
Wordplay Wordplay is offline
 
Join Date: Nov 2001
Location: Dengoku
Posts: 864
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what are common templates?
Reply With Quote
  #15  
Old 12-20-2005, 12:06 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #16  
Old 12-20-2005, 01:38 AM
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
Posts: 550
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow o_o
Reply With Quote
  #17  
Old 12-31-2005, 03:31 PM
yukayumi yukayumi is offline
 
Join Date: May 2004
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #18  
Old 12-31-2005, 09:22 PM
sportsoutlaw sportsoutlaw is offline
 
Join Date: Nov 2004
Location: Texas
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #19  
Old 01-06-2006, 08:39 PM
kartik786 kartik786 is offline
 
Join Date: Aug 2005
Location: India
Posts: 175
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tell me
Quote:
Step 4. Open:
Common Templates
Common templates exactly means what ?? Where can i see it in the admin CP ??
Reply With Quote
  #20  
Old 01-07-2006, 12:11 PM
naqalone naqalone is offline
 
Join Date: Oct 2005
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Many Thanks.It's so nice.
Reply With Quote
  #21  
Old 01-09-2006, 04:56 PM
silurius silurius is offline
 
Join Date: Oct 2004
Posts: 404
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:43 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.04742 seconds
  • Memory Usage 2,302KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete