Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Separate forums on forumhome, category spacing Details »»
Separate forums on forumhome, category spacing
Version: 1.00, by SleekSkins SleekSkins is offline
Developer Last Online: Jun 2011 Show Printable Version Email this Page

Version: 3.6.4 Rating:
Released: 09-28-2006 Last Update: 10-22-2006 Installs: 60
Template Edits
 
No support by the author.

This modification will separate the forum tables on your forumhome, a screenshot is attached.
To fully understand this modification, basic HTML knowledge is required. You can download the complete XML file from the right if you would like to install this right away (upload the XML file in the Styles & Templates section of your Admin CP).
Notice: This modification will not work properly if you use subcategories (category with parent category) or stand-alone forums (forum with no parent category, on forumhome). Subforums will work fine, ofcourse.

Modified templates
  • FORUMHOME
  • forumhome_forumbit_level1_nopost

Forum Home Overview
Open the 'Forum Home Templates > FORUMHOME' template, we only need to edit the area between the <!-- main --> tags. Here's the default code:

HTML Code:
<!-- main -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<if condition="$show['guest']">
	<!-- guest welcome message -->
	<tr>
		<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
	</tr>
	<tr>
		<td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
			<phrase 1="faq.php$session[sessionurl_q]" 2="register.php$session[sessionurl_q]">$vbphrase[first_visit_message]</phrase>
		</td>
	</tr>
	<!-- / guest welcome message -->
	</if>
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead" width="175">$vbphrase[last_post]</td>
	  <td class="thead">$vbphrase[threads]</td>
	  <td class="thead">$vbphrase[posts]</td>
	  <if condition="$vboptions['showmoderatorcolumn']">
	  <td class="thead">$vbphrase[moderator]</td>
	  </if>
	</tr>
</thead>
$forumbits
<tbody>
	<tr>
		<td class="tfoot" align="center" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><div class="smallfont"><strong>
			<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
			<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
			<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
		</strong></div></td>
	</tr>
</tbody>
</table>
$forumhome_markread_script
<!-- /main -->
Everything between the <!-- main --> tags is one table. We are going to separate this into multiple tables.
The above code contains:
  • The guest welcome header.
  • The 'forum, last post, threads, post' area.
  • The category and forums rows ($forumbits).
  • The 'mark forums read' and 'view forum leaders' links.

Forum Home Changes
What has to be changed:
  • Guest welcome header should have it's own table.
  • Delete the 'forum, last post, threads, post' area.
  • Bottom links need their own div

Forum Home Result
Here's the final code:

HTML Code:
<!-- main -->
<if condition="$show['guest']">
<!-- guest welcome message -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>"><phrase 1="$vboptions[bbtitle]">$vbphrase[welcome_to_the_x]</phrase></td>
</tr>
<tr>
	<td class="alt1" colspan="<if condition="$vboptions['showmoderatorcolumn']">6<else />5</if>">
		<phrase 1="faq.php$session[sessionurl_q]" 2="register.php$session[sessionurl_q]">$vbphrase[first_visit_message]</phrase>
	</td>
</tr>
</table>
<br />
<!-- / guest welcome message -->
</if>


$forumbits


<div class="tborder" style="padding: $stylevar[cellspacing]px;">
<div class="tfoot smallfont" style="text-align: center; font-weight: bold; padding: $stylevar[cellpadding]px;">
	<a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a>
	<if condition="$vboptions['forumleaders']">&nbsp; &nbsp;
	<a href="showgroups.php$session[sessionurl_q]" rel="nofollow">$vbphrase[view_forum_leaders]</a></if>
</div></div>
$forumhome_markread_script
<!-- /main -->
==========

Forum Bit Overview
Now, open the 'Forum Home Templates > forumhome_forumbit_level1_nopost' template. This is the default code:

HTML Code:
<tbody>
	<tr>
		<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
			<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
			<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
			<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
		</td>
	</tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
$childforumbits
</tbody>
</if>
As you may have noticed, this code is a table row. Because we got rid of the table surrounding this table row (in the FORUMHOME template), we should now make this code into a complete table.

Forum Bit Changes
What has to be changed:
  • Add table open tag
  • The 'forum, last post, threads, post' area should be pasted before the forum rows.
  • Add table close tag
  • Add br tag at the end to create a space between the tables.

Forum Bit Result
This is the final code:

HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tbody>
	<tr>
		<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
			<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
			<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
			<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
		</td>
	</tr>
</tbody>
<if condition="$childforumbits">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
	<tr align="center">
	  <td class="thead">&nbsp;</td>
	  <td class="thead" width="100%" align="$stylevar[left]">$vbphrase[forum]</td>
	  <td class="thead" width="175">$vbphrase[last_post]</td>
	  <td class="thead">$vbphrase[threads]</td>
	  <td class="thead">$vbphrase[posts]</td>
	  <if condition="$vboptions['showmoderatorcolumn']">
	  <td class="thead">$vbphrase[moderator]</td>
	  </if>
	</tr>
