PDA

View Full Version : VB Banner Control 1.2


KarateKid
07-15-2002, 10:00 PM
Hi,

with the allowance of Firefly I repost this hack. At first I want to mention that I used PPNs ads hack only for one file in the adminoptions as a template. He made this file so perfect that I looked how he solved the adminconfigurations file for his hack.
The rest is without viewing on other hacks coded by me.

This hack has the following features:

- allows you to create banners dynamicly
- you can view stats:
-> guestclicks ( how many not logged in guests clicked on the banner )
-> userclicks ( which user has clicked how often on which banner )
-> views ( how often is the banner viewed )
- control theses stats over an admin cp script which let you:
-> add new banners
-> edit banners
-> remove banners
-> view the stats
-> remove the stats
- NEW in 1.1: Useroverview:
-> you can give a user of your forum the possibility to view the stats via ACP
-> he can see the views, userclicks and guestclicks
- NEW in 1.2: Put Banners between categories
-> you can assign each category via phpmyadmin an banner which is under this category shown
-> therefor you've to split the categories, that you have space between them

For an example, you can have a view on www.kampfkunst-board.info. The 2 banners in the middle are created dynamicly by my scripts ;)

Here in this post I add the hack, in the next post, the screenshots :)

KarateKid
07-16-2002, 09:27 AM
and here the screenshots :)

-=Sniper=-
07-16-2002, 10:30 AM
This looks great, it would it possible to have it intergrated with the store hack, so every time a user clicks on the banner, he gets a point. He/she can only click on that anner every xx hours!

something like that any way...

nice hack though :)

KarateKid
07-16-2002, 10:36 AM
of, course thats possible. Just integrate it in my click.php file with an UPDATE SQL Statement :)

bandersen
07-16-2002, 12:18 PM
Very cute - thank you! I will install it later.

X-Fan
07-16-2002, 01:36 PM
Would it be possible to integrate this with vbPortal's banner admin system?

Would it also be possible to enhance this hack further to accommodate button and icon ads?

KarateKid
07-16-2002, 01:51 PM
Would it be possible to integrate this with vbPortal's banner admin system?

of course. It should work currently

Would it also be possible to enhance this hack further to accommodate button and icon ads?

You can choose a banner/button/icon, whatever you want. It works with the image-tag ;)

X-Fan
07-16-2002, 02:15 PM
Originally posted by KarateKid
of course. It should work currently

How though? Does it pull the info from the vbPortal banner system, such as Impressions, Imp left, Client name/contact, etc? Or does this have its own database section which would require an advertiser to login to both the vbPortals banner stats section and this hack's stats section separately?

Will this hack add a second banner to the top of pages that already have a banner ad up there via vbPortal's banner admin system?

KarateKid
07-16-2002, 02:22 PM
oh sorry, I think I misunderstood you. You can place the bannercode created with my hack also on vbportal. That was what I mean, but you're right, at the moment there is no possibility to integrate it with the bannersystem of vbportal. This would be to complex, sorry ;)

X-Fan
07-16-2002, 02:29 PM
Ah well... maybe one day someone will create an all-encompassing banner admin system!

Until then, at least this one supports button and icon ads! :)

trainer
07-16-2002, 03:03 PM
does the system work with html banners?

Dean C
07-16-2002, 03:16 PM
this is fantastic...

X-Fan
07-16-2002, 04:08 PM
Just found a couple of typos in banner_manage.php (also edited it to have double quotes instead of single in the output code).

Find...


$code = "<a target='blank' href='$forumurl/click.php?bannerid=$bannerid'><img border='0' width='$width' heigth='$height' alt='$alt' src='$forumurl/view.php?bannerid=$bannerid'></a>";


Change to...


$code = "<a href=\"$forumurl/click.php?bannerid=$bannerid\" target=\"_blank\"><img src=\"$forumurl/view.php?bannerid=$bannerid\" border=\"0\" width=\"$width\" height=\"$height\" alt=\"$alt\"></a>";

Velocd
07-16-2002, 04:59 PM
I fail to understand what this does exactly, but it looks interesting enough..

freeshares1
07-16-2002, 06:55 PM
This looks really interesting but i have 2 questions

1/ I have already installed ppn advert hack do i need to uninstall that one before adding this one or can i just add this as well?

2/ Is it possible to restict the banner so that is is just shown to guest or members with less than X posts

KarateKid
07-16-2002, 07:55 PM
@X-Fan: It also works as it is, with single quotes ;)

@Velocd: It manages your banners and count the clicks of users/guests and the views ;)


@freeshares1:

your 1. point: I dont't know. I think you must not deinstall his hack. You can use my hack and his hack together. Just put my code generated through my banneradmin into PPNs pannel ;)

your 2. point: Of course, just write something like if($user[posts]<XXX) ....
It should work :)

freeshares1
07-16-2002, 08:25 PM
Thanks, will install it later

X-Fan
07-17-2002, 02:48 AM
KK, yeah, I know single quotes work, but I like double quotes :)

Also, did you catch the typo? You had heigth instead of height in that line.

KarateKid
07-17-2002, 08:01 AM
Originally posted by X-Fan
KK, yeah, I know single quotes work, but I like double quotes :)

Also, did you catch the typo? You had heigth instead of height in that line.

hehe, ok for the quotes.

ups, sorry for the typo, I'll fix it later! :)

bandersen
07-17-2002, 03:21 PM
I use 2.2.6 and php 4.2.1
and get this error when trying to run the queries:

Invalid SQL: CREATE TABLE userclicks (
userid int(11) NOT NULL default '0',
bannerid int(11) NOT NULL default '0',
clicks int(11) NOT NULL default '0',
PRIMARY KEY (userid,bannerid)
) TYPE=MyISAM;

