Title: Custom Forumlayout for different pages
Add-on for:
Split ForumHome Page in Multiple Pages
Template mod by: Joshua de Gier (flup)
What does it do?
This template modification will just
explain how you can make various forumhome layouts for the different pages created with the '
Split ForumHome Page in Multiple Pages' plugin.
For example, I created 4 pages for my 'tuning' forums:
- Frontpage (general forums/offtopic/crew)
- Auto (Cars, Meetings, Projects)
- Scooter (Scooters, Meetings, Projects)
- Sellside (Here people can sell their stuff)
On this last page, I wanted a different layout than on the common pages. Here's what I came up with:
Common Forum Layout:
http://www.tuningmax.nl/index.php?page=1
http://www.tuningmax.nl/index.php?page=2
http://www.tuningmax.nl/index.php?page=3
Sellside Forum Layout:
http://www.tuningmax.nl/index.php?page=4
As you can see, this is a improved forum layout for the forums where people can buy / sell their products.
How can I do this?!
You need some basic knowledge on HTML/Design if you want to change these things. As example I'm gonna show you my HTML code to do this.
Installation Guide
Step 1: Go to your admin panel
Step 2: Go to Style Manager -> Edit Templates
Step 3: Look for 'Forum Home Templates' and double click
forumhome_forumbit_level2_post
Search:
<tr align="center">
<td class="alt2"><img src="<if condition="$show['customstatusicon']">$forum[customicon]<else />$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif</if>" alt="" border="0" /></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&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" nowrap="nowrap">$forum[lastpostinfo]</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] </div></td>
</if>
</tr>
$childforumbits
###
Above this add:
<if condition="$_GET['page'] == 4">
<tbody>
<tr align="center">
<td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="<if condition="$show['customstatusicon']">$forum[customicon]<else />$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif</if>" alt="" border="0" /></td>
<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td width="100%">
<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>
<table style="width: 95%; vertical-align: middle; left-padding: 10px; height: 25px; padding-left: 10px;"><tr><td style="background-color: #FAF6B8; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #B0B0AF;"><span class="smallfont"><b>Laatste Aanbieding:</b> $forum[lastpostinfo]</span></td></tr></table>
<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>
</tr>
</table>
</td>
<td nowrap="nowrap" class="alt2" colspan="3"><b>Aantal Producten:</b> $forum[threadcount]</td>
</tr>
</tbody>
<else />
###
Below add:
The same goes for
forumhome_forumbit_level1_post:
###
Place this code above all content of forumhome_forumbit_level2_post:
<if condition="$_GET['page'] == 4">
<tbody>
<tr align="center">
<td class="alt1Active" colspan="2" align="$stylevar[left]" id="f$forum[forumid]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="<if condition="$show['customstatusicon']">$forum[customicon]<else />$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif</if>" alt="" border="0" /></td>
<td><img src="$vboptions[cleargifurl]" alt="" width="9" height="1" border="0" /></td>
<td width="100%">
<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>
<table style="width: 95%; vertical-align: middle; left-padding: 10px; height: 25px; padding-left: 10px;"><tr><td style="background-color: #FAF6B8; border-bottom-style: dotted; border-bottom-width: 1px; border-bottom-color: #B0B0AF;"><span class="smallfont"><b>Laatste Aanbieding:</b> $forum[lastpostinfo]</span></td></tr></table>
<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>
</tr>
</table>
</td>
<td nowrap="nowrap" class="alt2" colspan="3"><b>Aantal Producten:</b> $forum[threadcount]</td>
</tr>
</tbody>
<else />
###
And below add:
Finally Open
forumhome_forumbit_level1_nopost
###
Find this code:
<tr align="center">
<td class="thead" width="5%"> </td>
<td class="thead" width="60%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" with="40%">$vbphrase[last_post]</td>
<td class="thead" width="5%">$vbphrase[threads]</td>
<td class="thead" width="5%">$vbphrase[posts]</td>
<if condition="$vboptions['showmoderatorcolumn']">
<td class="thead">$vbphrase[moderator]</td>
</if>
</tr>
###
Above it add:
<if condition="$_GET['page'] == 4">
<tr align="center">
<td class="thead" width="5%"> </td>
<td class="thead" width="90%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="5%"> </td>
</tr>
<else />
###
Below it add::
The result will be the same layout as http://www.tuningmax.nl/index.php?page=4 or the screenshot on all forums which are placed on
page 4!
If you need them to be on page 2, change all red coloured text in the above mentioned template codes.
Screenshots:
Screenshot 1: Default forum layout (it's a customized skin, but you still can use this template modification tutorial on all skins! Just be sure you know what to edit (tables, collspans and stuff)
Screenshot 2: The look after the template modification
Good luck!