MyBB Community Forums
Resize the columns - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Resize the columns (/thread-214406.html)



Resize the columns - YeahIamBlond - 2017-11-28

Just installed this software for a community that I am building. Love it! Have a really simple question. I dont want to change the template or colors or anything. Just want to resize the columns on the frontpage so my reader can read the full title of the posts. Guess this is really simple. Any help appreciated.

[Image: McJATEB.png]


RE: Resize the columns - WallBB - 2017-11-28

Hello,
That is pretty simple, go to your forum admin cp > Templates and styles > Templates > Default Templates> Forum Bit templates > forumbit_depth1_cat

Replace the content with this
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead{$expthead}" 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" width="5%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat"  width="40%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="15%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="15%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>
<td class="tcat" width="25%" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
<br />

You can control the width above by changing for each column, hope it helps.

Regards
WallBB


RE: Resize the columns - YeahIamBlond - 2017-11-28

This worked perfectly. Thank you so much. Really appreciate you helping me out. However one small issue. I have been able to change the width of the columns but the text doesnt resize with it. How do I achieve that? See screenshot.

[Image: Fj02YD4.png]

Actually I found that. Seems max length of the subject is hardcoded in functions_forumlist.php

					if(my_strlen($lastpost_subject) > 25)
					{
						$lastpost_subject = my_substr($lastpost_subject, 0, 25)."...";
					}


Thanks again for your help!


RE: Resize the columns - OakleY - 2017-12-02

Nice little change. But how do you get rid of this? It displays the Forum name in two places.

I would like only the left.


RE: Resize the columns - .m. - 2017-12-02

^ check in forumbit_depth1_cat template of the theme - it should have td cell code with {$lang->forumbit_forum} only once
<td class="tcat" colspan="2"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>



RE: Resize the columns - OakleY - 2017-12-02

Thank you .m.

This is what it looks like now

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

What should be changed?



RE: Resize the columns - .m. - 2017-12-02

^ you can replace below
<td class="tcat" width="5%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat"  width="40%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="15%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
with
<td class="tcat" colspan="2" width="5%"><span class="smalltext"><strong>{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="55%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>