PDA

View Full Version : Removing the Post and Thread count columns.


Appletalk
06 Mar 2007, 13:28
Removing the Post and Thread count columns.



This is what we want to achieve:
http://tangelo.quickshareit.com/share/vbarticledc48a.gif
You can see an example here (http://www.psicofxp.com/forums/)


Removing the columns


The different snippets of code might differ from style to style. I'm writing this basing it on my own (VBStyle's Element), but you have to pay close attention and focus on the code in bold. You'll identify the snippets quickly that way.

FORUMDISPLAY

Find
<td class="thead">&nbsp;&nbsp;&nbsp;$vbphrase[threads]&nbsp;&nbsp;&nbsp;</td>
<td class="thead">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$vbphrase[posts]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

Comment it or remove it. (How to comment? wrap the code between <!-- and -->)

forumhome_forumbit_level1_nopost

Find
<td class="thead">&nbsp;&nbsp;&nbsp;$vbphrase[threads]&nbsp;&nbsp;&nbsp;</td>
<td class="thead">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$vbphrase[posts]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>

Comment it or remove it.

forumhome_forumbit_level1_post

Find
<td class="alt2"><if condition="$forum[link] != ''">&nbsp;<else />$forum[threadcount]</if></td>
<td class="alt1"><if condition="$forum[link] != ''">&nbsp;<else />$forum[replycount]</if></td>

Comment it or remove it.

forumhome_forumbit_level2_post

Find

<td class="alt1" width="80"><if condition="$forum[link] != ''">&nbsp;<else />$forum[threadcount]</if></td>
<td class="alt2" width="80"><if condition="$forum[link] != ''">&nbsp;<else />$forum[replycount]</if></td>

Comment it or remove it.

======================================================
Adding the counts below the forum description

Now you might or might not want to display that information. If you do, keep reading.
Edit the following templates

forumhome_forumbit_level2_nopost

Find
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>

Add below:

<div class="smallfont forumcount"><strong>{$vbphrase[threads]}:</strong> $forum[threadcount] | <strong>{$vbphrase[posts]}:</strong> $forum[replycount]</div>

forumhome_forumbit_level2_post

Find
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px">$forum[subforums]</div></if>

Add above:

<div class="smallfont forumcount"><strong>{$vbphrase[threads]}:</strong> $forum[threadcount] | <strong>{$vbphrase[posts]}:</strong> $forum[replycount]</div>

======================================================
A bit of styling

If you test now, maybe you feel the counts we added are not separated enough from the description and subforums.

If that's your case, go to the style administration page, go to your style's "All style options" and select Main CSS.

Go to the very bottom, where it says Advanced Users:. To the very bottom of the second textarea, add:

.forumcount {
margin: 3px 0;
}

You might want to change the font styling, colors, etc. You can do that there. For example

.forumcount {
margin: 3px 0;
color: #333;
font-size: 10px;
}

Post any questions here. You can even post your style's template content if you're confused as to where to edit or add code.

Smoothie
06 Mar 2007, 14:55
what happened to the demo link?

Appletalk
06 Mar 2007, 15:39
I tried to link the picture without luck. It's rewriting my link in an attempt to resize the picture I guess.

Smoothie
06 Mar 2007, 16:16
I tried to link the picture without luck. It's rewriting my link in an attempt to resize the picture I guess.How about just re-adding the link? :)

DiSpy
26 Mar 2007, 00:33
This is a great idea... i've utilized it on my site, THANK YOU!

Question: is that site in the example link yours? It's very nicely done.
If it is, may I ask you about some of the mods you have installed?

WhyDoesItMatter
31 Mar 2007, 04:31
This is an awesome idea. I just tested it out and it worked like a charm!

Thanks alot Appletalk :)

JamieLee2k
03 May 2007, 11:41
Can someone please help me out with this hack.

I want to add this to where it says Last Post instead of the Forums so Can someone please tell me how I can do this?

helldorado
01 Mar 2008, 20:47
Works nicely. I found in 3.6.8 there was no code to modify in forumhome_forumbit_level1_nopost

trackpads
01 Jun 2008, 14:13
How would you do this only for forum links?

cassis2k
12 Jun 2008, 12:30
Cool ^^
I test it, thanks

