Version 1.3.7 errors and corrections

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Version 1.3.7 errors and corrections

Postby bodyforum.dk on Sat 07. May, 2005 10:13

After studying the code i found these errors and after some more studying i fixed them :)


File: admin/admin_banner.php - Line 610
Code: Select all
         $sql = "INSERT INTO " . BANNERS_TABLE . " (banner_id, banner_name, banner_active, banner_spot, banner_description, banner_url, banner_click, banner_view, banner_owner, banner_level, banner_level_type, banner_timetype, time_begin, time_end, date_begin, date_end, banner_comment, banner_type, banner_width, banner_height, banner_filter, banner_filter_time,banner_weigth)
            VALUES ('$banner_id','" . str_replace("\'", "''", $banner_name) . "', '$banner_active', '$banner_spot', '" . str_replace("\'", "''", $banner_description) . "', '" . str_replace("\'", "''", $banner_url) . "', '$banner_click', '$banner_view', '".$owner['user_id']."', '$banner_level', '$banner_level_type', '$time_type', '$time_begin', '$time_end', '$date_begin', '$date_end', '" . str_replace("\'", "''", $banner_comment) . "','$banner_type',ø'" . str_replace("\'", "''", $banner_width) . "','" . str_replace("\'", "''",
$banner_height) . "','$banner_filter','$banner_filter_time','$banner_weigth')";


Edit
Code: Select all
$sql = "INSERT INTO " . BANNERS_TABLE . " (banner_id, banner_name, banner_active, banner_spot, banner_description, banner_url, banner_click, banner_view, banner_owner, banner_level, banner_level_type, banner_timetype, time_begin, time_end, date_begin, date_end, banner_comment, banner_type, banner_width, banner_height, banner_filter, banner_filter_time, banner_weigth) VALUES ('$banner_id','" . str_replace("\'", "''", $banner_name) . "', '$banner_active', '$banner_spot', '" . str_replace("\'", "''", $banner_description) . "', '" . str_replace("\'", "''", $banner_url) . "', '$banner_click', '$banner_view', '".$owner['user_id']."', '$banner_level', '$banner_level_type', '$time_type', '$time_begin', '$time_end', '$date_begin', '$date_end', '" . str_replace("\'", "''", $banner_comment) . "','$banner_type', '" . str_replace("\'", "''", $banner_width) . "','" . str_replace("\'", "''", $banner_height) . "','$banner_filter','$banner_filter_time','$banner_weigth')";


It wasn't updating right, so i found this bug:
File: admin/admin_banner.php - Line 592
Code: Select all
               banner_type = '$banner_type', banner_width = '$banner_width', banner_height = '" . str_replace("\'", "''", $banner_width) . "',


Edit:
Code: Select all
               banner_type = '$banner_type', banner_width = '$banner_width', banner_height = '" . str_replace("\'", "''", $banner_height) . "',


And for Niels:

I am not very good at php and especially not when it comes to coding in "phpbb-style", so could you please make a function, so the banner only shows for like 1000 "views" or "clicks"? You know what i mean :) If the banner has been viewed 1000 times it will deactivate or if it's gotten 1000 clicks it will deactivate. I am looking forward to see the "owner of banner" function work. Good job :)
bodyforum.dk
Poster
Poster
 
Posts: 16
Joined: Sat 07. May, 2005 09:59
Location: www.bodyforum.dk

Postby bodyforum.dk on Sat 07. May, 2005 10:14

You can see it work on bodyforum.dk (free advertise) :)

It just looks good and works very well. Continue doing what you do - You're good at it :)
bodyforum.dk
Poster
Poster
 
Posts: 16
Joined: Sat 07. May, 2005 09:59
Location: www.bodyforum.dk

Postby Niels on Sat 07. May, 2005 14:06

Thank you for notify me about thise isues....
one of them must have been added while copy&paste, as my browser some how puts in a ø infront when I copy...
the other is a pure bug from me....

I will update the how-to.

meny thanks for taking your time to report this
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby bodyforum.dk on Sat 07. May, 2005 14:28

It was a pleasure to help you and other people who might've gotten these errors as well. I am still looking forward to see the next versions of complete banner mod, where a user can be set as owner :)
bodyforum.dk
Poster
Poster
 
Posts: 16
Joined: Sat 07. May, 2005 09:59
Location: www.bodyforum.dk

Postby Niels on Sat 07. May, 2005 14:31

as you know users can be set as owner, how-ever there is no features added to the user...
Im not shure what is needed, but I guess sometinh like this...

inside ACP, admin may send out banner statistics to the "owners"
"owner" may at anytime view a list of currently banners, and there settings - e.g. weight, and placement (only view, not set)
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46

Postby bodyforum.dk on Sat 07. May, 2005 14:38

The admins should be available to give the owners rights as they wish. So the admin could give the owner the rights to set banner source and link.

But please suggest making a function, so the banner deactives after a specific views or clicks. In that way, the owners could for instance buy more clicks (of course this will have to be edited manually by admins).
bodyforum.dk
Poster
Poster
 
Posts: 16
Joined: Sat 07. May, 2005 09:59
Location: www.bodyforum.dk

Postby bodyforum.dk on Sat 07. May, 2005 14:45

Someone in this thread discovered it before me: http://mods.db9.dk/viewtopic.php?t=6264

Even though i didn't see this first, please dont give me credit for finding these bugs. The bugs have been found and fixed and that was my intention.
bodyforum.dk
Poster
Poster
 
Posts: 16
Joined: Sat 07. May, 2005 09:59
Location: www.bodyforum.dk

Postby Niels on Sat 07. May, 2005 14:50

corrected my upgrade info post, thanks anyway
(if a how-to is EM ready, it will mostly be bullet prof, since a machine is more picky than a human. :D)
User avatar
Niels
Poster
Poster
 
Posts: 4390
Joined: Sat 27. Jul, 2002 15:46


Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron