Themes By Design

[TUTORIAL] New thread information layout on forumhome

Chris
08-24-2008, 10:56 PM
Here is a new way to display the latest post, thread count, and post count on your forum home. This is a very easy tutorial so let's do it!

OK first go into adminCP - Styles and Templates - Style manager - Your Style - Edit Templates

You will have to edit 2 templates.

The first one is the forumhome template. Open it and find the following:


<td class="thead">$vbphrase[threads]</td>
<td class="thead">$vbphrase[posts]</td>
Now delete these 2 lines.

Next find:

<td class="thead">$vbphrase[last_post]</td>
Change to this:

<td class="thead">Information</td>
Save this template.

The second template is the forumhome_forumbit_level2_post. Open it and replace the entire contents of this template with the following:


<tr align="center">
<td class="alt2"><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[left]" id="f$forum[forumid]">
<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&amp;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" width="30%"> <div class="smallfont" align="left"> <div style="clear:both">
$forum[lastpostinfo]</div>
<div class="style2" style="padding:4px; margin-top:2px; background-color: #EBEBEB; border: 1px solid #CCCCCC;"><center><strong>Threads:&nbsp;$forum[threadcount]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts:&nbsp;$forum[replycount]</center></div></td></tr><style type="text/css"> <!--
.style2 {
color: #666666;
font-size: 11px;
font-family: Arial, Helvetica, sans-serif;
}
--> </style>

<if condition="$vboptions['showmoderatorcolumn']">
<td class="alt1"><div class="smallfont">$forum[moderators]&nbsp;</div></td>
</if>
</tr>
$childforumbits
Click save and exit.

You now have the new layout and look for your latest thread, post and thread count for each forum.

To change the colors of your layout look for the following code in the above code:

$forum[lastpostinfo]</div>
<div class="style2" style="padding:4px; margin-top:2px; background-color: #EBEBEB; border: 1px solid #CCCCCC;"><center><strong>Threads:&nbsp;$forum[threadcount]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Posts:&nbsp;$forum[replycount]</center></div></td></tr><style type="text/css"> <!--
.style2 {
color: #666666;
font-size: 11px;
font-family: Arial, Helvetica, sans-serif;
}
You will see the HTML color codes above. Just change them to the color of your choice.

Enjoy!!!!


I will add a screen shot once I get one to show.


AS ALWAYS be sure to back up your templates before making any edits. You do this at your own risk!!

Sybil
12-24-2008, 08:57 PM
Thanks, But is there a way to make the box longer?

Stream
01-25-2009, 04:27 AM
Just came across this and I must say it's great, it looks so much cleaner than the standard template - Nice work.

--Stream

Fungsten
06-20-2010, 04:10 PM
Is there one for VB 4?