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 Wed Feb 06, 2019 3:35 am; edited 4 times in total


okay, forget that - just change banners.php to
if (isset($_GET['bid'])) { $loader = 'base'; require_once('index.php'); $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]); }

However, you still need to remove the # before $banner['text_bg'] and $banner['text_clr'] in banner.php

That approach also resolves the XMLFEED issue which was giving me grief with PayPal IPN returns.

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

Last edited by Phoenix on Tue Feb 05, 2019 2:38 pm; edited 1 time in total


Push done, there are other changes regarding this.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Thanks - glad you picked up the $_POST->text('text_title') - I forgot to mention that Smile

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


Yeap, I had no banners setup and sincerely I never use this module so I had quite few issues to get one displayed 😂

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


I don't use them either, but I needed something to fill a space in my header 😂
The $_POST->text was actually the first issue I struck, then the issues kept coming, so I forgot all about it 😳
The bonus for me is resolving PayPal IPN returns 😉

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

All times are UTC


Jump to: