Log in

View Full Version : Problem with Post Icon alignment


SBlueman
09-04-2007, 03:21 AM
For some reason my post icons are displaying "outside the box" and I don't know how to fix it. Any suggestions?

Princeton
09-04-2007, 01:04 PM
that's because they are too wide ..
I believe the fix would be to create smaller post icons or modify function construct_icons() in functions_newpost.php (shorten the number of columns).

!!!cyr0n_k0r
12-25-2007, 02:06 AM
Here is the solution.

Find /includes/functions_newpost.php
Find this 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;


Find everywhere it has "7" and change that to the number of columns you would like. In my case, I wanted 3, so I changed it to :


while ($icon = $vbulletin->db->fetch_array($icons))
{
$show['posticons'] = true;
if ($numicons % 3 == 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 % 3;

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


DONE!