mysql error: You have an error in your SQL syntax near ';
' at line 6

mysql error number: 1064

EDIT: it seems to work now... I put the code in the non-select SQL query field at first.... will test.

bandersen
07-17-2002, 04:34 PM
It works like a charm now!

I have a request...can you make an addon: If in Admin panel one could type that memberid "1,2,3,..." will not count against views/hits.

thank you!

Parker Clack
07-17-2002, 06:14 PM
Karate Kid:

Nice work. I was just wondering if you thought of adding a variable such as groupid. You could add this row to the table and add a Group ID to your banners. If they fall into the same group then you could have a random command pick first one banner then the others that are in that group. Then if it doesn't have a groupid then you just display that banner.

So let's say you have 3 banners that you want to rotate within the same place on your web page and they would all have the same groupid. If there is no groupid associated with the inserted code into your web page then it is the sole banner that gets displayed.

Clear as mud? :)

Ideas?

Thanks,
Parker

KarateKid
07-17-2002, 07:41 PM
@bandersen: If I have the time at weekend, I'll try to implement this. It will be easy ;)


@Parker Clack: I could do this. It would be no problem. But then I would make a features, which PPN still allows with his ads hack and I don't want to copy an idea, so just take his hack in combination with this one :)

Greetings

Parker Clack
07-18-2002, 01:25 AM
KarateKid:

The idea may be the same but the implementation of it would be different.

As I stated this would add a groupid to the banner table. Then you would do a check in your click.php and view.php files to see if they are in the same groupid or not and if they are then post them in the same place in a random fashion. It the bannerid does not share a groupid with any other banner then it would be the only thing displayed.

I would do this myself but I am not sure how to write the code.

Thanks,
Parker

cturcich
07-18-2002, 04:41 AM
This is a very nice mod. Thanks!

Tubbie
07-20-2002, 06:44 PM
sch?ner hack!
gef?llt mir!

da ich ja weiss wer du bist bin ich mal so frei und schreibe deutsch:D

ModshackUK
07-20-2002, 08:55 PM
When I try to delete banners it goes to a 404 page not found screen ?

HM

ModshackUK
07-20-2002, 08:56 PM
Also where do I insert the code to make the banners apear between catagories ?

HM

KarateKid
07-21-2002, 07:52 AM
@ ModshackUK:

- hm deleting the banners isn't a problem on my board? Did you implement all parts of the code?
- for putting the banner between two categorys you've the possibility to create a new template with the value of the code or to put the code threre in where the categories are breaked :)

ModshackUK
07-21-2002, 12:33 PM
Hi KK :)

I did the install to the letter and for some reason when I try to delete the banner it just goes to a page not found page ? I will go over it again step by step as its probably something I have or have not done :)

Also will the same banner be placed between each catagory or can I use different ones ?

Thanks for the help

HM

KarateKid
07-21-2002, 04:14 PM
Hi,

Also will the same banner be placed between each catagory or can I use different ones ?

You can place there only one banner. But you can of course change it ;)



For the deleting-bug I'll search in the next days ;)

ModshackUK
07-21-2002, 07:24 PM
Cheers m8 your a star :)

HM

rsuplido
07-23-2002, 02:11 PM
I was just wondering if this would work on skyscraper banners (120X600 and 160X600). Can anyone help on what template I should revise to have the banners appear at the right side of the screen? TIA.

KarateKid
07-23-2002, 03:18 PM
@ rsuplido:

You should put them into forumhome oder header template, but the position has nothing to do with the hack, or?

Tech_Koss
07-24-2002, 02:44 AM
can someone help me out i keep getting this error:

----------------------------------------------------------------------------
Database error in vBulletin Control Panel 2.2.6:

Invalid SQL: INSERT INTO banner (url_to_banner, redirector_url, height, width, banner_text) VALUES ('http://www.mysite.com/images/twis2.jpg', 'http://www.mysite.com/forums/showthread.php?threadid=10818', '60', '468', ?banner?)
mysql error: You have an error in your SQL syntax near 's Twisted! 2')' at line 1

mysql error number: 1064

Date: Tuesday 23rd of July 2002 11:42:42 PM
Script: http://www.mysite.com/forums/forums/admin/banner_manage.php
Referer: http://www.mysite.com/forums/admin/banner_manage.php?action=add
------------------------------------------------------------------------

-thanks

Tech_Koss
07-24-2002, 02:45 AM
i dont understand why its looking for the script @ Script: http://www.mysite.com/forums/forums/admin/banner_manage.php

KarateKid
07-24-2002, 07:43 AM
hm,

have you done all database modifications including adding the extra tables?

Greetings

bpn
07-24-2002, 12:48 PM
Seems like a great hack.
Isn't it possible to add a text right below the banner ?

A text under a banner can eaily dbl. the clicks on a banner.

Cheers

KarateKid
07-24-2002, 01:06 PM
Originally posted by bpn
Isn't it possible to add a text right below the banner ?

currently it isn't possible, sorry

Tech_Koss
07-24-2002, 04:14 PM
Originally posted by KarateKid
hm,

have you done all database modifications including adding the extra tables?

Greetings
should I add both tables at once or at two different instances?

KarateKid
07-24-2002, 04:21 PM
öhm,

simply add the two tables in the vb database.

Tech_Koss
07-24-2002, 10:56 PM
ok I got it to work....will this hack allow for random/rotating banners?

-thanks

KarateKid
07-25-2002, 05:39 AM
sorry no, for rotation there still exists a hack from PPN called ads management

