Help test the new banner module
I'm putting the final touches on my update of the banner module (the current CVS version is simply the old banner module updated to use the form API).
New features:
- banners as nodes (comments and revisions now possible, easier taxonomy handling)
- module-provided banner blocks (no need to fiddle with php in blocks or template edits)
- banner stacking (show multiple banners in one banner block)
- better taxonomy filtering (sponsored by http://www.advancedwebdesign.com/)
- support for uploaded image/text banners, text banners, remote banners and javascript banners
Please download and test the latest version from: http://www.ratatosk.net/software/banner/files/banner-rc1.tar.gz
For now, please post feedback here or by using my contact form.

Will give it a go
Thanks for new features and effort poured into this, i hope to be able to test a bit between today and tomorrow.
Cheers,
Marco
Banner table Updated?
The new features are excellent :-)
Do I need to make any changes to the banner tables in the database? I get the following error when I go to the My banners page.
user warning: Unknown column 'b.vid' in 'on clause' query: SELECT COUNT(*) FROM node n INNER JOIN banner b ON n.vid=b.vid in /var/www/drupal/drupal-4.7.0/includes/database.mysql.inc on line 120.
I checked my banner table and it doesn't have a vid and the download doesn't supply a new mysql file.
Thanks for your help.
Cheers,
Kimeros.
New banner table definition
The banner table has been changed dramatically in this version since banners are now essentially nodes like stories and pages.
This version of the banner module is not a drop-in replacement of the 4.6 or current CVS version, and it only works with Drupal 4.7.
Currently, no upgrade path exists, but if enough people are interested I will try to provide an upgrade script.
This version of the module uses the new .install file instead of separate .mysql and .pgsql files (which means that the table will be created when the module is first enabled). I'll include separate files in the next preview release.
Ah, thank you! I added that
Ah, thank you!
I added that table to my database and it's all looking good.
I just manually made them in phpMyAdmin from the banner.install
Here is the exported query.
CREATE TABLE `banner` (`nid` int(10) unsigned NOT NULL default '0',
`vid` int(10) unsigned NOT NULL default '0',
`url` varchar(255) NOT NULL default '',
`target` varchar(8) NOT NULL default '',
`workflow` tinyint(3) unsigned NOT NULL default '0',
`position` tinyint(3) unsigned NOT NULL default '0',
`mode` tinyint(3) unsigned NOT NULL default '0',
`content` text NOT NULL,
`cache` text NOT NULL,
`notify_day` tinyint(3) unsigned NOT NULL default '0',
`notify_week` tinyint(3) unsigned NOT NULL default '0',
`notify_failed` int(3) unsigned NOT NULL default '0',
`notify_send` tinyint(1) unsigned NOT NULL default '0',
`notify_sent` tinyint(1) unsigned NOT NULL default '0',
`chance` int(10) unsigned NOT NULL default '1',
`clicks_max` int(10) unsigned NOT NULL default '0',
`views_max` int(10) unsigned NOT NULL default '0',
`views_week_max` int(10) unsigned NOT NULL default '0',
`views_day_max` int(10) unsigned NOT NULL default '0',
`views` int(10) unsigned NOT NULL default '0',
`views_week` int(10) unsigned NOT NULL default '0',
`views_day` int(10) unsigned NOT NULL default '0',
`clicks` int(10) unsigned NOT NULL default '0',
`clicks_week` int(10) unsigned NOT NULL default '0',
`clicks_day` int(10) unsigned NOT NULL default '0',
`width` int(10) unsigned NOT NULL default '0',
`height` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`nid`,`vid`),
KEY `nid` (`nid`),
KEY `workflow` (`workflow`)
) TYPE=MyISAM;
and:
i also run the following query found also in the banner.install:
INSERT INTO variable (name, value) VALUES ('node_options_banner', 'a:1:{i:0;s:6:\"status\";}');Please correct me if i'm wrong
NOTE: banner.install didn't work for me
I'm getting errors on installation and use
I've go a fresh install of Drupal 4.7.1 and have just installed your module.
On installation I got the following errors;
* user warning: Duplicate entry 'node_options_banner' for key 1 query: INSERT INTO variable (name, value) VALUES ('node_options_banner', 'a:1:i:0;s:6:"status";'); in /home/php5/instar/instar.se/drupal/includes/database.mysql.inc on line 120.* warning: copy(./modules/banner/banner_db.php) [function.copy]: failed to open stream: No such file or directory in /home/php5/instar/instar.se/drupal/modules/banner.install on line 122.
* Couldn't copy file 'banner_db.php' to site root. Please perform this operation manually.
* warning: copy(./modules/banner/banner_file.php) [function.copy]: failed to open stream: No such file or directory in /home/php5/instar/instar.se/drupal/modules/banner.install on line 125.
* Couldn't copy file 'banner_file.php' to site root. Please perform this operation manually.
I have copied "banner_db.php" and "banner_file.php" to "/sites/default/"
warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1621.When I edit a banner i get the above error message. I can add banners despite this but I can't se any "Block 1" in my blocks list.
If I add a banner I get the following error before the form;
create content
Submit banner
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1614.
The database has been installed and looks right.
Regards,
/Patrik
Great work
Great work! This is a must-have module for many sites, and so bringing it up to speed for 4.7 deserves some applause, gratitude and feedback.
So, clap clap, thanks very much and on to the feedback:
* I get the same 'in_array()... Wrong datatype for second argument' problem as ultrapingo when creating/editing banners
* The block only seems to appear for banners in groups other than '0' - did I miss something?
* Banner stats aren't working - 0 for views and clicks.
I will be spending some time getting this module up and running next week, so I'll report back on these after I've had a chance to look at it a bit closer.
Thanks again, wulff!
---
paul byrne
paul.leafish.co.uk | www.leafish.co.uk
waiting
waiting for the final version ..good luck
The block only seems to
No, that's an error. Please post the output from the following queries:
SELECT * FROM variable WHERE name LIKE 'banner_block%';SELECT nid, vid, position FROM banner;
This is probably a case of the documentation lagging a bit behind the code. Banner clicks and views are not counted for admins and the banner's owner.
Thanks for taking the time to test the module.
SQL results
Results from SQL queries (as dumped data):
SELECT * FROM variable WHERE name LIKE 'banner_block%';INSERT INTO `variable` (`name`, `value`) VALUES ('banner_blocks', 's:1:"1";'),('banner_block_0_count', 's:1:"5";'),
('banner_block_0_position', 's:1:"1";');
SELECT nid, vid, position FROM banner;INSERT INTO `banner` (`nid`, `vid`, `position`) VALUES (61, 61, 1),(61, 62, 1),
(61, 63, 1),
(61, 64, 1),
(61, 65, 1),
(61, 66, 1),
(62, 67, 1),
(63, 68, 1);
OK gotcha - that seems to be working fine then. One other thing - blocks with a banner count of > 1 still only show 1 banner - but I haven't worked out why yet.
Cheers for the reply & keep up the good work!
---
paul byrne
paul.leafish.co.uk | www.leafish.co.uk
Fixed count to have more banners within one banner block
I also wanted to show three banners in one block instead of just one. I downloaded the module on 2006-11-23 from http://www.ratatosk.net/software/banner/files/banner-rc1.tar.gz (INSTALL.txt shows $Id: INSTALL,v 1.14 2006/04/13 15:14:48 wulff Exp $). It didn't use the count parameter in the file banner_db.php at all, so I added a few lines to take advantage of it.
I don't know how to report this properly, but here are the lines I added (denoted by rseiser):
$count = $_GET['count']; //rseiser: count of banners within block:
:
$random_numbers_used=array(); //rseiser: start with array where no banners were chosen yet
for($i_banner=0;$i_banner<$count;$i_banner++) { //rseiser: number of banners in this banner block
// choose random banner
do { //rseiser
if ($max > 0) {
$random = mt_rand(0, $max);
}
else {
$random = 0;
}
} while(in_array($random, $random_numbers_used) && count($random_numbers_used)-1<$max); //rseiser: we break the loop if
//rseiser: a) either a banner is found that was not used yet
//rseiser: b) or the maximum number of banners was already used up. The chosen one will just be used another time.
$random_numbers_used[] = $random; //rseiser: adds the chosen banner index to an array to avoid getting duplicate banners within block
:
:
:
print $banner->cache;
} //rseiser: repeat for next banner $i_banner
?>
I don't know how to report this properly
rseiser, please have a look at the banner.module issues queue and submit this as a patch in the relative issue if it exists, or simply create it if no one reported it yet.
cheers,
marco
Ok, I put the post into the
Ok, I put the post into the issues queue. (http://drupal.org/node/99593). Let me know if I should have done anything differently.
.install file issues
user warning: Duplicate entry 'node_options_banner' for key 1This was caused by an overly optimistic .install file. I have changed the INSERT to a REPLACE which should do the trick.
warning: copy(./modules/banner/banner_db.php) [function.copy]: failed to open stream: No such file or directory in /home/php5/instar/instar.se/drupal/modules/banner.install on line 122.Did you extract the files directly to the Drupal modules directory or to a subdirectory called banner? The current .install file assumes that the banner module files are in
./modules/banner/.in_array() [function.in-array]: Wrong datatype for second argument in /home/php5/instar/instar.se/drupal/modules/node.module on line 1621I have not been able to provoke this error. Can you please post the steps to reproduce?
The errors around line 1600 seem to relate to the handling of the node form. I'll go over the banner module's form definitions and see if something is amiss.
Thank you very much for your feedback!
You were right! Still some errors though..
Thank's for the reply
You are right, I did copy the content of the banner directory and not the whole directory. I have done a clean install again and this time I copied the "banner" folder. When I enable the "banner" module for the first time i get;
* warning: copy(./modules/banner/banner_db.php) [function.copy]: failed to open stream: No such file or directory in /home/php5/instar/mysite.com/drupal/sites/drupal.mysite.com/modules/banner/banner.install on line 122.* Couldn't copy file 'banner_db.php' to site root. Please perform this operation manually.
* warning: copy(./modules/banner/banner_file.php) [function.copy]: failed to open stream: No such file or directory in /home/php5/instar/mysite.com/drupal/sites/drupal.mysite.com/modules/banner/banner.install on line 125.
* Couldn't copy file 'banner_file.php' to site root. Please perform this operation manually.
I copied the files and put it in the root of my drupal-directory. After setting the number of banners in "Settings->Banner" I got them visible in "Blocks" :)
I still get some errors about array when I add a banner, but everything seems to work anyway.
I will continue with my testing..
Keep up the great work!
OK, the remaining warnings
OK, the remaining warnings are because your webserver doesn't have write access to the site root. I'll modify the .install file to check for write permissions before trying to copy the files.
Use drupal_get_path?
A better approach here might be to use the drupal_get_path function:
// copy cache handlers to Drupal root- if (!copy('./modules/banner/banner_db.php', './banner_db.php')) {
+ if (!copy(drupal_get_path('module', 'banner') .'/banner_db.php', './banner_db.php')) {
drupal_set_message("Couldn't copy file 'banner_db.php' to site root. Please perform this operation manually.", 'error');
}
- if (!copy('./modules/banner/banner_file.php', './banner_file.php')) {
+ if (!copy(drupal_get_path('module', 'banner') .'/banner_file.php', './banner_file.php')) {
drupal_set_message("Couldn't copy file 'banner_file.php' to site root. Please perform this operation manually.", 'error');
}
---
paul byrne
paul.leafish.co.uk | www.leafish.co.uk
Displaying Block Banner for 4.7
I've installed the module fine.
I can create banners easily.
But I'm having trouble displaying them.
I've checked the My Banner page and My Banner is there (It shows up as both active and enabled).
I've gone to admin -> access control and ticked view banners for both anonymous users and authenticated users.
I've configured the block Banner 1 with the following:
Banner group: 1
Banner count: 1
and have left all the other settings default.
I've enabled the block Banner 1.
I've double checked that my banner is in group 1.
I have unlimited views and clicks left.
Any ideas?
I have only created one banner and am asking for one banner to be displayed, If there is only one should it show all the time?
I have only created one
Yes, it should.
Can you please post the output of the queries mentioned in my reply to leafish_paul?
What is the output of http://yoursite/banner_db.php?position=1&count=1&terms=0
Output
mysql> SELECT * FROM variable WHERE name LIKE 'banner_block%';
+-------------------------+----------+
| name | value |
+-------------------------+----------+
| banner_blocks | s:1:"1"; |
| banner_block_0_count | s:1:"1"; |
| banner_block_0_position | s:1:"1"; |
+-------------------------+----------+
3 rows in set (0.00 sec)
mysql> SELECT nid, vid, position FROM banner;
+-----+-----+----------+
| nid | vid | position |
+-----+-----+----------+
| 111 | 125 | 1 | //this one is enabled
| 116 | 134 | 1 | //this one is pending
+-----+-----+----------+
2 rows in set (0.00 sec)
What is the output of http://yoursite/banner_db.php?position=1&count=1&terms=0
//Outputs the correct image src for the enabled banner except for typo spelling of width*
document.write('<a href="/drupal/drupal-4.7.0/?q=banner/111" title="http://ossuary/drupal/drupal-4.7.0/?q=event" target="_self"><img src="http://ossuary/drupal/drupal-4.7.0/files/pink.jpg" widht="200" height="182" alt="" /></a>');If I make a custom block and paste that output into it. The image for the banner shows up in it surrounded by the document.write function as text.
*widht typo found in banner.module line 1887
Thanks for your help.
Cheers,
Kimeros
Conflict with event module?
I note in this error report, you are using the event module.
I am having a similar issue, in that the banner shows only on some nodes.
In particular, it doen't siplay on Event enabled modules [in my case, a flexinode module], but also not on forum discussions.
Any clues what might be causing this?
Regards
Alan
Not tested
I haven't tested the banner.module alongside the event.module. I'll take a look.
works fine on me
i dunno, but banners show in both calendar event page and on event-enabled nodes for me.
What version of the module are you using?
I am on Drupal 4.7.2, Event.module v 1.183.2.6 2006/05/22
Settings look good
Your settings look good, but I have a suspicion that the handling of banner revisions need some work. I'll look through the database queries to try and spot any errors.
errors and other problem
I too am getting this error:
in_array(): Wrong datatype for second argument in /home/renradio/public_html/drupal/modules/node.module on line 1621.
Though it seems to work ok as content but I cant get it to display as a block. The block is there but no banner. I've tried different group settings, re-uploading and using a URL for the banner to no avail.
try changing in_array() to
try changing in_array() to array() in the offending file, then it should work.
Content-Types Settings
I fixed it by going to /admin/settings/content-types/banner and selecting "Published".
http://drupal.org/node/17158
http://drupal.org/node/25379
-- Ben
Banners dont show / warning in_array(): Wrong datatype...
I get the warning in My Banners/ 'banner_name'/Edit (one warning), and in Create Content/Banner (repeated warning five times) after submitting: i.e.
The banner is created in content with unlimited views etc, and status published. However in My Banners/ 'banner_name'/View, in the statistics status column it shows disabled. I don't beleive this refers to statistics module. Yet in admin/banners/List Status column it shows enabled.
I have the banner in blocks but can't get it to show in sidebar , footer or content.
I addded Banner to the Vocabulary list of categories (no terms), and this appeared in the created Banner but this made no difference to the end result, still unable to view the banner.
Two Issues
1.
Firefox is showing this error on loading.. even with the banners block disabled.
Error: missing ; before statementSource File: http://mysite/banner_file.php?position=0&count=1&terms=0&max=2&path=file... 2, Column: 9
Source Code:
Fatal error: Call to undefined function: _banner2_refresh_cache() in /home/mysite/banner_file.php on line 98
2.
The second thing is the inability to put a banner where I really want it with this new block arrangement . Drupal lets you move a block to the left, right, header or footer. Well when you choose the header it puts it right under the logo. It looks terrible - and putting it on the bottom of the page or on the side is not what the sponsor agreed to in the contract. Anyway, this won't work for me or the site. Is there no way to position this banner block where you really want it ?
on Problem 2
On Problem 2:
I think this could be outside the remit of the Banner module, and could be solved in a few different ways.
1. Use CSS to position the Banner item wherever you want it.
2. Go a step further, create a new 'region' in your template, outside header, footer etc, and use this to place your banner into.
Regards
Alan
Ok Thanks
I'll give the second suggestion a go. I had tried moving it in CSS already. Something like this worked in 4.6 but in this version, managed to send it to the bottom of the page or made it disappear completely.
#banner {position: absolute;
right: 5px;
top: 5px;
}
I really hope I can figure out where they define the 'regions' - and in a hurry.
This release (4.7) is giving me way too many problems. Every time I open Administration - watchdog is screaming with neverending errors and warnings ( both a fresh install with imported data or the upgrade ). With the time I'm spending just getting the site put back together - I could just switch to a different CMS. If it wasn't so obvious that this community is moving forward - I'd be gone already. I hope these errors clear before I have to upload to the main server - or I'm going to have no choice but drop drupal. Things like this banner module mean a ton of sponsorship money for our members.
Don't ignore errors
This is off-topic.
Don't ignore errors.
The chances are that they are telling you something has gone wrong, and needs to be fixed
I suggest you search the forums for the errors you are having, and see how to resolve them.
where is the upload thing for the image deal?
I'm looking at the new banner thing and where's the place for the upload of the image?
Go to:
Create Content --> Banner
it's not there
I choose the upload option but there's no browser button for uploading an image.
Where is the upload image box? seems to be missing!
Yes, indeed, the upload image box seems to be missing in the 4.7 banner version. The 4.6 version had a upload capability which allowed the upload of not only an image (jpeg, gif, etc...), but html block code, which included src image; target url; publisher i.d. capability.
The content box in 4.7 version seems to intend to take the place of the upload function in 4.6, however, it does not seem to recognize any image/html code combination pasted inside.
Has anyone found a solution for this?
Thanks to All, Especially u Wulff--- you are my hero!
Publishing
Info missing from docs
To use uploaded banners, you need to enable and configure the upload module.
Attachment / Filemanager Support?
Any ideas here? or do you need to use the built-in Upload module?
-JV
images
normally on a remote server, e.g. amazon, in html url form, or yes Upload. i use Ecto for image links, on os x.
support for longer URL
I would like to see the URL field be extended.
Right now I could not use this for banners that come out of Linkshare, where the link to the actual banner is something like:
<a href="http://click.linksynergy.com/fs-bin/click?id=zzUrF1YIcjw&offerid=78941.10000286&type=4&subid=0"><IMG width="468" height="60" alt="468x60 GC animiated" border="0" src="http://images.apple.com/itunesaffiliates/468x60/468x60GCanimated.gif"></a><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=zzUrF1YIcjw&bids=78941.10000286&type=4&subid=0">ok.. maybe not the url.. but something like this doesn't seem to be supported.. as it looks like linkshare uses the second image to report back to there servers how many times that banner image is displayed..
Wulff-- Great Job on the Banner Module, but I 2nd this request.
Both Linkshare & Commission Junction seem to combine elements of the target url; image and publishers I.D. into one block of html code.
The previous banner module allowed the user to "upload" this code as an html file and it worked great. Clicking on the resulting image which display would automatically take the clicker to the target home page of advertiser and the embedded code properly tracked clicks, as well as, views and the publishers clicks & commissions.
The current 4.7 banner version seems to have the following requirements/deficiency:
a) seems to require that a separate target url be entered even when said target url would have been included in aforemention html code block.
b) image/html code upload: there does not seem to be an upload capability (box)specifically for images/html code as existed in 4.6 banner version. Have attempted to paste html code which includes target url, in "box" provided in 4.7 version and it does seem to have any effect.
The only upload capability seems to be for a type of picture file maybe utilized as an attachment. This upload function does not accept the html code as a valid upload item and thus rejects it.
Wulff, please let us know how we can continue to support you in this testing process as u support us. Again, thank u for your effort. You have done a magnificient job.
Thanks,
Publishing
This is possible
Follow these steps to achieve what you describe:
http://click.linksynergy.com/fs-bin/click?id=zzUrF1YIcjw&offerid=78941.10000286&type=4&subid=0in the URL field<IMG width="468" height="60" alt="468x60 GC animiated" border="0" src="http://images.apple.com/itunesaffiliates/468x60/468x60GCanimated.gif"><IMG border="0" width="1" height="1" src="http://ad.linksynergy.com/fs-bin/show?id=zzUrF1YIcjw&bids=78941.10000286&type=4&subid=0">
Warning in_array()
I just installed the banner module into a new install of Drupal 4.7. Similar to others here, I am getting the following error message and the banners will not display in the blocks, although I can create them.
Please let me know if there is a fix for this or a work-a-round.
Thanks,
Josh
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/sportsbu/public_html/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/sportsbu/public_html/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/sportsbu/public_html/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/sportsbu/public_html/modules/node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/sportsbu/public_html/modules/node.module on line 1614.
The market leader
Howdy,
just to add some spice to this, here is a link to the features list of the (probably) most complete ad serving and management script out there:
W3Matters RevSense
just in case Wulff or anyone is looking for some inspiration ;)
The script can be used after buying a license, and the source is open for customization.
I am not affiliated in any way to it, i just considered all the most known Ad Management scripts and RevSense really rocks for it's abundance of possibilities and features. Pity it doesn't seem to be maintained anymore..
cheers
Nice features
ok, finally managed to give this a go and first of all much respect to Wulff for his proudnes in doing this!
:: PROBLEMS:
- banner.install didn't work for me.
- if TinyMCE is enabled, the 'Description' text area is too small, and TinyMCE cannot be excluded on banner pages because the URL is just the same as any other node/x/edit URL
:: SUPPORT!:
- "show multiple banners in one banner block": does this mean in rotation or one below another? (i only succeed in the first case!)
- "better taxonomy filtering": cannot find how do i categorize banners with taxonomy...help apreciated
:: FEATURES PROPOSED:
1. Add a 'Block title' field to banner blocks: so one could for example display the title "sponsored by" over the first of his banners block, or another could have an "affiliates" banner block and a "supporters" one.
2. Set maximum uploaded banner image size/weight: and in case of excess prompt user to resize and re-attach.
3. Google-style Textual ads: it would be just great if users could purchase/upload textual banners à la Google Adsense. Maybe a separate module would be needed here to allow:
- users fill in the different ad fields (es: title, description, link, image)
- description is limited to a certain number of chars
- themed final text ads (set colours, background, frame, text styles)
4. Banners as E-commerce products: integrate banner.module with e-commerce.module, so that banner spaces/impressions/hits can be purchased as "products". Banners are now nodes, so this should hopefully help.
5. Geotargeted banners: It would be nice to support geotargeting of banners so that a banner can be set to be displayed only to visitors from a particular country. The popular (and free) Maxmind GeoIP database could be used for the purpose.
#1, 2 (and 5?) shouldn't be too hard to get, while #3 and 4 would need much further consideration.
Am flying too much?
Cheers
More about Taxonomy filtering...
The taxonomy filtering is designed to target banners on nodes that have been classified by taxonomy. Let's pretend you have a travel based website, with nodes tagged as US, Canada, Mexco, etc. In the banner settings (I hope this hasn't changed) you select the taxonomy you would like to associate with the banner module - in this case "Region". Upon uploading each banner, there is a list box selection for the terms in the "Region" vocabulary. Let's select "Mexico" for our pretend banner. What will happen now, is that any nodes that are tagged as Mexico, will display that particular banner. This is a very simple example. It becomes more comlicated when You introduce more than one vocabulary.
For example:
If a node is tagged with 2 terms from different vocabs, it will serve up banners that matches BOTH terms first (AND matching).
If it can only find a banner that matches one term, it will provide that one (OR matching).
If it can't find any match, it will display something randomly.
This is the new improved filtering. Previously, it only matched according to OR logic.
Advanced Web Design
Preventing TinyMCE
There's a new standard in progress. You'll be able to add the attribute
#rtewith valuefalseto your textarea to prevent rich-text editors.More info: http://drupal.org/node/81297
Daniel F. Kudwien
unleashed mind
just posting to track this
just posting to track this thread.
I'm looking forward to this.
I'm looking forward to this.
same
same here
--------------------->
underpressure
http://ravalonline.com
I'm new to this module and
I'm new to this module and just set it up, yesterday. I'm still building, but so far so good.
One thing- the width of the URL column in the admin table (/admin/banner) should be a fixed width.
Many URLs are long and it pushes the further columns way out of view. Being able to read the entire link address isn't necessary, it only needs to be an active link that can be clicked.
Oh! here's a quick fix: in banner.module, move that URL line 1446
$row[] = $banner->url;on down to line 1456.
tried it...
couldn't get it to show banners that involved javascript ( self-updating,content-sensitive type). I did selct javascript as format, and didn't post it in the URL, but in the body/content section. Same javascript works fine in a simple block.
Try These (2) Scenerios
I understand that u attempted javascript entry in body/content section without empty url. Try each the following and see if either gets u closer to the results that u are seeking:
1)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter javascript.
2)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter text.
The banner module is very nice. To get the remaining bugs out will provide such a powerful and strategic tool for the community.
Hope it helps!
I've tried your advice on
I've tried your advice on the following script
<script language="JavaScript" src="http://impdk.tradedoubler.com/imp/16400196/1300693" charset="ISO-8859-1"></script>No banner comes on the page, but strangely I can see the banner when reviewing the bannercontents before submitting !?
Anyone for any Idea what I'm doing wrong? The remote image is a flash-banner (*.swf)
Aha!
Solved that within minutes! :))
Put http://impdk.tradedoubler.com/imp/16400196/1300693 in the URL-container and changing the script to
<script language="JavaScript" src="%url" charset="ISO-8859-1"></script>Now the banner shows on my pages but not in the review-section (can live with that)
Try These (2) Scenerios
I understand that u attempted javascript entry in body/content section without empty url. Try each the following and see if either gets u closer to the results that u are seeking:
1)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter javascript.
2)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter text.
The banner module is very nice. To get the remaining bugs out will provide such a powerful and strategic tool for the community.
Hope it helps!
Try These (2) Scenerios
I understand that u attempted javascript entry in body/content section with empty url. Try each the following and see if either gets u closer to the results that u are seeking:
1)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter javascript.
2)
a) add a target url
b) enter javascript in content/body section.
c) @ type, enter text.
The banner module is very nice. To get the remaining bugs out will provide such a powerful and strategic tool for the community.
Hope it helps!
Hello
Hello
Thanks for the work on this - it is going to be very useful.
I just installed the module, and enabled it. When I go to create content banner, I get the following error report:
* warning: in_array(): Wrong datatype for second argument in /var/www/html/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /var/www/html/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /var/www/html/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /var/www/html/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /var/www/html/modules/node.module on line 1614.
I don't know where to go from here.
Minty
Adding an edit
I'm using Drupal 4.7.2
Modules Banner, content, help, image, menu, page, path, search, statistics, story, taxonomy, taxonomy_theme, text and upload
Same problem: * warning: in_array(): Wrong datatype for ....
I'm with the same problem described in two previous posts here:
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
warning: in_array(): Wrong datatype for second argument in /var/www/sites/dragsters.com.br/modules/node.module on line 1614.
Can't add or edit banners. I'm using the last cvs (July 1, 2006 - 02:45), with drupal 4.7.2.
Some ideia on what's happening?
TIA
PHP5 issue
That's an issue with php5. This module doesn't work properly with php5, so you need use php4 for this module if you want to use it.
Development confusion
So I'm confused now. Which is the current version of the banner module? The tarball linked here is dated May 29, 2006, but the latest CVS version here on Drupal.org is dated June 28. (I just posted a bug to that version, but all the attention seems to be here.)
Just wondering. Is the development here for a forked version?
Laura
_____ ____ ___ __ _ _
design, snap, blog
i cannot speak for Wulff,
i cannot speak for Wulff, but i guess he posted the initial progresses of the "new" banner module (banners as nodes) here while it was still alpha.
Now that things are almost stable i think he uploaded it to banner cvs (28th giune), so that should be the latest version available.
@wulff: Maybe bugs and issues can be posted in the project page froom now on?
cheers
correct
sorry for not posting the info here sooner.
the version of the banner module discussed in this thread is now in cvs.
i'm currently working on fixing some issues in the cron hook, and I'm getting rid of the need to copy the cache handlers to the root dir (atm this works for the db cache).
please post bugs and feature requests in the issue tracker.
thanks for all the feedback!
Where is this?
Sorry to ask a dumb question, but how do I get the CVS version and post to the issue tracker?
look here:
* cvs version: http://drupal.org/project/modules (select 'cvs' from dropdown menu on top of page and scroll down to the banner module)
* issue tracker: http://drupal.org/project/issues/banner (you can find modules issues page link also directly in modules project pages, usually /drupal.org/project/modulename)
enjoy and welcome to Drupal ;)
Thanks - help appreciated
Thinks for the direction. Appreciated
not counting right??
I'm finding that the banners are not counting their views correctly. Basically, they're not discerning between Days, weeks, and lifetime--everything gets the same number. Yikes!
Status: Banner Module
Hello Wulff,
Once again, thank you for your effort re the 4.7 Banner Module, all appreciate it very much. This module is such a vital tool for many.
Just wondering will there be final or new stable version of Banner.Module available soon.
Thanks,
Bill
errors on create banner page
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\apachefriends\xampp\htdocs\searcy\modules\node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\apachefriends\xampp\htdocs\searcy\modules\node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\apachefriends\xampp\htdocs\searcy\modules\node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\apachefriends\xampp\htdocs\searcy\modules\node.module on line 1614.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\apachefriends\xampp\htdocs\searcy\modules\node.module on line 1614.
I've installed this before and uninstalled it. Anyway I tried installing it again (after re-creating the db) and I get these errors at the top of the page when I click create content then banner.
Also I still don't see a place to upload the banner image on the create banner page.
Help!
Jay
Same errors here...
* warning: in_array(): Wrong datatype for second argument in /usr/home/xx/domains/xx.xx/public_html/drup/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /usr/home/xx/domains/xx.xx/public_html/drup/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /usr/home/xx/domains/xx.xx/public_html/drup/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /usr/home/xx/domains/xx.xx/public_html/drup/modules/node.module on line 1614.
* warning: in_array(): Wrong datatype for second argument in /usr/home/xx/domains/xx.xx/public_html/drup/modules/node.module on line 1614.
Solution? Anyone?
Just installed
Just installed this on a Drupal 4.7.2 site, and get the same errors listed above.
In addition, when I try to save the settings in Administer>settings>banner, I get one of two errors depending on whether I've chosen File or Database:
Failed to access "banner_file.php", file does not exist. Unable to display banners.
The does exist in ./modules/banner/. I even tried copying it to /modules, but no change.
I also do not see any banner blocks to configure...
I was able to add a new banner successfully, however, but without the block have no way to display it.
Steel Rat
Drupal Site: RPGMapShare.com
Had to copy banner_file.php
Had to copy banner_file.php and banner_db.php to the drupal root for the banner settings to save properly and for the banner 1 block to be created.
Still getting the repeat errors when I go to create banners, but I can create them.
Steel Rat
Drupal Site: RPGMapShare.com
Banner project page
Please note that bugs and issues should now be posted in the Banner module project page.
This forum thread was meant for the alpha version of the new banner module now mantained by Wulff.
Cheers
Was there ever a solution
Was there ever a solution for the above warning?Is this something that we have to live with every time a banner is created or have to switch to php4?
Thanks,
Sean
Trouble Displaying Multiple Banners in 1 block
1. I have been trying to get multiple banners to display in 1 black and have not been able to get it working. I have set the "Banner Count:" to 5 and still only 1 banner shows at 1 time. I have even created a custom block with
<?php print banner_display(1, 5) ?>and again only 1 banner. Am I doing something wrong? Or is this setting in another location?2. Has the Upload function of this module been disabled for the time being? When adding a new banner the "upload" selection does not provide a way to upload an image to the server. The "Upload" module is enabled on the system.
Any help would be appreciated!
in_array error where is it originating?
$node_options = variable_get('node_options_'. $node->type, array('status', 'promote'));The code that the in_array error points to is in the node.module and refers to an argument generated by this line.
I don't know where the banner module is calling this function, the
node_form_array().I also don't know where the variable 'node_options_banner' is comng from either. Anybody have a clue?
4.7.3 and taxonomy
Is the taxonomy module required for your new banner? I get the following message when taxonomy is turned off:
user warning: Unknown column 'title' in 'field list' query: SELECT title, unpublish_date, publish_date, id FROM banner in /home/mysite/drupal-4.7.3/includes/database.mysql.inc on line 120.
The reason I have taxonomy turned off is because I installed the Category module. Will your banner be supporting the new Category module?
rtfm...
Duh... I can just turn on the taxonomy wrapper in the Category module. Sorry about the false alarm.
Any RC2?
wulff, are you soon wrapping RC2? RC1 was released 29 may, and I figure yoou have made som progress since then :-)
Thanx for a great job on the NEW banner module. I have been looking forward to a fresh and new relase :-D
--
Stein Magne
Norway
yes please
With all the problems we're having with RC1, RC2 would be nice. I can't get the RC1 or cvs to work with 4.7. How's it coming?
Jay
Banner.module ready for 4.7
I have branched the banner moduler for 4.7.
You can get it at http://drupal.org/node/66063
If you have the time, please check it out and report any remaining problems in the issue tracker.
Thank U Wulff
Thank u Wulff for your work, effort and diligence in getting an updated banner module in for 4.7.
I can not wait to use it, I know it will be a real treat.
Thanks Again!!!
Oops
Hey wulff, did you mean to link back to the thread we're looking at right now?
--
Cheap, reliable Drupal hosting: 20GB | 1TB
Save $75| DH75OFF coupon for 1 year ($3.75/mo!)
Save $50| DH02SETUP coupon for monthly ($10/mo!)
Banner 4.7.0 final
Have tested the new version and it works great! Thanx Wulff!
The first thing I noticed was the speed improvment over the old code. I really like the idea about adding banners as nodes.
I noticed a few quirks:
Drupal 4.7.2
MySql 4.1.20
Adding several images to a "banner group" and setting the "Banner count" to larger then 1 it only works with the banner module in "database mode" If you set it to "Files" it will only show one banner image at a time.
Refreshing the cache dont do the trick.
Setting the "maximum cache files" to larger then 1 does not fix it.
And no error messages.
We also need to write some doc on how to "upgrade" from 4.6 and to 4.7.0. I have done it but it is not a easy task (if you are a newby).
--
Stein Magne
Norway
Still some work to be done
This will be fixed in one of my next updates of the module (in a day or two).
At this point, I think those docs would be nice to have, but currently I don't have time to document the procedure. If you have some notes from when you did it, I'd be happy to do a writeup for the docs.
OK. I will write down what I
OK. I will write down what I think have to be done when you are moving from 4.6 to 4.7.
I will not include how to do everything in detail especially regarding the tables in MySql, but rather more about what to do, and then we take it from there, K?
--
Stein Magne
Norway
Fixed.
This is now fixed. Multiple banners work for both cache handlers.
Wow that was fast! Are you
Wow that was fast!
Are you adding this in the CVS branch? Maybye a stupid q. but anyway....
--
Stein Magne
Norway
I'm adding the fixes to the
I'm adding the fixes to the 4.7 branch. I won't start porting to 5.0 until the bugs have been fixed in the 4.7 branch.
More bugs
I have now testet the "Banner limit" func. and found a bug.
I hade this banner with max 6 views on. I was blocked after 6(7) views. After another reload of the page the "Views Left" showed -1. This prob. a small bug but I think i should be 0.
Another bug is that when I then changed the "max views" from 6 to 100, it did not display again.
Here is a dump from that row in TABLE "banner"
243,244,http://mac1.no,_none,5,0,,document.write('');,1,1,0,0,0,1,40,100,0,0,6,6,6,1,1,1,150,150
The max views is correctly set to 100. Any sugg?
--
Stein Magne
Norway
The first problem (showing
The first problem (showing negative views left) has been fixed.
I've added the latter to my todo list. When changing banner limits (clicks/views) the banner workflow/status will be set correctly before saving the banner.
Banner module error * warning: Cannot modify header information
I recently installed the Banner module and it works fine I have 2 blocks on my site and nothing really to complain about.
When I tried to create a new ad banner group with custom code added to the theme I get the following error.
* warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/banner_file.php:72) in /home/mysite/public_html/includes/common.inc on line 139.
* warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/banner_file.php:72) in /home/mysite/public_html/includes/common.inc on line 139.
I'm using a customized version of Bluemarine with this code added
<?phpprint banner_display(3, 1)
?>
the aim is to display 1 ad at a time from ad banner group 3.
one alteration i made was renaming the banner groups from ad banner group 1 to 120 x 240 banners.
anyone got an idea how to solve this problem?
--------------------->
underpressure
http://ravalonline.com
Thee "header already sent"
Thee "header already sent" error has to do with extra whitespace at the end of a php file, which from your error seems to be banner_file.php. I believe the convention in Drupal 4.7 is to not have the closing ?> at the end of a php file in order to prevent this very problem. So I think if you just remove "?>" at the end of that file, then you should be ok.
newms
Latest Version of Banner Module
Hello Drupal Nations,
Having difficulty with Banner Module 4.7. Specifically, I continue to get "invalid url" error upon attempting to add a banner.
?:
1) can anyone provide a bit of guidance regarding the correct url format that the current banner module 4.7 utilizes?
2) can anyone tell me what is the version number of the latest, working, version of the banner module.
Thanking You in Advance for yor time.
this worked for me
<?php print banner_display(41, 1) ?>where 41 is the number of the Banner Taxonomy TERM and 1 the number of banners to display.
If you are not sure where to find the term go to: administer -> categories -> banner groups -> list terms -> and hover over the term (assuming you already created it) it should be like this: http://mysite.com/taxonomy/term/47
http://ravalonline.com
? -- re Banner Groups selection option does not appear
Hello Drupal,
I had previousl successfully installed pre-4.7 final banner module which had capability of designating/adding banner groups & banner count upon creating banner. Also, I believe I recall a number of blocks being available such as: banner block 1; banner block 2; etc......, depending upon how many banner groups where selected.
With the lastest install of banner module 4.7, there is no option to select the "banner group" @ create/content/banner; or settings/banner or even admin/banner. Also, the "one" block which was auto created at banner module install is listed as: banner groups --- @ the configure option of the "banner groups" block,there still is nothing which designates the specific banner group.
This does not look right visually, moreover u can not really add a banner if u can not designate which of the (10) banner groups locations that the banner should be placed.
I would appreciate very much if someone would point me in the right direction.
Thank u in advance for your time.
I had the same problem. When
I had the same problem. When I installed the module on my computer at home everything worked. When I installed the
module on my host (PHP5), the categories didn't show up. I also got some error messages along the way though, one
of which was the in_array problem which I fixed at two places:
$node->$key = is_array($node_options) && in_array($key, $node_options); //rseiser: to also check if empty array//$node->$key = in_array($key, $node_options); //seiser: this was the original
$node->revision = is_array($node_options) && in_array('revision', $node_options); //rseiser: to also check if empty array
//$node->revision = in_array('revision', $node_options); //seiser: this was the original
But there were some other errors, specifically:
Invalid argument supplied for foreach() in .../modules/taxonomy.module on line 31.
Invalid argument supplied for foreach() in .../modules/mediumvote/mediumvote.module on line 334.
Not sure if that's related, but clearly the entries into the table "term_data" were not created as they were on my computer at home.
So, I am creating the "banner groups" by hand:
In "administer\categories": "add vocabulary"
Vocabulary name: Banner groupsDescription: This vocabulary is a container for banner groups.
Help text: Choose the banner groups you want to add this banner to.
Types: x banner
Hierarchy: x Disabled
x Multiple select
x Required
Weight: -10
Press Submit.
Now in the line with "Banner groups" chose "list terms".
Then click on "add terms":
Term name: Banner group 1Weight: 0
Press submit.
add terms "Banner group 2" and "Banner group 3" exactly the same way.
Now in "create content\banner" the categories show up.
Any luck?
I too have this problem. No group options showing up anywhere, and no "Banner 1', 'Banner 2' blocks.
Have you had any luck?
Sorry, no upgrade path
Are you using the latest available release of banner module? This should work fine.
Each banner is a node with the new banner module. And banner module no longer uses internal banner groups. It uses a regular taxonomy vocabulary now. If everything went right upon installation/update, then you will have a new vocabulary "Banner groups" in your system. For each term in this vocabulary banner module automatically creates a banner block. Since banners are nodes now, you can select the category of a banner just like with any other categorized node. If you do not get any category selection for a banner, then you should check if the taxonomy module is activated, the vocabulary "Banner groups" was created and this vocabulary is assigned to the content type "banner".
Please file an issue if you are experiencing further problems.
Daniel F. Kudwien
unleashed mind
Javascript banner from tradedoubler
Hi
help! The banners module is working fine for graphical banners (except it doesn't show in the header position on some nodes!) Now, I want to have a javascript banner from tradedoubler - here's the javascript:
<script language="javascript">var uri = 'http://impgb.tradedoubler.com/imp?type(js)pool(174076)a(1320560)' + new String (Math.random()).substring (2, 11);
document.write('<sc'+'ript language="JavaScript" src="'+uri+'" charset="ISO-8859-1"></sc'+'ript>');
</script>
I select PHP as the input format, select javascript as the banner type, don't have anything in the URL and nothing appears.
What am I doing wrong?
Debs
Banner per locale
Hi,
I'm using your banner module and it works great. I've a feature request: how can I show a banner only if a specific locale is set via localizer module (ie i18n_get_lang(); )
Maybe it is already possibile....it's just I don't see how...please help!
Thanks in advance
Not listed in Modules
As per Drupal v5's recommendations, I uploaded the banner files to /sites/all/modules. This is where I keep my other non-core modules, which installed properly. But the banner module didn't list in Modules. So I copied banner to the /modules (at root) folder. Again, it didn't show up in my Modules list.
Anyone have any ideas on what I could be doing wrong?
Are you using Drupal 5.1?
--
Stein Magne
Norway