MyBB Codes
New Column - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Babjusi's Previous Forum General Stuff (/forumdisplay.php?fid=42)
+--- Forum: General Support (/forumdisplay.php?fid=46)
+--- Thread: New Column (/showthread.php?tid=1137)


New Column - skiilz - 12-08-2009 01:25 PM

I want to add a new column into forums like the image:
[Image: attachment.php?aid=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.


RE: New Column - babjusi - 12-08-2009 01:39 PM

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.


RE: New Column - skiilz - 12-08-2009 02:11 PM

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"&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>



RE: New Column - babjusi - 12-08-2009 02:35 PM

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?


RE: New Column - skiilz - 12-08-2009 02:38 PM

I don't know the whole rss code I just know that there is a page: http://www.forumsecurity.eu/misc.php?action=syndication
that you can select what forum you want...
http://www.forumsecurity.eu/showthread.php?tid=89&pid=197#pid197


RE: New Column - babjusi - 12-08-2009 02:42 PM

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.


RE: New Column - skiilz - 12-08-2009 02:43 PM

Ok.Thank you.
Look at the subforum:
[Image: attachment.php?aid=39]

How do I solve it?


RE: New Column - babjusi - 12-08-2009 02:45 PM

That would need some more template changes.


RE: New Column - skiilz - 12-08-2009 02:49 PM

Ok. Can you just post something here: http://community.mybboard.net/thread-60916.html
Just to bump the thread and someone help me with the rss feed links.


RE: New Column - babjusi - 12-08-2009 03:06 PM

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%">&nbsp;</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 />



RE: New Column - skiilz - 12-08-2009 03:17 PM

Thank you.
How do I put the image in vertical align center?


RE: New Column - babjusi - 12-08-2009 03:27 PM

With the style atribute with the following : "text-align: center; vertical-align: middle;"

Edit, now I see you mean the rss feed image. Change the td valign from middle to top and you should be all set:

Also you have forgotten to add the alt atribute to the img tag for the rss which is required to do so.


RE: New Column - skiilz - 12-08-2009 03:39 PM

Where do I add this code?
"text-align: center; vertical-align: middle;"


RE: New Column - babjusi - 12-08-2009 04:04 PM

Try it at the td class that wraps up your rss feed image.


RE: New Column - skiilz - 12-08-2009 04:07 PM

Here is the code for RSS: http://community.mybboard.net/thread-61001-post-436585.html#pid436585
Just to let you know.


RE: New Column - babjusi - 12-08-2009 04:09 PM

For the image change this:

<td class="{$bgcolor}" valign="middle" align="center"style="white-space:nowrap"><img src="images/post-rss.png" />
</td>

to this:

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

Thanks for the link but I don''t use the rss feed, never have btw Big Grin


RE: New Column - skiilz - 12-08-2009 04:13 PM

EEEEEE
Finally finished this update!

Have a look: http://computerandstuff.co.cc
What do you think?


RE: New Column - babjusi - 12-08-2009 04:14 PM

It looks pretty nice actually. Well done. I might try it here as well.


RE: New Column - skiilz - 12-08-2009 05:46 PM

Try it here it would be awesome!


RE: New Column - babjusi - 12-08-2009 05:48 PM

I will tomorrow. I really liked the look of it at your forum.


RE: New Column - roger - 12-08-2009 08:21 PM

I followed the instructions here to add a moderatot column after the latest posts column and everything went fine but for one thing. How can I make it that the moderators are listed under Moderators?


RE: New Column - skiilz - 12-08-2009 09:22 PM

You have to use this code {$moderators}

If you used the exact code from my thread you have to change the ''<img src="images/post-rss.png" />'' to {$moderators} in forumbit_depth2_cat and forumbit_depth2_forum.

DO NOT FORGET TO EDIT THE SUBFORUM TEMPLATE: forumdisplay_subforum