01-08-2023, 09:06 PM
Title:Total Auctions
Version(s): 1.03
Credits: drakky20
Install Time:2 minutes
Install Difficulty: easy
Description: Just a small mod that shows the total number of auctions of the site on the index page after the All Cagegories Link
Files/List of changes :
root/index.php
themes/default/home.tpl
just thought it was strange not having a total number of auctions so I've implemented this small change
##open root/index.php
## find
## add after
## find
## replace with
## save/close index.php
## open root/themes/default/home.tpl
## find
## replace with
## save/close home.tpl
## end of mod
Version(s): 1.03
Credits: drakky20
Install Time:2 minutes
Install Difficulty: easy
Description: Just a small mod that shows the total number of auctions of the site on the index page after the All Cagegories Link
Files/List of changes :
root/index.php
themes/default/home.tpl
just thought it was strange not having a total number of auctions so I've implemented this small change
##open root/index.php
## find
Code:
$query = "SELECT * FROM " . $DBPrefix . "categories
WHERE parent_id = " . mysql_result($res, 0) . "
" . $catsorting . "
LIMIT " . $system->SETTINGS['catstoshow'];
$res = mysql_query($query);
$system->check_mysql($res, $query, __LINE__, __FILE__);
while ($row = mysql_fetch_assoc($res))
{
## add after
Code:
$total_auctions=$total_auctions+$row['sub_counter'];
## find
Code:
'B_NEWS_BOX' => ($system->SETTINGS['newsbox'] == 1)
## replace with
Code:
## replace with
'B_NEWS_BOX' => ($system->SETTINGS['newsbox'] == 1),
'CATAUCTOTAL'=>'('.$total_auctions.')' ,
## save/close index.php
## open root/themes/default/home.tpl
## find
Code:
<a href="{SITEURL}browse.php?id=0">{L_277}</a>
## replace with
Code:
<a href="{SITEURL}browse.php?id=0">{L_277}</a>{CATAUCTOTAL}
## save/close home.tpl
## end of mod