PDA

View Full Version : Separate forums on forumhome, category spacing


SleekSkins
09-28-2006, 10:00 PM
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 (https://vborg.vbsupport.ru/attachment.php?attachmentid=55021) 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:

<!-- 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">$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:

<!-- 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:

<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:

<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 (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=127875).


[b]Bas ten Feld
www.sleekskins.com

Limerick
10-01-2006, 03:40 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=123713&highlight=categories)?

peterska2
10-01-2006, 03:57 PM
The XML File is a style file and will need to be imported via the style manager.

peterska2
10-01-2006, 04:03 PM
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.

Limerick
10-01-2006, 09:46 PM
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.)

SleekSkins
10-01-2006, 10:49 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=123713&highlight=categories)?
You have to upload it in the Style Manager, this is a template modification and not a plugin.

===

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 (https://vborg.vbsupport.ru/showthread.php?t=123713) (without the use of this template modification).

Limerick
10-02-2006, 04:33 AM
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.

https://vborg.vbsupport.ru/ (http://img207.imageshack.us/my.php?image=subforumno6.gif)

SleekSkins
10-02-2006, 09:07 AM
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.

https://vborg.vbsupport.ru/ (http://img207.imageshack.us/my.php?image=subforumno6.gif)
That's the same problem, I am aware of that. If you actually use subcategories, try the plugin.

Limerick
10-02-2006, 06:24 PM
Sorry, I uninstalled your hack.
Generates problems on my forum.

Floris
10-04-2006, 10:06 AM
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 :D

SleekSkins
10-04-2006, 07:20 PM
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 :D
The forumdisplay works perfect unless you use a subcategory. I am not familiar with 2.2.1 but go for it :D

Limerick
10-05-2006, 06:41 PM
I think I will stick to my original complete and working 2.2.1 splitting one :) just updated to 3.6.2 :D

Where is it Floris? :knockedout:

Brent H
10-07-2006, 07:31 AM
I'd like to know as well ;)

jwaany
10-20-2006, 12:27 PM
Thank you very much
Good work ;

SleekSkins
10-22-2006, 10:08 PM
Thank you very much
Good work ;
Thanks alot!
I've updated to version 3.6.2, by the way.

lazyseller
10-27-2006, 01:25 AM
it says Invalid File Specified when adding product..

same thing uploading the plugin...

Tony P
10-27-2006, 02:38 AM
Installed like a charm... many thanks!

Ev!L ErN!E
10-27-2006, 06:38 AM
it says Invalid File Specified when adding product..

same thing uploading the plugin...

same here.... whats up?

oldfan
10-27-2006, 07:05 AM
Where is it Floris? :knockedout:

I'll second that

SleekSkins
10-29-2006, 02:27 PM
lazyseller and Ev!L ErN!E: The XML file should be uploaded as a style, not as a plugin.

killerkraft
01-26-2007, 03:45 PM
Thank's - Installed and working fine.

killerkraft
01-26-2007, 05:18 PM
Thank's - Installed and working fine.

Actually i did unistall because of some problems in display.

Sorry.

Ahmed_Eissa
07-24-2007, 03:22 PM
Hi,

I'm really wana put this in my forum. Can this work under vBulletin 3.6.7 PL1?

Thank you

Ahmed

rapidphim
08-09-2007, 07:09 PM
Hello,
Can someone please upgrade this to 3.6.8 and make sure the subforum display correctly? Thanks!

vithorius
06-04-2008, 03:17 PM
Hi! I just think that this Mod is GREAT!!! :up:

The problem is that I can't import in my vb (v 3.6.10) :confused: :confused:

Is there a way to import this Mod in vb 3.6.10??? Is there any kind of update to this Mod?

Thank you very much! :up:

vithorius
08-01-2008, 08:25 AM
Hi again everybody!

Is there any news for this mod?

How does it works on vB 7.7.x? :confused:



Thank you! :up: :up:

timscarlet
02-14-2009, 02:29 AM
hello, i have followed the instructions to make category spacing for forums, and also backed up both the forum home templates (text copy and paste), and no forums are appearing! they are still in the forum manager, but the can't see them on the webpage!

and tried to refer back to original text in template, but still no forums! they are gone!

but again, i found out this is a mod for 3.6 and i have found 3.7

please help, my forum has no forums categories now! no forum at all!

Tim

CapitanoN6
10-10-2009, 06:56 AM
run on 3.8?