MyBB Community Forums

Full Version: New Column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I want to add a new column into forums like the image:
[attachment=16406]

Can anyone help me with the code and the location please?

I tried adding this code to the forumbit_depth1_cat but I messed up the threads and posts columns:
<td class="tcat" width="25" align="center" style="white-space:nowrap"><span class="smalltext"><strong>RSS</strong></span></td>

Thank you.
Just add a new div. It would be easier wouldn't it?
How do I add it?
Go to the template it belongs in, and add a new div tag.
Where? lol... I tried in all positions but it didn't work...
I think that I have to add the code in the forumbit_depth1_cat template. Am I right?

I have added this code to forumbit_depth1_cat template:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="6">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img"class="expander" alt="{$expaltext}" title="{$expaltext}"/></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br/><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat"></td>
<td class="tcat"></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="25" align="center" style="white-space:nowrap"><span class="smalltext"><strong>RSS</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space:nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space:nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />

Look what I got:
[attachment=16407]
Atm I don''t have much time to post the changes needed but it ain''t that easy as that and no div is required. Another template must be edited as well plus the width has to be adjusted etc.
So... Can you post the changes later on?
(2009-12-07, 05:37 PM)Skiilz Wrote: [ -> ]So... Can you post the changes later on?

It will have to be sometime tomorrow afternoon. If noone has helped you until then, remind me again.
I got it to work in the forum categories:
[attachment=16428]

But look at the subforum:
[attachment=16429]

How do I solve it?
How do I set the individual link for each forum rss?(is possible to set one "{$forum_url_rss}" parameter?)

TEMPLATES EDITED:

forumbit_depth2_cat:
<tr>
<td class="{$bgcolor}" align="center" valign="top"width="1">
<img src="{$theme['imgdir']}/{$lightbulb['folder']}.png" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}"class="ajax_mark_read" id="mark_read_{$forum['fid']}" />
</td>
<td class="{$bgcolor}" valign="center"
<img src="{$theme['imgdir']}/icon/{$forum['fid']}.png" />
</td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$subforums}
</div>
</td>
<td class="{$bgcolor}" valign="top" align="center"style="white-space:nowrap"><img src="images/post-rss.png" />
</td>
<td class="{$bgcolor}" valign="top" align="center"style="white-space:nowrap">{$threads}{$unapproved['unapproved_threads']}
</td>
<td class="{$bgcolor}" valign="top" align="center"style="white-space:nowrap">{$posts}{$unapproved['unapproved_posts']}
</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}
</td>
</tr>

forumbit_depth1_cat
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="8">
<div class="expcolimage"><img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img"class="expander" alt="{$expaltext}" title="{$expaltext}"/></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br/><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat"></td>
<td class="tcat"></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="25" align="center" style="white-space:nowrap"><span class="smalltext"><strong>RSS</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space:nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space:nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />

forumbit_depth2_forum
<tr>

<td class="{$bgcolor}" align="center" valign="top"
width="1"><img
src="{$theme['imgdir']}/{$lightbulb['folder']}.png"
alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}"
class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></td>

<td class="{$bgcolor}" valign="center" width="50px">

<img src="{$theme['imgdir']}/icon/{$forum['fid']}.png"&nbsp;&nbsp;alt=""&nbsp;&nbsp;/>

</td>

<td class="{$bgcolor}" valign="top">

<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>

</td>
<td class="{$bgcolor}" valign="top" align="center"style="white-space:nowrap"><img src="images/post-rss.png" />
</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space:nowrap">{$threads}{$unapproved['unapproved_threads']}</td>

<td class="{$bgcolor}" valign="top" align="center" style="white-space:nowrap">{$posts}{$unapproved['unapproved_posts']}</td>

<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>

</tr>
You need to edit your forumdisplay_subforums template too.
Pages: 1 2