vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Split ForumHome page - Custom ForumHome Design (https://vborg.vbsupport.ru/showthread.php?t=147373)

flup 05-15-2007 10:00 PM

Split ForumHome page - Custom ForumHome Design
 
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:
  1. Frontpage (general forums/offtopic/crew)
  2. Auto (Cars, Meetings, Projects)
  3. Scooter (Scooters, Meetings, Projects)
  4. 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:
Quote:

<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&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" 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]&nbsp;</div></td>
</if>
</tr>
$childforumbits
### Above this add:
Quote:

<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&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>
</tr>
</table>

</td>
<td nowrap="nowrap" class="alt2" colspan="3"><b>Aantal Producten:</b> $forum[threadcount]</td>
</tr>
</tbody>
<else />
### Below add:
Quote:

</if>

The same goes for forumhome_forumbit_level1_post:

### Place this code above all content of forumhome_forumbit_level2_post:
Quote:

<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&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>
</tr>
</table>

</td>
<td nowrap="nowrap" class="alt2" colspan="3"><b>Aantal Producten:</b> $forum[threadcount]</td>
</tr>
</tbody>
<else />
### And below add:
Quote:

</if>
Finally Open forumhome_forumbit_level1_nopost

### Find this code:
Quote:

<tr align="center">
<td class="thead" width="5%">&nbsp;</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:
Quote:

<if condition="$_GET['page'] == 4">
<tr align="center">
<td class="thead" width="5%">&nbsp;</td>
<td class="thead" width="90%" align="$stylevar[left]">$vbphrase[forum]</td>
<td class="thead" width="5%">&nbsp;</td>
</tr>
<else />
### Below it add::
Quote:

</if>

The result will be the same layout as this page 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!

Luky 05-23-2007 10:49 AM

Demo links dont work.

flup 11-07-2007 08:35 AM

They are working again.

Davidhin 11-18-2007 03:55 PM

Links not working again

flup 11-19-2007 09:24 AM

Demo links wont be working for some time because I switched my forums working with SEO Urls.. use the screenshots instead.


All times are GMT. The time now is 07:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01476 seconds
  • Memory Usage 1,752KB
  • 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
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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