MyBB Community Forums

Full Version: 1.6 Topic Icon Problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Mybb V1.6
Theme: Royal Past

So I'm trying to add topic icons to my forum. I've got all my custom icons to show up, but I have a problem. My Gaming and Phone section has different spacing then the rest. Please take a look to see what I'm talking about. My Forum - Ownorgetpwned.com
Please, I don't want to install any plugins, or use another method. It must be something simple in the code below that I'm missing. It also adds something else to my forum that I don't want. On the far right it adds a "last post". Can you also show me where I can delete that?

Below I will post what I used to get these icons to show.

forumbit_depth1_cat
<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="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_cat
<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="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">{$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_depth2_forum
<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="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']}{$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">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" valign="top" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

forumdisplay_subforums
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="6" align="center"><strong>{$lang->sub_forums_in}</strong></td>
</tr>
<tr>
<td class="tcat"></td>
<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="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 />

This is what I used to get this far.
GUIDE
I've been playing around with the values for each section posted above. The only on that I could get to actually change my forum was the forumbit_depth1_cat.

<td class="thead" colspan="6">

It moved my forum name, threads, posts, last post category titles.
I just don't understand how 3/5 of my forums icons are placed in the right spot with proper spacing, and the other 2/5 icons have larger boxes.
Below is an example of what I'm talking about. Announcements, World of Warcraft, and Android are all in separate forums. In each forum it has multiple topics, so its wrong in several places. The first topic is correct spacing, the following two are wrong.
[Image: iconprob.png]
Replace <td class="{$bgcolor}" valign="center">
<img src="{$theme['imgdir']}/icon/{$forum['fid']}.png" />
</td> with the following;

<td class="{$bgcolor}" valign="center" width="50px">
<img src="{$theme['imgdir']}/icon/{$forum['fid']}.png" />
</td>
Thank you so much!! I love you! haha That was so frustrating!
I follow the same guide but that is not suitable for my existing theme Layout, (Column settings & Colors) are a bit different than most of the mybb themes.

Instead of replacing the existing template code, it would be more good to Add the required code in those templates.

Any help please.

My website.
Itdost community



.
@OP

You forum contains hacking material, keygens etc... as far as im aware thats not allowed here at mybb.
(2011-03-19, 12:38 PM)ahmerkhan Wrote: [ -> ]I follow the same guide but that is not suitable for my existing theme Layout, (Column settings & Colors) are a bit different than most of the mybb themes.

Instead of replacing the existing template code, it would be more good to Add the required code in those templates.

Any help please.

My website.
Itdost community



.

Just add the following code in your <td> tag;
 width="50px"
@Yaldaram,
Below is my theme code without any modification for forum icons.

forumbit_depth1_cat
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<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="220" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
<td class="tcat" width="80" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="80" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
<tr>
<td class="tfoot" colspan="5"></td>
</table>

forumbit_depth2_cat
<tr>
<td class="trow1" align="center" valign="middle" 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="trow1" valign="middle">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$subforums}</div>
</td>
<td class="trow2" valign="middle" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="trow1" valign="middle" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="trow2" valign="middle" align="right" style="white-space: nowrap">{$lastpost}</td>
</tr>

forumbit_depth2_forum
<tr>
<td class="trow1" align="center" 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="trow1">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong>{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="trow2" align="left" style="white-space: nowrap">{$lastpost}</td>
<td class="trow1" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="trow2" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
</tr>

forumdisplay_subforums
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="5" 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="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 />

My forum theme layout is different.
For examle:
1) My forum theme use (trow1, trow2) which are not in forum icon hack code.

2) My forum theme Column settings is,
Forum | Last Post | Threads | Posts

I can't replace the code because they are not same. Undecided