i found the code that is messing my flags upp.
Code: Select all
// MOD :: CLASSIFIEDS MOD -- START
if($config['enable_classifieds'])
{
$sql = 'SELECT COUNT(ad_id) as NUMBER_ADS
FROM ' . CLASSIFIEDS_TABLE . '
WHERE ad_status = 0
AND invisible = 0
AND ad_expire > '.time();
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$template->assign_vars(array(
'TOTAL_ADS' => ($config['enable_classifieds']) ? '<strong>'.$row['NUMBER_ADS'].'</strong>' : '',
));
if ($auth->acl_get('u_view_classifieds') && ( ($config['display_ads_on_index'] && $config['ad_num_display_on_index'] !='0') || ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0') ) )
{
if ($config['display_ads_on_index'] && $user->data['classified_display_recent_ads'] && $config['ad_num_display_on_index'] !='0' )
{
display_recent_ads($config['ad_num_display_on_index']);
$template->assign_vars(array(
'S_DISPLAY_ADS_ON_INDEX' => true,
'S_RECENT_ADS_TOP' => ($config['recent_ads_place']) ? true : false,
));
}
if ($config['display_rand_ads_on_index'] && $config['rand_ad_num_display_on_index'] !='0' )
{
display_random_ads($config['rand_ad_num_display_on_index']);
$template->assign_vars(array(
'S_DISPLAY_RAND_ADS_ON_INDEX' => true,
'S_RAND_ADS_TOP' => ($config['rand_ads_place']) ? true : false,
));
}
$template->assign_vars(array(
'ALLOW_AD_PREFIX' => $config['allow_ad_prefix'],
'AD_PREFIX_COLOR' => $config['ad_prefix_color'],
));
}
}
// MOD :: CLASSIFIEDS MOD -- END
Could somebody help me is there something wrong with the code ?
When i remove all of this code from my index.php the flags shows correctly, but when i add it the flags miltiplies with 2