from vb.org

**** Remove Thread Views from the Forum Display ****


This is a simple template edit to Remove Thread Views from the forum display when viewing a forum section with threads in it. Some people like to do this to reduce people from complaining about "I have 200 thread views and only 3 replies... waaaahhh", so this is a simple thing you can do to eleviate those annoyances on your forums.

**TIP: COPY these two templates & paste them into your Notepad program and save them to your hard drive as .txt template backups in case you need to restore the original code then easily.

I always like to warn people to make backups just in case heh. OK then... on to editing...



Templates to edit: 2

===================
FORUMDISPLAY template
===================
Find this code:

<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap">$vbphrase[views]</span></td>

Delete it.


Find this code:

<td class="thead" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&order=desc&sort=views" rel="nofollow">$vbphrase[views]</a> $sortarrow[views]</span></td>

Delete it.


Find this code:

<option value="views" $sort[views]>$vbphrase[number_of_views]</option>

Delete it.


===================
threadbit template
===================
Find this code:

<td class="alt2" title="<phrase 1="$thread[replycount]" 2="$thread[views]">$vbphrase[replies_x_views_y]</phrase>">

Replace it with this code:

<td class="alt2" title="<phrase 1="$thread[replycount]">$vbphrase[replies_x]</phrase>">


Find this code:

<td class="alt2" align="center">$thread[views]</td>

Delete it.



Done. The Thread Views column on the forum display page should be gone now. Hope that helps anyone who is looking to do the same :)

**Screenshot shown at Remove Thread Views on Forum Display - vBulletin.org Forum
 
##############################################
# Alternative Forumhome Lastpost Display
#
# Version: 1.31
# Author: EWGF
# For: vBulletin 3.7.x
# Made for vbulletin.org only
##############################################

This tutorial changes the look of the last posted post in the forumhome template. The vertical column for the last posts disappears and a box with the last posted post appears below the forum description. Also see the included screenshot to get a better view of this mod.

Version 1.0: First release.
Version 1.1: Added collapsable boxes.
Version 1.2: Fixed boxes for subforums.
Version 1.3: Fixed scrambled box without forum description, fixed box for no-posts forum, added missing "collapseimg" variable to lastpostby.gif, compatible with vBulletin 3.7.x.
Version 1.31: Small adjustment to the "forumhome_forumbit_level2_post" template.

Let's get started:



FORUMHOME:

Search and remove:
----------
<td class="thead" width="175">$vbphrase[last_post]</td>
----------



FORUMDISPLAY

Search and remove:
----------
<td class="thead" width="175">$vbphrase[last_post]</td>
----------



forumhome_forumbit_level1_post:

Replace with:
----------
<tbody>
<tr align="center">
<td><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
<td class="alt1Active" align="$stylevar[align=left]" id="f$forum[forumid]">
<div>
<a style="float:$stylevar[align=right]" href="#top" onclick="return toggle_collapse('forumhome_lastpostby_$forum[forumid]')"><img id="collapseimg_forumhome_lastpostby_$forum[forumid]" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_lastpostby].gif" alt="" border="0" /></a><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
<if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
</div>
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<div id="collapseobj_forumhome_lastpostby_$forum[forumid]" class="smallfont" style="padding:6px; margin-top:6px; border: 1px solid #000000; $vbcollapse[collapseobj_forumhome_lastpostby]" align="$stylevar[align=left]">$forum[lastpostinfo]</div>
<if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
<if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
<td class="alt1">$forum[threadcount]</td>
<td class="alt2">$forum[replycount]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
</tbody>
<if condition="$childforumbits">
<tbody>
$childforumbits
</tbody>
</if>
----------



forumhome_forumbit_level2_post:

Search:
----------
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
----------


Add before:
----------
<a style="float:$stylevar[align=right]" href="#top" onclick="return toggle_collapse('forumhome_lastpostby_$forum[forumid]')"><img id="collapseimg_forumhome_lastpostby_$forum[forumid]" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_lastpostby].gif" alt="" border="0" /></a>
----------


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


Add after:
----------
<div id="collapseobj_forumhome_lastpostby_$forum[forumid]" class="smallfont" style="padding:6px; margin-top:6px; border: 1px solid #000000; $vbcollapse[collapseobj_forumhome_lastpostby]" align="$stylevar[align=left]">$forum[lastpostinfo]</div>
----------


Search and remove:
----------
<td class="alt2">$forum[lastpostinfo]</td>
----------



forumhome_lastpostby:

Replace with:
----------
<if condition="$show['lastpostinfo']">
<div style="float:right">
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span> <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a></if>
</div>
<if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if> <a href="showthread.php?$session[sessionurl]goto=newpost&t=$lastpostinfo[lastthreadid]" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a> - <phrase 1="member.php?$session[sessionurl]find=lastposter&f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
<else />
<div class="smallfont" align="$stylevar[align=right]">
$lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
<a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>
-----------
 
Installation
First, Upload the bitfield file to your xml folder located in your includes folder. (/forum/includes/xml/)

Next, Import the product file.

Finally Edit your templates. Find forumhome_forumbit_level2_post under your Forum Home Templates list.

Replace the entire template with this, only if you are using the default template. If this template has been edited, then you need to add the style code manually.

Code:
<tr align="center">
    <td class="alt2" style="background-color:$forum[bgcolor2]; color:$forum[textcolor];"><img src="$stylevar[imgdir_statusicon]/$forum[imageprefix]forum_$forum[statusicon].gif" alt="" border="0" id="forum_statusicon_$forum[forumid]" /></td>
    <td class="alt1Active" align="$stylevar[align=left]" id="f$forum[forumid]" style="background-color: $forum[bgcolor1]; color: $forum[textcolor];">
        <div>
            <a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]"><strong>$forum[title]</strong></a>
            <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
        </div>
        <if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
        <if condition="$show['forumsubscription']"><div class="smallfont"><strong><a href="subscription.php?$session[sessionurl]do=removesubscription&f=$forum[forumid]" rel="nofollow">$vbphrase[unsubscribe_from_this_forum]</a></strong></div></if>
        <if condition="$show['subforums']"><div class="smallfont" style="margin-top:$stylevar[cellpadding]px"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
    </td>
    <td class="alt2" style="background-color: $forum[bgcolor2]; color: $forum[textcolor];">$forum[lastpostinfo]</td>
    <td class="alt1" style="background-color: $forum[bgcolor1]; color: $forum[textcolor];">$forum[threadcount]</td>
    <td class="alt2" style="background-color: $forum[bgcolor2]; color: $forum[textcolor];">$forum[replycount]</td>
    <if condition="$vboptions['showmoderatorcolumn']">
    <td class="alt1" style="background-color: $forum[bgcolor1]; color: $forum[textcolor];"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
    </if>
</tr>
$childforumbits

After you are done, edit the properties of each forum.

If you are not using the default forumhome_forumbit_level2_post template but you are a coder, then you need to add this code to the <td> tags switching between styles as you would like.

Code:
 style="background-color: $forum[bgcolor1]; color: $forum[textcolor];"


Code:
 style="background-color: $forum[bgcolor2]; color: $forum[textcolor];"

If you are not a coder or do not understand this stuff, then just ask.
 
Back
Top