Support ⇒ Dragonfly CMS v10 ⇒ [bug] Banner system ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum IndexDragonfly CMS v10

[bug] Banner system Reply to topic


The banners system no longer works using banners.php in the root directory since XMLFEED no longer accepts database queries.

I suggest changing the start of Our_Sponsors/index.php to:
if (isset($_GET['bid']) && $_GET->uint('bid')) {
$bid = $_GET->uint('bid');
$row = $db->uFetchRow("SELECT clickurl FROM {$db->TBL->banner} WHERE bid = {$bid}");
$db->query("UPDATE {$db->TBL->banner} SET clicks = clicks + 1 WHERE bid = {$bid}");
URL::redirect($row[0]);

} elseif ($user_id = is_user()) {

and the end of banner.php to
if ($banner['textban']) {
return '<div style="text-align:center; margin:auto; width:'.$banner['text_width'].'px; height:'.$banner['text_height'].'px; '.(!empty($banner['text_bg']) ? 'background-color:'.$banner['text_bg'].';"' : '"').'><a href="'.getlink('Our_Sponsors&bid='.$banner['bid']).'"'.(!empty($banner['text_clr']) ? ' style="color:'.$banner['text_clr'].';"' : '').' target="_blank">'.$banner['text_title'].'</a></div>';
} else {
return '<a href="'.getlink('Our_Sponsors&bid='.$banner['bid']).'" target="_blank"><img src="'.$banner['imageurl'].'" style="border:0;" alt="'.$banner['alttext'].'" title="'.$banner['alttext'].'" /></a>';
}

I also removed the # for the colours - not required.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

Last edited by Phoenix on Sun Jan 06, 2019 9:27 pm; edited 3 times in total

All times are UTC


Jump to: