I have a clean install of the banner module in Drupal 4.6.2.
Everything appears to be working on the admin side of things (add, edit, preview banners) but the banners don't show up in my Ad block. Script code looks a little suspicious when I view source using & in the URL instead of & - but I am not sure what to do to fix this.
http://www.batterhead.com = ad shoud be in the advertisement block on the right
thanks,
b
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | banner_db_fix_nexted_arrays.patch | 1.13 KB | pfaocle |
Comments
Comment #1
batterhead commentedI modified banners.module to change the
&to & - that did not seem to work. I added a new banner and that one woked using a very clean and simple URL (the other is a linkshare URL). So... then I modified the banner that was now working to use the linkshare URL and that worked... so I deleted the first banner I made and now all seems fine. No clue why it did not work the first time. *shrug*Comment #2
smunt commentedI'm having the same problem.
Drupal version: 4.6.5
PHP version: 4.3.10
It works with this patch though:
--- banner_db.orig.php 2006-01-05 12:13:11.000000000 +0100
+++ banner_db.new.php 2006-01-05 12:13:14.000000000 +0100
@@ -8,15 +8,15 @@
include_once "includes/common.inc";
list($ballot, $banners) = _banner_get_struct();
- $max = count($ballot[$pos]) - 1;
+ $max = count($ballot[0][$pos]) - 1;
if ($max > 0) {
$random = mt_rand(0, $max);
}
else {
$random = 0;
}
- $id = $ballot[$pos][$random];
- $banner = $banners[$id];
+ $id = $ballot[0][$pos][$random];
+ $banner = $banners[0][$id];
$banner->views++;
Or download my version from: http://qux.nl/banner_db.php.txt
Comment #3
pfaocleConfirmed, this patch works for me, with the latest HEAD checkout (NOT the latest bundled 4.6.0 version, which doesn't seem to work at all).
Comment #4
__Tango commentedYou don't want to hardcode [0] because that's the tid.
You should pick out the $tid from the request. Here's a diff (also described in http://drupal.org/node/36805).
Comment #5
igrcic commentedyes, when i make a patch banner shows up! but they are not rotating! only first banner on list is showing up!! anybody else can confirm that they are rotating?
Comment #6
igrcic commentedIt ok, works now! messed up something :(
Comment #7
hexenxp05@drupal.org.es commentedGood Work It!
Funciono... jaja
Comment #8
pfaocleComment #9
wulff commentedSlightly modified version committed. Thanks!
Comment #10
(not verified) commented