ladyfyre
08-01-2002, 03:32 AM
Will this hack use a lot of additional queries????

Our site is HUGE (we have had almost 400 new registrations in the last 48 hours), and i don't wanna kill the server here....

it looks great though :)

KarateKid
08-03-2002, 09:35 PM
Sorry for my late answer, cause last week I was in holidays ;)


No, large Traffic isn't a problem. You have only a few more querys which won't be a problem for your board ;)

You could make a test for watching and logging the querys ;) Just look in the view.php. There are only a few querys! :)

squid93087
08-06-2002, 04:29 PM
this may sound dumb but im lost on where the banner is supposed to show. I installed evyerthing but i dont see a banner anywhere.

KarateKid
08-06-2002, 08:08 PM
did you place the banner code somewhere?

do you see maybe an empty default image window?

squid93087
08-07-2002, 04:00 AM
ok i got it now one more thing is there anyway this can become a rotating code?

KarateKid
08-07-2002, 07:34 AM
no, for rotating you should have a view on PPNs ads management hack. My hack is only for counting the hits...;)

JGUNS
08-08-2002, 11:06 PM
Do I need to have PHP my admin in order to use this?

KarateKid
08-09-2002, 06:52 AM
Of cource, yes, for creating the tables in your database as I wrote in the install file! :)

JGUNS
08-09-2002, 12:10 PM
there is where my problem is. When I tried to do myphpadmin, I created a new folder called "xxxphp" in my forums directory and uploaded the phpmyadmin files. when I log on to http://www.mysite.com/forum/xxxphp I get a black, bold "PHPMyadmin" and then below that, where the db is supposed to be listed, it says config.inc.php. When I click on it, I get an error screen. What did I do wrong?

KarateKid
08-09-2002, 12:45 PM
öhm, did you enter the right values into the config file?

Is php enabled on this webspace?

could you show me the link?

JGUNS
08-09-2002, 12:55 PM
See PM for link. I changed the following values inthe config file:

Your phpMyAdmin url
*
* Complete the variable below with the full url ie
* http://www.mysite.com/jgunsphp/

$cfg['Servers'][$i]['host'] = 'mysql.mysite.com';

and I added the password to my site under:
$cfg['Servers'][$i]['password']


Otherwise I left everything else alone. Incidentally, when I changed the config file and saved it, is said it was removing all formating. I guess that it becomes a pure text file. Did I not fill out the variables correctly?

LouChipher
08-09-2002, 01:01 PM
Can I add in the Url for inside Links "$session[sessionhash]" ?

KarateKid
08-09-2002, 01:16 PM
@JGUNS:

I don't find a solution. Could you use the search function in this board hier. I think, there will be some threads about phpmyadmin configuration :)

@LouChipher:

Why not? :D Yes, try it out, it should work :)

LouChipher
08-09-2002, 01:25 PM
KarateKid, wenn ich es im CP einbinde, also bei der URL Angabe, dann geht es zwar, aber die Session wird beim klicken nicht eingefügt, sondern eben die Variable ist nur zu sehen...

JGUNS
08-09-2002, 02:45 PM
What about this I changed the config file and now I get something.

I installed phpmyadmin and I get a screen with all of my threads and folders from my root and subdirectories. On the top it has my sqldatabase name- root directory name. You can pick between others. When I go to mysqlusername with no root directory it says "access denied, password NO"

Where do I run a query from? I don't see any query buttons. BTW, php myadmin is installed in the root directory, I dont know if that makes a difference. My bulletin board is in a subdirectory called "forum" Thanks for any help.

KarateKid
08-09-2002, 07:52 PM
@JGUNS:

The location of phpmyadmin doesn't matter. Only the right variables are important.

@LouChipher:

hm, dann geht es wohl doch nicht. Bin grad am ?berlegen warum nicht, was willst du denn genau machen, dass du interne links verwenden musst um die Session zu erhalten, vielleicht kann ich dir so helfen :)

hypedave
08-10-2002, 04:19 AM
ok got this installed now question, how do I get the banner ads to dispay your instruction arent to detailed as to how to get a banner to show on the home page?

oh yes when I go to delete a banner I get the following error

The requested URL /forums/admin/banner.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request

KarateKid
08-10-2002, 07:51 AM
@hypedave:

- hm, I'll fix this deletion bug!
- for displaying the banners, just click on get_code in the admin menue, then you'll get the bannercode which you can put somewhere into your templates :)

hypedave
08-10-2002, 02:05 PM
okay thanks, I found it, while editing somehow I delete yor instructions at the bottom

drives fast
08-19-2002, 02:29 AM
the problem with deleting banners is here in banner_manage.php
// ###################### Start Remove #######################
if ($action=="remove") {

doformheader("banner","del");
needs to be:
// ###################### Start Remove #######################
if ($action=="remove") {

doformheader("banner_manage","del");

took about 2 seconds to see that one by comparing it to the edit code

just trying to help

Donkeyballz
08-19-2002, 07:54 AM
Looks great :) Thanx for sharing :)

KarateKid
08-19-2002, 05:32 PM
@ drives fast:

Thank you for your help. Currently I've no time because I've to help in the german flood areas in East-Germany...

Regards

drives fast
08-24-2002, 02:14 PM
no problem KK

I also found another thing......when clearing the clicks "[remove] these entries" it removes the data but does not reset the numbers.....they remain on the overall view screen and remain in the database. I have been farting with this for a few hours now and havent figured out how to solve that yet since my php is very limeted.

also I found no way to clear the guest clicks and views for those of us that want to reset everything every month

I will keep looking but if you get a chance....could you look at that too?

