Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin Tips & Tricks

Reply
 
Thread Tools
Removing the Post and Thread count columns.
Appletalk
Join Date: Mar 2007
Posts: 3

 

Show Printable Version Email this Page Subscription
Appletalk Appletalk is offline 03-05-2007, 10:00 PM

Removing the Post and Thread count columns.



This is what we want to achieve:

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.
Reply With Quote
  #12  
Old 06-22-2008, 06:46 PM
silly rabbit silly rabbit is offline
 
Join Date: Oct 2005
Location: Atlanta/NYC
Posts: 92
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #13  
Old 07-25-2008, 02:45 PM
pranaysanghavi's Avatar
pranaysanghavi pranaysanghavi is offline
 
Join Date: Jun 2008
Location: India
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

officechai.com/testvbforum
Reply With Quote
  #14  
Old 07-30-2008, 06:31 PM
ShadowOne ShadowOne is offline
 
Join Date: May 2005
Location: Tampa
Posts: 338
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #15  
Old 06-03-2009, 06:18 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks might try this one...
Reply With Quote
  #16  
Old 07-19-2009, 01:58 AM
Mrs.Winters's Avatar
Mrs.Winters Mrs.Winters is offline
 
Join Date: Apr 2007
Location: In my house
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Attached Images
File Type: gif removethreadsposts.gif (10.6 KB, 0 views)
Reply With Quote
  #17  
Old 08-17-2009, 08:36 PM
Travelbug Travelbug is offline
 
Join Date: Aug 2009
Location: Italy
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #18  
Old 09-11-2009, 11:39 PM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #19  
Old 01-11-2010, 02:32 AM
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
Posts: 850
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Attached Images
File Type: jpg After_vBSponsor.jpg (25.5 KB, 0 views)
Reply With Quote
  #20  
Old 12-20-2014, 11:23 AM
www.nofal www.nofal is offline
 
Join Date: Jan 2010
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
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:15 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.05275 seconds
  • Memory Usage 2,364KB
  • Queries Executed 25 (?)
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
  • (6)bbcode_code
  • (6)bbcode_html
  • (12)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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
  • (2)postbit_attachment
  • (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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete