Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
VSa - Sub-Forum Manager Details »»
VSa - Sub-Forum Manager
Version: 3.1.4, by Valter Valter is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.x.x Rating:
Released: 02-25-2010 Last Update: 03-31-2012 Installs: 1855
Uses Plugins Auto-Templates
 
No support by the author.

Info:
-This is used to arrange sub-forums into columns on forumhome.
-You can add thread/post counts to sub-forums, hide "Sub-forums" title, customize CSS, and more...

Installation:
-Import XML file (as product): AdminCP > Plugin System > Manage Products > [Add/Import Product]

Notes:
-To get this product working you must set "Depth of Sub-Forums" to "1" in vBulletin Options > Forum Listings Display Options
-To set product options go to: AdminCP > vBulletin Options > VSa - Sub-Forum Manager

Versions:
v1.0 - Apr 24. 2006.
-First release
v2.5.1 - Jun 20. 2009.
-Latest vB 3.x version
v3.0 - Feb 26. 2010.
-Updated for vBulletin 4
-Fixed known bugs
v3.0.1 - Apr 03. 2010.
-Fixed bug where 'Sub-Forums:' is not hidden in some blocks
v3.1 - Oct 31. 2010.
-New: Almost completely rewritten regarding main functionality
-New: Removed all tables - CSS based now
-Fixed bug: Different column widths through categories
-Fixed bug: Unneeded commas in IE
-Fixed bug: Customizations not fully applied to latest category
-Fixed: XHTML errors
-Fixed: Minor bugs
v3.1.1 - Nov 05. 2010.
-Fixed: Sorting issues
-Fixed: Unneeded thread/reply counts in friendly URLs
v3.1.2 - Dec 12. 2010.
-Fixed bug: Forum Moderators listed in a column
v3.1.3 - Nov 19. 2011.
-Fixed: Compatibility issues with vB 4.1.8
v3.1.4 - Apr 01. 2012.
-New Option: Exclude styles
-New Option: Exclude forums
-Fixed some style issues

Download Now

File Type: zip VSa - Sub-Forum Manager v3.1.4.zip (3.8 KB, 6331 views)

Screenshots

File Type: jpg subforums.jpg (62.0 KB, 0 views)
File Type: png acp.png (99.1 KB, 0 views)

Show Your Support

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

Comments
  #392  
Old 01-29-2012, 05:53 AM
iiioroh iiioroh is offline
 
Join Date: Jan 2011
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you! very much!
Reply With Quote
  #393  
Old 01-30-2012, 08:19 AM
JVSP JVSP is offline
 
Join Date: Jul 2007
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fuzzy Orange View Post
Well spotted!

The styling isn't being applied if it's the last forum in a list

I moved that forum up one in the sort order and now it looks fine
Definitely a bug
Any fix to this?
Reply With Quote
  #394  
Old 01-31-2012, 08:43 AM
Fuzzy Orange Fuzzy Orange is offline
 
Join Date: Sep 2004
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by fxlr8 View Post
Any fix to this?
Nope

I gave up waiting for a fix

If I get chance I might have a go at fixing it myself and post a patch up
Reply With Quote
  #395  
Old 02-01-2012, 02:59 PM
emperatour emperatour is offline
 
Join Date: Sep 2008
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would be great to have an option for excluding some forums.

Thanks anyway .. This is the only mod for subforum display control that works with 4.1.10.
Reply With Quote
  #396  
Old 02-02-2012, 09:22 AM
Valter Valter is offline
 
Join Date: Aug 2005
Location: Sarajevo
Posts: 2,432
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Set "Forum is Active" to "No" for sub-forums you wish to hide.
Reply With Quote
  #397  
Old 02-04-2012, 12:34 AM
TiKu's Avatar
TiKu TiKu is offline
 
Join Date: Sep 2006
Posts: 97
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have improved the mod a bit. I've added an option to exclude forums from the changes and I've tweaked the CSS a bit. I hope these changes can be integrated into the next official release.

To add the setting for excluding forums, add this to settinggroup name="VSa_SFA":
Code:
<setting varname="vsasfm_excludedforums" displayorder="12">
	<datatype>free</datatype>