thanks.

KarateKid
08-24-2002, 03:10 PM
of course, I'll look on it! :)

voclain
08-25-2002, 05:41 AM
WONDERFUL!! WONDERFUL!! WONDERFUL!!

Thanks,,,,OK I've read all the way through this thread!! NOW where (NEED LINK) do I get this "Ad Manager" so I can make my ads ROTATE on every page???

Yours,

Kirk Voclain

KarateKid
08-25-2002, 08:19 AM
I don't know the link, but you can use the search function here to find it :)

Marty McFly
08-30-2002, 04:26 AM
nm..

Marty McFly
08-30-2002, 05:40 PM
is there any way to put certain banners on certain sections of the forum? for instance, if i had a section about computers could i have a hosting company banner on that section only??

thanks.

KarateKid
08-30-2002, 09:27 PM
yes it should work,

try it out,

assign the banner you want a category and so, it will only be shown above this category

Marty McFly
08-30-2002, 11:35 PM
Originally posted by KarateKid
yes it should work,

try it out,

assign the banner you want a category and so, it will only be shown above this category

how do i assign it to a category? i dont see that option in the CP.

KarateKid
08-31-2002, 07:45 AM
Hi,

there is no possibility for assign banners with the CP, you have to do bei Step 5 from the installationinstructions. Then it's a bit clearer ;)

KK

Marty McFly
08-31-2002, 07:41 PM
ok i did step 5 and dont see anything new in the CP. what did that step do?

KarateKid
08-31-2002, 09:56 PM
*lol*

you won't see anything more in your acp. Now you only have the possibility to put a bannerid into your sqldb into the specified field, which will show then the particular banner above the defined category ;)

springbok
09-15-2002, 09:23 PM
Hi,

Please be warned that I have never coded a line of PHP before tonight, but have come up with a solution to the rotation for VB Banner Control 1.2. (Through much hacking of other people code and testing)

I have installed and tested both the Ad Management and VB Banner Control on my site but found the VB Banner Control to be the better (for my needs), but lacking a rotation facility. So I have removed the Ad Management one completely, installed VB Banner Control 1.2 from scratch again and made the following changes to get rotation working.

I do not know whether I am allowed to post this modification, if not please feel free to delete this post immediately.

I can confirm that I have been testing this for the past 4 hours and its working fine but - USE THIS AT YOUR OWN RISK - I cannot be held responsible if anything goes wrong. ;)

1. So, do a complete installation of VB Banner Control 1.2 (I am using VBulletin 2.2.7 and its working great.).
2. Open /global.php
3. Find:

if ($getforum['styleoverride']==1 or $bbuserinfo['styleid']<2) {
$codestyleid=$getforum['styleid'];
}
}


Below that add:


// Banner Management
$bannerad=$DB_site->query_first("SELECT * FROM banner ORDER BY RAND()");

$bannerid=$bannerad['id'];
$bannerheight=$bannerad['height'];
$bannerwidth=$bannerad['width'];
$banner_text=$bannerad['banner_text'];


No further file modifications required. So save or upload this file.

4. Normally with the VB Banner Control hack you would go through the Control Panel and use the getcode link and copy and paste that text into wherever you would want the banner to appear. Normally the Header template. If you are using this tweak you will not have to do this again. Just replace it with the following:


<a target='blank' href='http://www.yourdomain.com/click.php?bannerid=$bannerid'><img border='0' width='$bannerwidth' heigth='$bannerheight' alt='$banner_text' src='http://www.yourdomain.com/view.php?bannerid=$bannerid'></a>


Change the www.yourdomain.com with your sites correct domain name.

And that's it. Now you will have a fully operational banner rotation with all the banners you have in the banners table.

Marty McFly
09-25-2002, 12:49 PM
springbok - i did your rotation hack and my banners just disappeared. is there anything special i need to do after i put in the rotation code in the templates?

springbok
09-25-2002, 05:46 PM
Which template did you put the

<a target='blank' href='http://www.yourdomain.com/click.php?bannerid=$bannerid'><img border='0' width='$bannerwidth' heigth='$bannerheight' alt='$banner_text' src='http://www.yourdomain.com/view.php?bannerid=$bannerid'></a>

link into? Please confirm that you did the mai hack install as per normal and then made the changes I have suggested.

LOD-squa
09-25-2002, 06:22 PM
so this hack shows diff banners doing it auto and show how the clicks?

springbok
09-25-2002, 09:06 PM
My little mod to this hack just allows rotation. KarateKid is the true master behind this hack though.

Marty McFly
09-25-2002, 10:14 PM
Originally posted by springbok
Which template did you put the

<a target='blank' href='http://www.yourdomain.com/click.php?bannerid=$bannerid'><img border='0' width='$bannerwidth' heigth='$bannerheight' alt='$banner_text' src='http://www.yourdomain.com/view.php?bannerid=$bannerid'></a>

link into? Please confirm that you did the mai hack install as per normal and then made the changes I have suggested.

i put it on forumhome, forumdisplay, and viewthread. i did the whole banner hack, then the rotation hack...still nothing.

KarateKid
09-26-2002, 08:04 AM
hm, I'll have a look on your rotation addon, maybe then I can help you in your problem

regards.

clangrounds.com
09-27-2002, 06:36 PM
Hmmm, yes this hack would be absolutely excellent if it had the ability to rotate the ads on a timed basis, or even a refresh for that matter. :)

KarateKid
09-27-2002, 07:04 PM
yes I can imagine, but that was not my intention. What I want is a hack which counts views and clicks and thats what this hack does currently. :)

