01-08-2023, 07:37 PM
Open index.php
find
add after
find
insert after
open home.tpl
find
add after
The number of upcoming auctions is selected by the same environmental variable like for last created auctions i.e. 'lastitemsnumber'.
find
Code:
$auc_last = ($i > 0) ? true : false;
add after
Code:
// get upcomming auctions
$query = "SELECT id, title, starts from " . $DBPrefix . "auctions
WHERE closed = 0 AND suspended = 0
AND starts >= " . $NOW . "
ORDER BY starts DESC
LIMIT " . $system->SETTINGS['lastitemsnumber'];
$res = mysql_query($query);
$system->check_mysql($res, $query, __LINE__, __FILE__);
$i = 0;
$bgcolor = '#FFFFFF';
while ($row = mysql_fetch_assoc($res))
{
$template->assign_block_vars('auc_future', array(
'BGCOLOUR' => ($bgcolor == '#FFFFFF') ? '#FFFEEE' : '#FFFFFF',
'DATE' => ArrangeDateNoCorrection($row['starts'] + $system->tdiff),
'ID' => $row['id'],
'TITLE' => $row['title']
));
$i++;
}
$auc_future = ($i > 0) ? true : false;
find
Code:
'B_AUC_LAST' => $auc_last,
insert after
Code:
'B_AUC_FUTURE' => $auc_future,
open home.tpl
find
Code:
<!-- IF B_AUC_LAST -->
add after
Code:
<!-- IF B_AUC_FUTURE -->
<tr>
<td class="titTable4">{L_25_0115}</td>
</tr>
<tr>
<td class="table2">
<!-- BEGIN auc_future -->
<p style="background-color:{auc_last.BGCOLOUR};display:block;">{auc_future.DATE} <a href="{SITEURL}item.php?id={auc_future.ID}">{auc_future.TITLE}</a></p>
<!-- END auc_future -->
</td>
</tr>
<!-- ENDIF -->
The number of upcoming auctions is selected by the same environmental variable like for last created auctions i.e. 'lastitemsnumber'.