</setting>
You also need this phrase in vBulletin Settings group:
Code:
<phrase name="setting_vsasfm_excludedforums_desc" date="1328301371" username="TiKu" version=""><![CDATA[Leave alone sub-forums in these forums (comma separated ID list)]]></phrase>
This is the updated MN hook:
Code:
		if ($vbulletin->options['vsasfm_enable'] AND ($vbulletin->options['vsasfm_coltarget']>0))
		{
			if (!function_exists('vsa_construct_subforumbit'))
			{
				function vsa_construct_subforumbit($parentid, $cancontainthreads, $output = '', $depthmark = '--', $depth = 0)
				{
					global $vbulletin, $vbphrase;
					global $lastpostinfo, $lastpostarray;
					static $splitter;

					if ($cancontainthreads)
					{
						$canpost = true;
					}
					else
					{
						$canpost = false;
					}

					if (!isset($vbulletin->iforumcache["$parentid"]))
					{
						return $output;
					}

					foreach($vbulletin->iforumcache["$parentid"] AS $forumid)
					{
						$forum = $vbulletin->forumcache["$forumid"];
						$forumperms = $vbulletin->userinfo['forumpermissions']["$forumid"];
						if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canview']) AND ($vbulletin->forumcache["$forumid"]['showprivate'] == 1 OR (!$vbulletin->forumcache["$forumid"]['showprivate'] AND !$vbulletin->options['showprivateforums'])))
						{
							continue;
						}

						if (!$forum['displayorder'] OR !($forum['options'] & $vbulletin->bf_misc_forumoptions['active']))
						{
							continue;
						}
						else
						{
							$lastpostinfo = $vbulletin->forumcache["$lastpostarray[$forumid]"];
							$forum['statusicon'] = fetch_forum_lightbulb($forumid, $lastpostinfo, $forum);
							$show['newposticon'] = ($forum['statusicon'] ? true : false);

							switch ($vbulletin->options['vsasfm_tr_counts'])
							{
								case 1: $vsasfm_trcounts = ' ('.$forum['threadcount'].')'; $vsasfm_trcounttitle = $vbphrase['threads']; break;
								case 2: $vsasfm_trcounts = ' ('.$forum['replycount'].')'; $vsasfm_trcounttitle = $vbphrase['posts']; break;
								case 3: $vsasfm_trcounts = ' ('.$forum['threadcount'].'/'.$forum['replycount'].')'; $vsasfm_trcounttitle = $vbphrase['threads'].'/'.$vbphrase['posts']; break;
							}
							if ($vbulletin->options['vsasfm_csscounts']!='')
							{
								$vsasfm_trcounts = '<span class="shade" style="'.$vbulletin->options[vsasfm_csscounts].'" title="'.$vsasfm_trcounttitle.'">'.$vsasfm_trcounts.'</span>';
							}
							$vsasfm_blankline = $vsasfm_trcount = $vsasfm_change = false;
							eval('$vsasfm_blanklinesub = in_array($forum[forumid], array(' . $vbulletin->options['vsasfm_blankline_subs'] . '));');
							if (in_array($forum['forumid'], array($vsasfm_blanklinesub)))
							{
								$vsasfm_blankline = '<br /><br />';
								$vsasfm_change = true;
							}
							if (($vbulletin->options['vsasfm_tr_counts']>0) AND ($forum['threadcount']>0))
							{
								$vsasfm_trcount = $vsasfm_trcounts;
								$vsasfm_change = true;
							}
							if ($vsasfm_change)
							{
								$forum[title] .= '</a>'.$vsasfm_trcount.$vsasfm_blankline.'VSa';
							}

							$templater = vB_Template::create("vsa_sfm_subforumbit");
								$templater->register('forum', $forum);
								$templater->register('canpost', $canpost);
								$templater->register('depth', $depth+1);
							$subforum = $templater->render();

							if ($depth < $vbulletin->options['subforumdepth'])
							{
								$output .= vsa_construct_subforumbit($forumid, $cancontainthreads, $subforum, $depthmark . '--', $depth + 1);
							}
						}
					}
					return $output;
				}
			}
			
			// ---- START inserted by TiKu ----
			$affectforum = !in_array($forum['forumid'], explode(',', $vbulletin->options['vsasfm_excludedforums']));
			// ---- END inserted by TiKu ----

			if (($subsonly OR $depth == MAXFORUMDEPTH) AND $vbulletin->options['subforumdepth'] > 0)
			{
				$vsasfm_subforumdata = vsa_construct_subforumbit($forumid, ($forum['options'] & $vbulletin->bf_misc_forumoptions['cancontainthreads'] ) );
			}
			else
			{
				$vsasfm_subforumdata = '';
			}

			$vsasfm_reqcol = $vbulletin->options['vsasfm_coltarget'];
			$vsasfm_colwid = round(100 / $vbulletin->options['vsasfm_coltarget']);

			if ($vbulletin->options['vsasfm_csstable']!='')
			{
				$vsasfm_css_table = $vbulletin->options[vsasfm_csstable];
			}
			if ($vbulletin->options['vsasfm_csscell']!='')
			{
				$vsasfm_css_cell = $vbulletin->options[vsasfm_csscell];
			}
			unset($vsasfm_cols, $vsasfm_subf, $vsasfm_table);
			$vsasfm_left = vB_Template_Runtime::fetchStyleVar('left');

			// ---- START inserted by TiKu ----
			$subforumstitle = '<h4 class="subforumlistlabel"';
			if($vbulletin->options['vsasfm_subphrase'])
				$subforumstitle .= ' style="display:none;"';
			$subforumstitle .= '>' . $vbphrase['subforums'] . ':</h4>';
			// ---- END inserted by TiKu ----
			// ---- START changed by TiKu (width of 100%) ----
			$vsasfm_table = '<div style="width:100%;">';
			// ---- END changed by TiKu (width of 100%) ----

			if ($vbulletin->options['templateversion'] >= '4.1.8')
			{
				// ---- START changed by TiKu (width of 100%, Padding, use $subforumstitle) ----
				$vsasfm_table .= '<div class="subforums" style="width:100%;padding-left:5px;">' . $subforumstitle . '<ol class="subforumlist commalist" style="width:100%;padding-bottom:3px;">';
				// ---- END changed by TiKu (width of 100%, Padding, use $subforumstitle) ----
			}

			// ---- START inserted by TiKu (if clause) ----
			if($affectforum)
			{
				$vsasfm_table .= '<div style="width:100%;'.$vsasfm_css_table.'"><div style="vertical-align:top;clear:both;">';
			}
			// ---- END inserted by TiKu (if clause) ----
			$vsasfm_getsubs = explode("<li",ltrim($vsasfm_subforumdata,"<li"));
			foreach ($vsasfm_getsubs AS $vsasfm_subf)
			{
				$vsasfm_cols++;
				// ---- START inserted by TiKu (if clause + else branch) ----
				if($affectforum)
				{
					if ($vsasfm_cols % $vsasfm_reqcol == 0)
					{
						$vsasfm_table .= '<div style="float:'.$vsasfm_left.';width:'.$vsasfm_colwid.'%;text-align:'.$vsasfm_left.';'.$vsasfm_css_cell.'"><ul><li'.$vsasfm_subf.'</ul></div></div><div style="vertical-align:top;clear:both;">';
					}
					else
					{
						$vsasfm_table .= '<div style="float:'.$vsasfm_left.';width:'.$vsasfm_colwid.'%;text-align:'.$vsasfm_left.';'.$vsasfm_css_cell.'"><ul><li'.$vsasfm_subf.'</ul></div>';
					}
				}
				else
				{
					$vsasfm_table .= '<li ' . $vsasfm_subf;
				}
				// ---- END inserted by TiKu (if clause + else branch) ----
			}
			// ---- START inserted by TiKu (if clause) ----
			if($affectforum)
			{
				$vsasfm_table .= '</div></div>';
			}
			// ---- END inserted by TiKu (if clause) ----

			if ($vbulletin->options['templateversion'] >= '4.1.8')
			{
				$vsasfm_table .= '</ol></div>';
			}

			$vsasfm_table .= '</div>';

			$vsasfm_table = str_ireplace('<li<', '<', $vsasfm_table);
			$vsasfm_table = str_ireplace('VSa</a>', '', $vsasfm_table);
			$vsasfm_table = trim(preg_replace('/-\s*\([^)]*\)VSa/', '', $vsasfm_table));

			$forum['subforums'] = $vsasfm_table;

			// ---- START removed by TiKu ----
			/*if ($vbulletin->options['vsasfm_subphrase'])
			{
				$forumbits = str_ireplace('class="subforumlistlabel"', 'style="display:none;"', $forumbits);
				$childforumbits = str_ireplace('class="subforumlistlabel"', 'style="display:none;"', $childforumbits);
			}

			$forumbits = str_ireplace(' commalist', '', $forumbits);
			$childforumbits = str_ireplace(' commalist', '', $childforumbits);*/
			// ---- END removed by TiKu ----
		}
Regards
TiKu
Reply With Quote
  #398  
Old 02-09-2012, 05:15 PM
durruti durruti is offline
 
Join Date: Jan 2012
Posts: 25
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Kraxell View Post
Is it possible to show the latest threads on the right side of [all] subforums?
Maybe like this
I second this.
Reply With Quote
  #399  
Old 02-10-2012, 04:10 AM
insidegames insidegames is offline
 
Join Date: Jun 2010
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, but can you integrate, that are the subforums are collapseble?
Reply With Quote
  #400  
Old 02-11-2012, 02:57 AM
emperatour emperatour is offline
 
Join Date: Sep 2008
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Even though the Hide "Sub-Forums:" title is set to no, I don't see the sub-forums text above my sub forums.

Any idea what might be wrong ?

Thanks,
Reply With Quote
  #401  
Old 02-11-2012, 05:25 PM
JVSP JVSP is offline
 
Join Date: Jul 2007
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bump

Style changes are not being applied to the last forums on the list.
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 07:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14530 seconds
  • Memory Usage 2,374KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (25)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete