Banners Module

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Cambo

Re: Banners Module

Post 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
alby

Re: Banners Module

Post 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
rvan
New Member
New Member
Posts: 9
Joined: Wed Oct 17, 2007 10:59 am

Re: Banners Module

Post 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
rvan
New Member
New Member
Posts: 9
Joined: Wed Oct 17, 2007 10:59 am

Re: Banners Module

Post 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.
rvan
New Member
New Member
Posts: 9
Joined: Wed Oct 17, 2007 10:59 am

Re: Banners Module - Unique : Solved

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Banners Module

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
rvan
New Member
New Member
Posts: 9
Joined: Wed Oct 17, 2007 10:59 am

Re: Banners Module

Post 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 :).
cb2004
Power Poster
Power Poster
Posts: 317
Joined: Wed Jul 04, 2007 3:39 pm

Re: Banners Module

Post by cb2004 »

An update to this mod would be great Calguy :)
User avatar
sugna
Forum Members
Forum Members
Posts: 196
Joined: Wed Oct 10, 2007 3:04 pm
Location: USA

Re: Banners Module

Post 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
JeremyBASS

Re: Banners Module

Post 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

Code: Select all

../images/Cherc/NewBlock.jpg
to see it on the public side... that is had to work with... still works though... any ideas?
Locked

Return to “Modules/Add-Ons”