digitalJE5U5
10-17-2002, 10:56 PM
Anyway to get this to support FLASH banners?

All my banners are .swf, but Id like to use your tracking system.

Thanks,
/DJ

KarateKid
10-18-2002, 05:14 AM
hm, in this case you have to modify my hack a little bit, so that it doesn't place the <img> Tag but the right tag for your flash banners. Just have a look on my code.

If it doesn't work you could format your flash to gif, or? :)

Best Regards.

digitalJE5U5
10-18-2002, 07:25 AM
Just have a look on my code.

Which code are you referring to, exactly?

Thanks for the help,
/DJ

KarateKid
10-18-2002, 09:43 AM
hm,

you have to change many things, at first the tags you place in forumhome, because they aren't <img> tags anymore.

nissanpower
10-20-2002, 02:32 PM
Hello,

I followed the installationinstructions.txt file to the T and when I attempted to create the mysql tables, this is the error message I received.

SQL-query : [Edit]

CREATE TABLE banner (
id int(11) NOT NULL auto_increment,
url_to_banner varchar(255) NOT NULL default \'\',
redirector_url varchar(255) NOT NULL default \'\',
height int(11) NOT NULL default \'0\',
width int(11) NOT NULL default \'0\',
banner_text varchar(255) NOT NULL default \'0\',
guestclicks int(11) NOT NULL default \'0\',
userclicks int(11) NOT NULL default \'0\',
views int(11) NOT NULL default \'0\',
reportuserid int(11) NOT NULL default \'0\',
PRIMARY KEY (id)
) TYPE=MyISAM;

MySQL said:

You have an error in your SQL syntax near '\'\',
redirector_url varchar(255) NOT NULL default \'\',
height int(11) NO' at line 3

I also attempted to create the second table and this is what I got.....

CREATE TABLE userclicks (
userid int(11) NOT NULL default '0',
bannerid int(11) NOT NULL default '0',
clicks int(11) NOT NULL default '0',
PRIMARY KEY (userid,bannerid)
) TYPE=MyISAM;

I'm just copying and pasting them over. I tried several times, so I'm sure I'm not typing anything incorrectly. Can someone give me any ideas what could be wrong here?

Thanks!
-Gabriel

KarateKid
10-20-2002, 02:47 PM
hmmm, sorry, no idea,

but you could try to assign the cells manually by phpmyadmin? :)

Best Regards. :banana:

Buddha
10-22-2002, 12:28 PM
is there a way of putting either an additional field to name each banner or add a thumbnail of the picture, or a link to the picture so that you can quickly remember which is which... as some of us may be using quite a few banners and buttons. it gets confusing to remember which is which and have to click into each and check the links.
thanks.

KarateKid
10-22-2002, 01:28 PM
sure, it is :)

If I have the time I would implement it, but you could easy put a <img> tag before the information row, so that you have the banner there.

Buddha
10-22-2002, 03:13 PM
which file are you referring to bud?

KarateKid
10-22-2002, 03:17 PM
of course the admin file: banner_manage.php

Buddha
10-22-2002, 03:32 PM
i fooled around with that file after i posted my reply, but i keep getting parse errors... i'm not that knowledgable with php...
i added a line of code to makelink by the other options, but it doesn't seem to work. any thoughts?

(thanks for the quick reply btw)

KarateKid
10-22-2002, 07:28 PM
try to replace this line:

echo "<td width='20%' align='center'>$ba[id]".makelinkcode("edit","banner_manage.php?s=$session[sessionhash]&action=edit&bannerid=$ba[id]").

with this line:

echo "<td width='20%' align='center'><img src='$ba[url_to_banner]' border='0' width='40' height='20'>$ba[id]".makelinkcode("edit","banner_manage.php?s=$session[sessionhash]&action=edit&bannerid=$ba[id]").

Regards.

Buddha
10-22-2002, 09:36 PM
that's excellent karatekid!
thank you very much!

*edit*
i set the width to 50px, and left the height out so the image wasn't distorted (as i use different size banners) and it looks great.
thanks again.

Buddha
10-22-2002, 09:50 PM
i've fooled around a little more and set the picture as a link to the larger size. works great cause it appears in the same frame and it's easy to go back and forth to check them out (the 468 wide banners are harder to tell apart at 50px).

echo "<td width='20%' align='center'><a href='$ba[url_to_banner]'><img src='$ba[url_to_banner]' border='0' width='50'></a>$ba[id]".makelinkcode("edit","banner_manage.php?s=$session[sessionhash]&action=edit&bannerid=$ba[id]").

the funny thing is, i was so close with my initial experimenting, but like i said, i don't know php so i wasn't using the right syntax.

KarateKid
10-23-2002, 05:13 AM
no problem, you're welcome :)

Parker Clack
10-27-2002, 01:00 PM
KK:

I found an error in the doreset subroutine.

You have

$DB_site->query("UPDATE banner SET views=0 AND guestclicks=0 AND userclicks=0 WHERE id='$bannerid'");

this only resets the views to 0 and the others do not get reset.

I changed this to:

$DB_site->query("UPDATE banner SET views=0,guestclicks=0,userclicks=0 WHERE id='$bannerid'");

and all get reset to zero as they should.

Thanks,
Parker

KarateKid
10-27-2002, 02:23 PM
thank you for this information,

maybe I'll rebuild this hack and present it with all fixed bugs in some days :)

Regards.

Parker Clack
10-27-2002, 02:28 PM
KK:

You are welcome. I would like to see this rewritten with all the bug fixes included. If you could make it so the banners can be put in a rotation and add groupids so you can group banners together by groupid. So if you have a banner with groupid=home then any banner with a groupid of home would get displayed in that group.

Parker

scottct1
11-15-2002, 12:57 PM
I have installed this hack and it works good.

I wanted to rotate my ads so I installed the rotate code to my global.php

When I do this I have a problem. Different ads display but when a user clicks on them they are always taken to the highest number ad in the database.

Lets says I have 6 ads in my database, I click on http://www.dbstalk.com/click.php?bannerid=2 which should take me to site #2 instead it takes me to site #6.

If I remove the stuff from global.php and try going to http://www.dbstalk.com/click.php?bannerid=2 it takes me to site 2.

Anyone have any ideas?

rharbison
11-24-2002, 08:21 PM
This is a really nice hack and easy to install.

I like the tracking features and how easy it is to use.

Please consider adding the ability to rotate ads, that would be very useful to me!

rharbison
11-24-2002, 08:56 PM
I just tried to install the rotation hack, but hit a roadblock here:

> Open /global.php
> Find:
> if ($getforum['styleoverride']==1 or
> $bbuserinfo['styleid']<2) { $codestyleid=

I can't find that anywhere in my global.php file.

Is this something another hack added? I'm using 2.2.8 and the original global.php file.

Dean C
11-28-2002, 07:53 AM
Ok on my forums i have set the banner width to the size i want it but when i insert the getlinkcode or whatever its called it and the image shows up as a 60 X 10 pixel image?

Any ideas :(

- miSt

KarateKid
11-28-2002, 08:02 AM
hm, I don't have this problem noticed anywhere.

Can you tell me the link to your forum?

Dean C
11-28-2002, 10:02 AM
I'll PM it to you :)

*You have mail*

- miSt

arracing
01-04-2003, 06:04 PM
waiting patiently for the new version with all the bugs fixed and rotation added. Is their a timeframe for when this might be finished? :cross-eyed:

KarateKid
01-04-2003, 07:13 PM
sorry, but currently my job give's me not the time to rewrite the code. I hope I'll find the time soon, but maybe not before vb3 is released...

glenmax
01-04-2003, 07:15 PM
It is a great hack.

Hope you get the time to release the newer version.

Cheers,
GM

drives fast
01-18-2003, 05:47 AM
here's something that hasn't been asked....maybe I am just stupid.

in your readme it says
NEW in 1.1: Useroverview:
-> you can give a user of your forum the possibility to view the stats via ACP
-> he can see the views, userclicks and guestclicks

but i'll be darned if I can figure out how to do that. I tried bringing up userreport.php but I get a "no permission" page and I can't find anything in my admin cp to allow or dis-allow users

please give me a hint

thanks

KarateKid
01-18-2003, 10:37 AM
if you edit one banner in your cp you can put a userid into the textfield which is called: "Userid for viewing userreport.php (only one id)" :)

Regards.

drives fast
01-19-2003, 04:48 AM
simple as that......I knew I had a brain fart

thank you

Logikos
02-19-2003, 02:33 AM
So everytime the page refresh, another banner will pop up?

Logikos
02-19-2003, 02:33 AM
So everytime the page refresh, another banner will pop up?

Mustang5ohhh
03-04-2003, 09:57 PM
*clicks install*

Great hack KK !

Very easy to install. I am having trouble using the category part though. Could you give a little more detail on how this part of the hack works ? How do setup the banner to appear in the specified category? Is there something else that needs to be added to a template ?

Thanks in advance.

Swedie
03-05-2003, 02:07 AM
For some reason I'm getting an X (no IMG or faulty URL).. well, there's nothing wrong with the URL.

So I go to view the picture directly via view.php this way:
http://localhost/forum/view.php?bannerid=1

That gives me:
"Please Include an ID!"

I do have an ID..

What's up?

gspot
03-05-2003, 09:17 PM
I have tried everything to make these banners do a random rotation. Nothing I try can work. I'm using the script that someone posted in this thread on how to make them rotate, but all I get is the same banner showing up over and over again. Everyonce in a while another banner will appear, but very seldom..

Any help would be greatly appreciated..

SVTBlackLight01
03-07-2003, 11:02 AM
I am using this for the rest of my site too! (outside the forums)

KarateKid,

I have to say that your support has been great on this. Much better than some of the hacks that are supposed to "guarantee"
support.

KarateKid
03-07-2003, 02:46 PM
@Swedie:

Hm, I think you made a fault in the installing procedure. Please have again a look on my hints.

@gspot:

Sorry, currently I cannot give support for modifications of my hack.

@SVTBlackLight01:

Thanks, I try to do my best.

Regards.

Freezerator
03-24-2003, 04:49 PM
Awsome hack.

I hope this one will be availible for vbb3 when that comes out.

Super :)

KarateKid
03-24-2003, 05:15 PM
Today at 06:49 PM Freezerator said this in Post #123 (https://vborg.vbsupport.ru/showthread.php?postid=372575#post372575)
Awsome hack.

I hope this one will be availible for vbb3 when that comes out.

Super :)

sure :)

When I'll update zu vb3 I'll update this hack, cause I need it. But I only update when there'll be a stable version ;)

BarryA
03-28-2003, 02:50 PM
Got a weird problem with this Hack... I recently moved my site to a new server (Dual ZEON 2.0 at Rackshack). Before the move the Banners were rotating fine, after the move it shows the first banner like 95% of the time and the other banners like 5% of the time... If I reboot the box it will show the other banners equally for a few hours and then goes back to showing the first banner 95% of the time... Im running vbb 2.2.6 (waiting for 3.0 to upgrade)...

Im sure this is a server config issue, but Im totally lost and my donating sponsors are starting to ge ticked off.. Any help would be greatly appreciated.

SVTBlackLight01
05-07-2003, 09:02 PM
Anybody have a link to the ad management hack to use for the banner rotation?

iblis
05-20-2003, 09:24 PM
karaktekid:
i actually have the same problem as swedie.

i've done everything in the installationfile by the letter, but the banners won't show

http://www.freakforum.nu/forum/view.php?bannerid=1

any suggestions to what might be the problem?
and no.. i did not make any mistakes during installation.. i've checked and doublechecked

SVTBlackLight01
05-25-2003, 02:37 AM
Would there be a way to modify userreport.php so I (the admin) can choose which banner stats to view? If I enable my user ID in the control panel for all the banners, the only stats I can see is for the first banner.

I would like this feature so I don't have to use the admin control panel to see the banner stats.

MuSuL
06-07-2003, 12:51 AM
does this work with V 2.3.0?

wolfman
06-18-2003, 12:41 AM
I have vb 2.3.0 and it works just fine. :)

Anyone know how to delay the redirect screens so I can place banners there.

Thanks

mateo1221
06-29-2003, 08:58 PM
Installation question: in the first line it says to add the following tables... which database or does it matter???

KarateKid
06-30-2003, 07:26 AM
Yesterday at 10:58 PM mateo1221 said this in Post #131 (https://vborg.vbsupport.ru/showthread.php?postid=413991#post413991)
Installation question: in the first line it says to add the following tables... which database or does it matter???

of course same database as vbulletin!

mateo1221
06-30-2003, 08:40 PM
Yeah, realized just how dumb that sounded as soon as I posted it... Now here's a second question... when it says to search for a line of code:

makenavselect("Statistics & Logs","<hr>",$df);

and insert lines below it, where do I search for code? I have looked everywhere and I've seen it 1000000 times before, it's just evading me for some reason... :cross-eyed:

KarateKid
07-01-2003, 04:38 AM
which vbulletin version do you have?

Dean C
07-01-2003, 10:56 AM
KarateKid - i had this installed a while ago and i installed it again this week.

You have a little bug in there regarding the use of single quotes to output the relevant HTML. It should always be double quotes and this is my code:


$code = "<a href=\"$forumurl/click.php?bannerid=$bannerid\" target=\"new\"><img src=\"$forumurl/view.php?bannerid=$bannerid\" border=\"0\" width=\"$width\" height=\"$height\"></a>";


- miSt

KarateKid
07-01-2003, 11:01 AM
ok,

I know that this hack is buggy,

but I'll fix all the bugs, when I redevelop the hack for vb3.

Regards

KarateKid

Madacc
10-07-2003, 06:11 AM
I get really frusterated trying to find answers to problems that no one solves. I have fixes to all the problems that were caused with the banner rotation addon by springbok.


Problem: Banner pictures are not showing up
HIS CODE WAS THIS:

Find:

if ($getforum['styleoverride']==1 or $bbuserinfo['styleid']<2) {
$codestyleid=$getforum['styleid'];
}
}


Add After:

// Banner Management
$bannerad=$DB_site->query_first("SELECT * FROM banner ORDER BY RAND()");

$bannerid=$bannerad['id'];
$bannerheight=$bannerad['height'];
$bannerwidth=$bannerad['width'];
$banner_text=$bannerad['banner_text'];


Solution (Do this instead)
Find:

if ($getforum['styleoverride']==1 or $bbuserinfo['styleid']<2) {
$codestyleid=$getforum['styleid'];
}
}
}


Add After:

// Banner Management
$bannerad=$DB_site->query_first("SELECT * FROM banner ORDER BY RAND()");

$bannerid=$bannerad['id'];
$bannerheight=$bannerad['height'];
$bannerwidth=$bannerad['width'];
$banner_text=$bannerad['banner_text'];


Problem: Banners are leading to the wrong URL (after clicking)

Open: click.php
Find:
error_reporting(7);

Add After:
$thebannerid = $_GET['bannerid'];


Find:
$boarduser = $bbuserinfo['userid'];

Add After:
$bannerid = $thebannerid;

Save and reupload click.php


That should solve the problems people have been having. I hope I just saved a bunch of people :)

PAINTBALLM
10-10-2003, 11:04 AM
**Installs** good work karatekid ;)

Sia Bani
10-15-2003, 06:33 PM
Would this work with VB3 beta 7?

DiscussAnything
10-16-2003, 06:49 PM
I installed this on a test forum that's running 2.3.0, and i'm pretty sure I did everything correctly. The ads to show up, but its a broken image. When I click the link it does link to the correct referrer though. I was doing this on a localhost, which links images from the internet (from a site that does allow image linking). Also, the views/clicks were not updated and remained 0. Is there anything obvious I overlooked or does it not work for a localhost install?

Are there any other banner hacks which track the traffic, perhaps?

Dean C
10-17-2003, 09:11 AM
Would this work with VB3 beta 7?
No :)

DiscussAnything
10-27-2003, 03:59 PM
Got it running, disregard my post 2 up.

I also did the modification that rotates the banner. Works fine but I noticed that the browser doesn't refresh the banners very well. If you load the first time on a showthread template for instance, all the other threads you view afterwards show the same banner. Until you refresh the browser. Is this a browser caching issue or can something be done to force the page to request a new banner? Do views get counted if its cached like this?

thx :)

Greivog
03-10-2004, 11:13 AM
Is there any way to make this a random banner script.

I have several banners i want to show randomally in the "header" template

Anyone tell me how to do this?

Cheers

Paul

