PDA

View Full Version : New Posting Features - Change Number of Post Icon Columns on New thread / Post Reply


markbolyard
12 Apr 2008, 01:57
I recently had to search the forums to locate where to change the number of columns for the post icons in the New Thread and Post Reply. I did find threads refering the the file to be modified, but no info as to where it needed changed.

So, here it is for those looking to change the number of columns displayed for your post icons. Useful for those with narrow fixed width styles where the icons may cause table breaks, or for those with fluid designs that would allow for more columns displayed.

Edit your includes/functions_newpost.php, locate the following section of code:


while ($icon = $vbulletin->db->fetch_array($icons))
{
$show['posticons'] = true;
if ($numicons % 7 == 0 AND $numicons != 0)
{
$posticonbits .= "</tr><tr><td>&nbsp;</td>";
}

$numicons++;

$iconid = $icon['iconid'];
$iconpath = $icon['iconpath'];
$alttext = $icon['title'];
if ($seliconid == $iconid)
{
$iconchecked = 'checked="checked"';
$selectedicon = array('src' => $iconpath, 'alt' => $alttext);
}
else
{
$iconchecked = '';
}

($hook = vBulletinHook::fetch_hook('posticons_bit')) ? eval($hook) : false;

eval('$posticonbits .= "' . fetch_template('posticonbit') . '";');

}

$remainder = $numicons % 7;

if ($remainder)
{
$remainingspan = 2 * (7 - $remainder);
$show['addedspan'] = true;


Change each instance of the number 7, to the desired number of columns. Save, and upload the modified file.

Remember to always keep a backup of the original file in case of bad file edits, and if you upgrade in the future, you will have to edit this file again.

Playa82
12 Apr 2008, 07:07
demo ?

Tom_S
13 Apr 2008, 06:00
So first I changed mine to 9 just to see what the heck you are talking about and I got nadda so I changed it to 20 and I still got nadda. So what the heck are you talking about?

rooban12
13 Apr 2008, 08:07
any screen shots?

markbolyard
13 Apr 2008, 12:32
Here you go. This again is in the advanced reply / new thread display. The area highlighted indicates the rows displayed when adjusting this number.

Tom_S
13 Apr 2008, 23:51
Thanks ;)

donnyaz
15 Jun 2008, 04:49
simple and awesome

Moyses
19 Sep 2008, 06:23
thanks, so with smilies, how can I do it? anyone? :(

eTiKeT™
22 Sep 2008, 12:30
very Nice Thank ;)

if ($numicons % 7 == 0 AND $numicons != 0)

Raptor
09 Mar 2009, 16:37
Works a treat with 3.8.1 PL1 - Thanks

3djobs
28 Mar 2009, 22:14
Thanks! I ve been searching through the codes where to change this but had no luck until I found your post. :up: Installed!

Cheers!