silly rabbit
22 Jun 2008, 19:46
Removing the Post and Thread count columns (http://www.vbulletin.org/forum/showthread.php?t=141288).

Removing the columns

The different snippets of code might differ from style to style. I'm writing this basing it on my own (VBStyle's Element), but you have to pay close attention and focus on the code in bold. You'll identify the snippets quickly that way.

FORUMDISPLAY
Find
<td class="thead">&nbsp;&nbsp;&nbsp;$vbphrase[threads]&nbsp;&nbsp;&nbsp;</td>
<td class="thead">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$vbphrase[posts]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>Comment it or remove it. (How to comment? wrap the code between <!-- and -->)
Found nothing. 3.7.0 search this instead. (without the "<!- ->" of course)
<!--
<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
-->

forumhome_forumbit_level1_nopost
Find
<td class="thead">&nbsp;&nbsp;&nbsp;$vbphrase[threads]&nbsp;&nbsp;&nbsp;</td>
<td class="thead">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$vbphrase[posts]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>Comment it or remove it.
Found nothing. Did not change . . .

forumhome_forumbit_level1_post
Find
<td class="alt2"><if condition="$forum[link] != ''">&nbsp;<else />$forum[threadcount]</if></td>
<td class="alt1"><if condition="$forum[link] != ''">&nbsp;<else />$forum[replycount]</if></td>Comment it or remove it.
Search this instead:
<!--
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
-->

forumhome_forumbit_level2_post
Find
<td class="alt1" width="80"><if condition="$forum[link] != ''">&nbsp;<else />$forum[threadcount]</if></td>
<td class="alt2" width="80"><if condition="$forum[link] != ''">&nbsp;<else />$forum[replycount]</if></td>Comment it or remove it.
Same. Search this instead:
<!--
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
-->

======================================================
Adding the counts below the forum description

Now you might or might not want to display that information. If you do, keep reading.
Edit the following templates

forumhome_forumbit_level2_nopost

Find
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
Add below:

<div id="pcnts" class="smallfont forumcount"><strong>{$vbphrase[threads]}:</strong> $forum[threadcount] | <strong>{$vbphrase[posts]}:</strong> $forum[replycount]</div>forumhome_forumbit_level2_post

Find
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px">$forum[subforums]</div></if>
Add above (not below!):

<div id="pcnts" class="smallfont forumcount"><strong>{$vbphrase[threads]}:</strong> $forum[threadcount] | <strong>{$vbphrase[posts]}:</strong> $forum[replycount]</div>

======================================================

As far as styling goes I liked what appletalk did but made one minor adjustment as far as positioning was concerned. Note div "id="pcnts"" added which allows you to move both count fields as one and then the following CSS:
#pcnts {float: left; margin-left: 30%;}
.forumcount {
margin: 3px 0;
color: #333;
font-size: 10px;
}

Cheers, and thx for a nice, cleaner looking style, so how does one make a sceenshot?

Wabbit

pranaysanghavi
25 Jul 2008, 15:45
i used it..
my forum still under construction, but looks nice if we reduce tabular clutter scattered wide..

officechai.com/testvbforum

ShadowOne
30 Jul 2008, 19:31
i took out the status icon column as well..anyways that i can add a condition or anything next to the forum name so it will show members if there are new posts or not?

princeedward
03 Jun 2009, 19:18
thanks might try this one... ;)

Mrs.Winters
19 Jul 2009, 02:58
I am trying to implement this on a 3.8.3 forum. Everything worked except as shown below. Any idea how I can remove the entire columns and not just the contents that were inside?

Travelbug
17 Aug 2009, 21:36
Yes Mrs Winters,

On forumhome template comment out or delete the following code: (Should you wish to remove from forumhome)

<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>



and on forumdisplay template comment out or delete the following code: (Should you wish to remove from forumdisplay)


<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>

MagicThemeParks
12 Sep 2009, 00:39
This is great work and helped me out a lot!

This is especially useful for those styles that are fixed and need to eliminate as much wasted space as possible.

Fantastic job of explaining things clearly and specifically enough for a newbie! Thanks! :up:

MagicThemeParks
11 Jan 2010, 03:32
I just added the vBsponsors mod and the forum name and post counts are to the top of the space as opposed to centered top to bottom.

How do I get the info to align vertically in the middle?

See attachment for example

www.nofal
20 Dec 2014, 12:23
Thanks