SKerr
08-29-2004, 09:50 PM
I have ported KarateKid's banner mod to vBulletin 3.0.3 if anyone is interested..

I haven't done the userreport.php file yet, but I've got all the admin stuff done and it's working good on the site I'm administering. It was actually fairly easy to do - kudos to the vBulletin crew for writing a fairly decent API...

Speaking of which, is there any developer manual floating around for vB? Sure I've got the source, but it'd be nice to have a little philosophy behind the functions as well..

Thanks,
Steve Kerr (Killean)

SVTBlackLight01
08-30-2004, 12:48 AM
I'm interested. Are you going to publically release it?

SKerr
08-30-2004, 04:08 PM
Sure - give me a day or two as I'm still working on finishing up the report page for users..

Any requests?

SVTBlackLight01
08-30-2004, 04:21 PM
Although I had already come up with a solution for vB2, a lot of people wanted a way to rotate multiple banners.

SKerr
08-30-2004, 05:09 PM
That's already done - and I did it inside of the phpinclude_start template instead of dropping it in the globals.php file using someone's (can't remember off the top of my head) RAND() SQL fix.

I, and I think a few other people, had a problem using the view.php page to generate the image as it seemed either the browser was caching the image or whatever. So instead I just added code to phpinclude_start that increments the view value right after it selects the data from the database.

SVTBlackLight01
08-30-2004, 05:13 PM
Sounds good! :up:

SKerr
08-31-2004, 12:17 AM
Allrighty, here's my modifications.

- upgraded to work with vBulletin 3.0.x (I'm using 3.0.3, so I don't know for sure if earlier versions work %100)
- added springbok's fix to rotate banners properly
- user report now allows multiple banners per user

I haven't tested this to work with the 1.2 "banners between catagories" feature, so don't be surprised if this breaks if you implemented the 1.2 step 5.

I'm still a vB newbie, so if you find anything or want to improve on anything please let me know..

Thanks,
Steve Kerr (Killean)

rave42
09-02-2004, 01:13 AM
im trying to get vB Banner 1.3 to work with 3.0.3 and its not going very well.

Under VB Banner Control when i click add i get
Fatal error: Call to undefined function: makeinputcode() in
C:\Inetpub\wwwroot\site\forums\admincp\banner_mana ge.php on line 37

and when i click on Modify i get
Fatal error: Call to undefined function: doformheader() in
C:\Inetpub\wwwroot\site\forums\admincp\banner_mana ge.php on line 171

so it would seem im its not working at all. Any sugestions would be greatly appreciated.

Omar_2002
09-02-2004, 08:36 PM
Same problem here (v3.0.3)

SKerr
09-02-2004, 08:58 PM
Oops, my bad.. it would help if I included the right banner_manage.php file (I was working on this at home over the weekend and forgot to get the updated file from my ftp server).

Try this new one instead..

Omar_2002
09-02-2004, 09:22 PM
Thanks Steve,

Also, one other minor error: in click.php - it throws up an error, because "bid" in the insert statement should be "bannerid"

Thanks for the great hack :)

- Omar

SKerr
09-02-2004, 10:42 PM
Oh yeah.. I see. The line in click.php:

INSERT INTO userclicks (userid, bid, clicks) VALUES ('$boarduser', '$bid', '1')");

should be

INSERT INTO userclicks (userid, bannerid, clicks) VALUES ('$boarduser', '$bid', '1')");

And thank KarateKid for the hack.. I just needed it to work for a client who just upgraded to 3.0.3. ;)

Omar_2002
09-02-2004, 10:49 PM
Steve,

I'm not quite sure what you are saying in your post.

When using the click.php as-is, I was getting a db error when clicking on a banner, saying the column "bid" was not found in the table.

I assumed that this was to do with the following line in click.php:

$DB_site->query("INSERT INTO userclicks (userid, bid, clicks) VALUES ('$boarduser', '$bid', '1')");

Specifically the "(userid, bid, clicks)" - I have limited php knowledge, but I figured that this might have been the reason for the db error because the column is called "bannerid" and not "bin".

Please correct me if what I have done is wrong and/or might cause instabilities.

Thanks
- Omar

Omar_2002
09-02-2004, 10:50 PM
lol, you beat me to the post. Good to know that I'm not going crazy ;)

Thanks KarateKid!!!

computer1
03-01-2005, 05:18 AM
dus this work whit vb 3.0.7 ??

FD929
03-25-2005, 03:53 PM
Ok I'm kinda stuck here now. I have the banners rotating perfectly in my header. The banners belong to my two sponsors who have forums hosted on my board. What I would like to do is add those banners into the area specified on the attached email. The way I would like to do it, is through a global variable. i.e. the forum id is 47 and the banner id is 47. Therefore, banner 47 should show in the appropriate cell called by the variable in the forum bits. See what I'm saying? I think that was the intent of this post (https://vborg.vbsupport.ru/showpost.php?p=293308&postcount=74), but since the information refers to vb2 rather than 3, the information doesn't match up, and I can't figure it out.

If anyone can help, it would be greatly appreciated.

FD929
03-25-2005, 03:54 PM
dus this work whit vb 3.0.7 ??
yes it does

FD929
03-25-2005, 07:15 PM
Disregard my previous request. I used https://vborg.vbsupport.ru/showthread.php?t=63994 in addition.

It would be a nice modification though. If you ever do develop it for vb3.

Haaday
01-05-2006, 02:15 PM
I have created my tables in phpmyadmin and now tring to find the code to change in the admin/index.php file and I can not seem to find it? can anyone help me with this??

Parker Clack
04-30-2006, 01:39 PM
Do you think you could port this over to 3.5?

Thanks,
Parker