$childforumbits
</tbody>
</if>
</table>
<br />
That's it, these two template modifications are enough to get the desired effect of separated forum rows.
Are you using this modification? Press INSTALL.

Bas ten Feld
www.sleekskins.com

Show Your Support

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

Comments
  #2  
Old 10-01-2006, 03:40 PM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello and thanks for the hack.

But I've two questions.

What to do with the .xml file because vB refuses it as a product and as module?

And are the differnces between your hack and this one?
Reply With Quote
  #3  
Old 10-01-2006, 03:57 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The XML File is a style file and will need to be imported via the style manager.
Reply With Quote
  #4  
Old 10-01-2006, 04:03 PM
peterska2 peterska2 is offline
 
Join Date: Oct 2003
Location: Manchester, UK
Posts: 6,504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When importing the style xml (attached) it is recommended that you then set the style as a parent style for your existing styles.

Please be aware that if you have modified your forumhome template or forumhome_forumbit_level1_nopost template then this modification will need to be applied manually as the changes will not be picked up in your existing style.

Some modifications may need to be reapplied with this modification either in full or in part.

@ Sleekskins - There may be additional changes needed to other templates, notably the forumdisplay template. If you require any assistance with this, then do not hesitate to ask.
Reply With Quote
  #5  
Old 10-01-2006, 09:46 PM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK... Houston we got a problem !!!

In Subforums, a forum which holds as a forum and not as a category, doesn't display normally.

It has no table !!!

I'm not sure but this problem seems to come from forumhome_forumbit_level1_nopost' template because when I reset it, the subforums becomes normal.
Of course then, Homepage becomes ugly...

Edit again: In fact, this hack doesn't seem to like when subforums has mixed categories and forums => forums do not have normal table to show normal informations (when posted, how many, etc.)
Reply With Quote
  #6  
Old 10-01-2006, 10:49 PM
SleekSkins's Avatar
SleekSkins SleekSkins is offline
 
Join Date: Apr 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Limerick
Hello and thanks for the hack.

But I've two questions.

What to do with the .xml file because vB refuses it as a product and as module?

And are the differnces between your hack and this one?
You have to upload it in the Style Manager, this is a template modification and not a plugin.

===

Quote:
Originally Posted by Limerick
OK... Houston we got a problem !!!

In Subforums, a forum which holds as a forum and not as a category, doesn't display normally.

It has no table !!!

I'm not sure but this problem seems to come from forumhome_forumbit_level1_nopost' template because when I reset it, the subforums becomes normal.
Of course then, Homepage becomes ugly...

Edit again: In fact, this hack doesn't seem to like when subforums has mixed categories and forums => forums do not have normal table to show normal informations (when posted, how many, etc.)
I am aware of this, but didn't think it was necessary to mention. Because I have never seen a site use a forum without a category before.
If you use forums without categories, use this plugin (without the use of this template modification).
Reply With Quote
  #7  
Old 10-02-2006, 04:33 AM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't think you understood what I meant.

My forum has subforums. These subforums are shown as categories.
They also have subforums. And some of them are categories, some other are not. There's no problem with the one shown as categories, but the one shown as forum have no table.

If you want to post into a forum, there must be a time where a forum is not shown as a caregorie but as a forum.

Reply With Quote
  #8  
Old 10-02-2006, 09:07 AM
SleekSkins's Avatar
SleekSkins SleekSkins is offline
 
Join Date: Apr 2005
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Limerick
I don't think you understood what I meant.

My forum has subforums. These subforums are shown as categories.
They also have subforums. And some of them are categories, some other are not. There's no problem with the one shown as categories, but the one shown as forum have no table.

If you want to post into a forum, there must be a time where a forum is not shown as a caregorie but as a forum.

That's the same problem, I am aware of that. If you actually use subcategories, try the plugin.
Reply With Quote
  #9  
Old 10-02-2006, 06:24 PM
Limerick Limerick is offline
 
Join Date: Sep 2006
Posts: 75
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I uninstalled your hack.
Generates problems on my forum.
Reply With Quote
  #10  
Old 10-04-2006, 10:06 AM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have seen many different attempts at this but most seem to lack little things like the misalignment or the not matching up on forumdisplay etc. I think I will stick to my original complete and working 2.2.1 splitting one just updated to 3.6.2
Reply With Quote
Reply

Thread Tools

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:59 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.04867 seconds
  • Memory Usage 2,337KB
  • Queries Executed 23 (?)
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
  • (4)bbcode_html
  • (3)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
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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