I want to add a new column into forums like the image:
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.
After you add this where you want it to the forumbit_depth1_cat template, you must increase the widh as well. So this code:
<td class="thead" colspan="5">
Should be
<td class="thead" colspan="7">
However, you need the other part of the rss feed code to add it at the forum listing.
I will have to go now, but if you post the whole code, I will check it out for you tomorrow.
I got it to work in the forum categories:
[attachment=40]
But look at the subforum:
[attachment=39]
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" alt="" />
</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>
Is that from the default theme? This from the default theme modified with the rss feed.
<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" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</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="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_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 />
Then go to the forumbit_depth2_forum template:
<tr>
<td class="{$bgcolor}" align="center" valign="top" width="1"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" /></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">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">RSS feed content here</strong></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>
This is the result.
What is the whole rss code btw?
I believe that it is quite another matter then. Personally I don't use it so I won''t be able to help you more with it. let us hope that someone at mybb knows more about rss feed and can help you further.
That would need some more template changes.
No need to bump that post. Here you go, go to the forumdisplay_subforums template and change the code in there with this:
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="8" align="center"><strong>{$lang->sub_forums_in}</strong></td>
</tr>
<tr>
<td class="tcat" width="2%"> </td>
<td class="tcat" width="59%"><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="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$forums}
</table>
<br />