Page 4 of 4
Re: Banners Module
Posted: Mon Dec 10, 2007 6:24 am
by Cambo
Hmmm... I have the same problem.
I get this as the SQL query - SELECT * FROM cmsms_module_banners_categories WHERE name = ?
When I look in action.default.php the query is hard-coded like this.
I have never seen a ? in a query like this. Is this correct?
Shouldn't there be a variable that contains the category name picked up from category="blah" ?
Any clues?
Regards
Cambo
Re: Banners Module
Posted: Mon Dec 10, 2007 8:20 am
by alby
Cambo wrote:
I get this as the SQL query - SELECT * FROM cmsms_module_banners_categories WHERE name = ?
When I look in action.default.php the query is hard-coded like this.
I have never seen a ? in a query like this. Is this correct?
It's ADODB sintax.
Look in code and you see, after query, a row (about): $db->Execute($query, array(VARIABLE_REPLACE_?));
Alby
Re: Banners Module
Posted: Wed Dec 12, 2007 7:46 pm
by rvan
secoif wrote:
Have you created categories and have the required category parameter in the tag where you call the banner?
eg:
you've created a banner category called "BannerCategory"
and Created a banner called "My Banner"
and your tag code looks like:
{cms_module module="Banners" category="BannerCategory"}
cause it just sounds like it's not getting the right value from the db
what cmsms version?
tried uninstalling and reinstalling the module or installing a previous version?
checked the database to see if there are actually any rows there?
?
Additionally pulled this one myself today. Then realized staring me in the face is that the Image reference "Specify a file relative to your uploads directory". Totally didn't think this through as I specifically set it up so the customer could just use the ImageManager. In other words 'uploads/images/...'. Left out /images and received the db error. DUH
Re: Banners Module
Posted: Wed Dec 12, 2007 8:01 pm
by rvan
I have a customer that is currently using OpenAds (way over his head) and much more than needed. Would like to use Banners as it mostly provides the functionality needed. The one piece I need to implement this is to have uniqueness per page display. Front page and children to have 5 random banners (ads 120x90) in left column but be unique on every refresh.
Any hints would be welcome. Using CMS 1.1.4.1, Banners 2.1.0.
Re: Banners Module - Unique : Solved
Posted: Wed Dec 12, 2007 10:49 pm
by rvan
rvan wrote:
I have a customer that is currently using OpenAds (way over his head) and much more than needed. Would like to use Banners as it mostly provides the functionality needed. The one piece I need to implement this is to have uniqueness per page display. Front page and children to have 5 random banners (ads 120x90) in left column but be unique on every refresh.
Any hints would be welcome. Using CMS 1.1.4.1, Banners 2.1.0.
In template:
{ad_button show='5' category='Left'}
In UDT called ad_button:
$show = (isset($params['show'])) ? $params['show'] : 1;
$category = (isset($params['category'])) ? $params['category'] : "Left";
global $gCms;
$smarty =& $gCms->GetSmarty();
require_once $smarty->_get_plugin_filepath('function', 'eval');
$template= "{cms_module module='Banners' category=$category}";
$numBanners = 0;
$numTries = 0;
$maxTries = 15;
$ads_array = array();
$show = '5';
while (($numBanners $template), $smarty);
if(! array_key_exists($key, $ads_array)){
$ads_array[$key] = 1;
$numBanners++;
}
$numTries++;
}
//echo "$numTries $numBanners";
foreach ($ads_array as $key => $val ){
echo $key;
}
May not be pretty but is functional. Great module calguy1000.
Re: Banners Module
Posted: Thu Dec 13, 2007 12:00 am
by calguy1000
gawd.... it appears people are still using this module... I guess I should update it....ugh.
it becomes number 973 on my list.
Re: Banners Module
Posted: Thu Dec 13, 2007 6:34 pm
by rvan
calguy1000 wrote:
gawd.... it appears people are still using this module... I guess I should update it....ugh.
it becomes number 973 on my list.
It is very functional and with a little imagination can be used for a variety of things.
http://www.lakeontariooutdoors.com
One thing I found cumbersome was having to repeatedly select the category when adding more than one banner to a category. It insists on jumping back to the Category tab after being on the Banner tab and selecting a category.
After adding a banner it defaults back to the first category and the round robin selection starts anew.
End users will/do not understand this and prompts annoying phone calls.
FYI: You done good

.
Re: Banners Module
Posted: Tue Dec 18, 2007 9:00 am
by cb2004
An update to this mod would be great Calguy

Re: Banners Module
Posted: Sat Dec 29, 2007 7:04 pm
by sugna
One thing I need is to have the banners rotate on the static page without having to refresh or revisit the page.
Thanks Cal Guy, No pressure or anything
Shane
Re: Banners Module
Posted: Tue Apr 08, 2008 5:12 pm
by JeremyBASS
Hey small issue here... it's kinda hard to work around... so when in the admin side and try to put up a banner from another folder other then uploads i have to put
Code: Select all
../CMSfolder/images/Cherc/NewBlock.jpg
in the images source to see it on the admin side
BUT... i have to put
to see it on the public side... that is had to work with... still works though... any ideas?