As for the random part ...
1. go to sub disp_cat
2. search for
Code: @{[disp_random('pic', 4)]}<br>
3. type 8 instead of 4
Code:
@{[disp_random('pic', 8)]}<br>
4. replace sub get_table_val with this
Code:sub get_table_val {
my ($option, $random_data) = @_;
my $pic_cnt = 0;
my $row_switch = (int(@$random_data / 2) + 1) if @$random_data > 4;
my (
$close_time, $image, $img_info, $title, $bids, $bid, $cat,
$item, $row, $rowcolor, $tbl_val, $the_bid, $date, $time,
);
local $_;
foreach (@$random_data) {
$pic_cnt++;
(
$close_time,
$image,
$title,
$bids,
$bid,
$cat,
$item
) = split /\[\]/, $_;
$img_info = qq|<img src="$config{'img_url'}/$image"@{[img_size($image, 110)]}>|
if $option eq 'pic' and $image !~ /http\:/;
$img_info = qq|<img src="$config{'icon_url'}/$config{'if_image'}" border="0">|
if $option eq 'list' and $image =~ /\.\w{3,}/;
$img_info = qq|<img src="$config{'icon_url'}/$config{'no_image'}" border="0">|
if $option eq 'list' and $image !~ /\.\w{3,}/;
$the_bid = form_currency($bid);
($date, $time) = form_date($close_time) if $option eq 'list';
($row, $rowcolor) = get_row_color($row);
$tbl_val .= <<EO_HTML if $option eq 'pic' and $#$random_data >= 0 and $row_switch and $pic_cnt == $row_switch;
</tr>
<tr>
EO_HTML
$tbl_val .= <<EO_HTML if $option eq 'pic' and $#$random_data >= 0;
<td align="center" bgcolor="#FFFFFF">
<a href="$ENV{'SCRIPT_NAME'}?action=dispitem&category=$cat&item=$item&lang=$form{'lang'}">
$img_info<br><b>$title</b><br>Current Bid: $the_bid
</a>
<br>
</td>
EO_HTML
$tbl_val .= <<EO_HTML if $option eq 'list' and $#$random_data >= 0;
<tr $$rowcolor>
<td align="center" width="30">$img_info </td>
<td align="left" width="200" nowrap>
<a href="$ENV{'SCRIPT_NAME'}?action=dispitem&category=$cat&item=$item&lang=$form{'lang'}">
<font size="2">$title</font></a>
</td>
<td align="left" nowrap>
<a href="$ENV{'SCRIPT_NAME'}?action=search&searchtype=items&searchstring=$cat&lang=$form{'lang'}">
<font size="2">$category{$cat}</font></a>
</td>
<td align="center" nowrap>$bids</td>
<td align="right" nowrap>$the_bid </td>
<td align="center" nowrap><font size="1">
$date<br>$time</font>
</td>
</tr>
EO_HTML
}
$tbl_val .= <<EO_HTML if $#$random_data < 0;
<tr>
<td colspan="6" align="center" bgcolor="$config{'colortablebody'}">
<font face="ARIAL" size="2">$txt{'There are no items matching your request'}</font>
</td>
</tr>
</table>
</div>
EO_HTML
$tbl_val .= <<EO_HTML if $option eq 'pic' and $#$random_data >= 0;
</tr>
</table>
</div>
EO_HTML
$tbl_val .= <<EO_HTML if $option eq 'list' and $#$random_data >= 0;
</table>
</div>
EO_HTML
return $tbl_val;
}