UseBB Community

The official board for UseBB help and discussion

UseBB Community » Documentation, Tips & Tricks » Creating a different forum view

Creating a different forum view

Page: 1

Author Post
Moderator
Registered: Oct 2005
Posts: 425
Location: canada
This changes the standard forum list view around to look like it does at UseBB Zone ( http://usebbzone.com/index.php to see a demo ).

I am placing this in tips & tricks, because it is not a modification, but a slight alteration to the UseBB installation.

Find in forumlist.tpl.php:


$templates['cat_header'] = '
<table class="maintable">
<tr>
<td colspan="5" class="forumcat"><a href="{cat_url}" name="{cat_anchor}" rel="nofollow">&raquo;</a> {cat_name}</td>
</tr>
<tr>
<th class="icon"></th>
<th>{l_Forum}</th>
<th class="count">{l_Topics}</th>
<th class="count">{l_Posts}</th>
<th class="lastpostinfo">{l_LatestPost}</th>
</tr>
';

$templates['forum'] = '
<tr>
<td class="icon"><img src="{img_dir}{forum_icon}" alt="{forum_status}" /></td>
<td><div class="forumname">{forum_name}</div><div class="forumdescr">{forum_descr}</div></td>
<td class="count">{total_topics}</td>
<td class="count">{total_posts}</td>
<td class="lastpostinfo">{latest_post}<div>{by_author}</div><div>{on_date}</div></td>
</tr>
';


Replace with:


$templates['cat_header'] = '
<table class="maintable">
<tr>
<td colspan="3" class="forumcat"><a href="{cat_url}" name="{cat_anchor}" rel="nofollow">&raquo;</a> {cat_name}</td>
</tr>
<tr>
<th class="icon"></th>
<th>{l_Forum}</th>
<th class="count">{l_Topics} / {l_Posts}</th>
</tr>
';

$templates['forum'] = '
<tr>
<td class="icon" rowspan="2"><img src="{img_dir}{forum_icon}" alt="{forum_status}" /></td>
<td><div class="forumname">{forum_name}</div><div class="forumdescr">{forum_descr}</div></td>
<td class="count">{total_topics} / {total_posts}</td>
</tr>
<tr>
<td class="lastpostinfo" colspan="3"><em>Latest Post:</em> {latest_post} {by_author} {on_date}</td>
</tr>
';


Feel free to play around with it and create your own look as well. :).
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Thanks Gaia,

To make this line right justified, I did:

<td class="lastpostinfo" colspan="3"><p align="right"><em>Latest Post:</em> {latest_post} {by_author} {on_date}</p></td>


Does that look right to you?
Gene
Moderator
Registered: Oct 2005
Posts: 425
Location: canada
Probably something like this would be more efficient.


<td class="lastpostinfo" colspan="3" style="text-align:right;"><em>Latest Post:</em> {latest_post} {by_author} {on_date}</td>
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Gaia wrote
Probably something like this would be more efficient.


<td class="lastpostinfo" colspan="3" style="text-align:right;"><em>Latest Post:</em> {latest_post} {by_author} {on_date}</td>


Thanks!
Gene
:D

Page: 1

UseBB Community » Documentation, Tips & Tricks » Creating a different forum view

UseBB Community is powered by UseBB 1 Forum Software