vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin Tips & Tricks (https://vborg.vbsupport.ru/forumdisplay.php?f=239)
-   -   Removing the Post and Thread count columns. (https://vborg.vbsupport.ru/showthread.php?t=141288)

Appletalk 03-05-2007 10:00 PM

Removing the Post and Thread count columns.
 
Removing the Post and Thread count columns.



This is what we want to achieve:
http://tangelo.quickshareit.com/shar...ticledc48a.gif
You can see an example here


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

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

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

<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

Code:

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

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

HTML Code:

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

Find
Code:

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

HTML Code:

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

HTML Code:

.forumcount {
 margin: 3px 0;
}

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

HTML Code:

.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 03-06-2007 01:55 PM

what happened to the demo link?

Appletalk 03-06-2007 02:39 PM

I tried to link the picture without luck. It's rewriting my link in an attempt to resize the picture I guess.

Smoothie 03-06-2007 03:16 PM

Quote:

Originally Posted by Appletalk (Post 1197181)
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 03-25-2007 11:33 PM

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 03-31-2007 03:31 AM

This is an awesome idea. I just tested it out and it worked like a charm!

Thanks alot Appletalk :)

JamieLee2k 05-03-2007 10:41 AM

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 03-01-2008 07:47 PM

Works nicely. I found in 3.6.8 there was no code to modify in forumhome_forumbit_level1_nopost

trackpads 06-01-2008 01:13 PM

How would you do this only for forum links?

cassis2k 06-12-2008 11:30 AM

Cool ^^
I test it, thanks

silly rabbit 06-22-2008 06:46 PM

Removing the Post and Thread count columns.

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

<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)
PHP Code:

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

forumhome_forumbit_level1_nopost
Find
PHP Code:

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

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

<!--
        <
td class="alt1">$forum[threadcount]</td>
        <
td class="alt2">$forum[replycount]</td>
--> 

forumhome_forumbit_level2_post
Find
PHP Code:

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

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

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

Add below:

HTML Code:

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

Find
PHP Code:

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

Add above (not below!):

HTML Code:

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

#pcnts {float: left; margin-left: 30%;}
.forumcount {
 
margin3px 0;
 
color#333;
 
font-size10px;


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

Wabbit

pranaysanghavi 07-25-2008 02:45 PM

i used it..
my forum still under construction, but looks nice if we reduce tabular clutter scattered wide..

officechai.com/testvbforum

ShadowOne 07-30-2008 06:31 PM

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 06-03-2009 06:18 PM

thanks might try this one... ;)

Mrs.Winters 07-19-2009 01:58 AM

1 Attachment(s)
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 08-17-2009 08:36 PM

Yes Mrs Winters,

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

PHP Code:

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


PHP Code:

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


MagicThemeParks 09-11-2009 11:39 PM

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 01-11-2010 02:32 AM

1 Attachment(s)
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 12-20-2014 11:23 AM

Thanks


All times are GMT. The time now is 01:09 AM.

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.02829 seconds
  • Memory Usage 1,830KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (6)bbcode_html_printable
  • (12)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete