Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Banner Exchange --> NonSSI Paramaters

Quote Reply
Banner Exchange --> NonSSI Paramaters
I have successfully written a Banner Mod for Links SQL v1.11 (well...a rudimentary one that does the following:

1) Allows users to add, modify, and delete banners that keys off the UserID field in the Users table and LinkID (ID) field in the Links table. (This is really nice since it is a N->N connection, meaning that there is only one banner for each link that the user adds. There is a N->M connection with the Users table that allows one user to add many banners for many links that they have added. Also, users cannot add banners until they have added a link in the Links table.)

2) Stores Hits and Views in separate tables in the database. (Much faster than flat file banner systems, including WebAdverts, I've used in the past.)

3) Keeps separate data for updating the Hits and Views fields in the Banners table.)

I did confront a momentarily Out of Memory problem due to malformatted fields in the tables. But I worked that problem out.

OKAY...here is my question...What are your thoughts about passing parameters via the banner view script that will allow users to put the Banner script in their web pages? I have tried a few things, including the following:

1) Using the random codes in the jump.cgi and an additional nonssi parameter that prints the location of the banner with a link that passes through banner click script

2) Simply used the nonssi parameter to print the location of the banner and link.

These attempts did not work.

Any thoughts or suggestions would be greatly appreciated...

(BTW: I did read MANY threads that pertained to advertisements and banners, but there was no information that will help me with my current challenge. And, Yes, I have looked at the many banner programs for MySQL/PHP suggested by Links SQL users and I think they are inundated with tons of unnecessary codes and also are too robust for the goals of my banner exchange script PLUS it is really easy to use the same logic of LINKS SQL.)

And, no, I am not comfortable releasing this Modification since there are some makeshift codes I am using, which would be difficult to understand. May be when I clear up the Exchange issue, I will clean up the codes and release this Mod for people who are not planning on upgrading to the next version of Links SQL for awhile.

Thanks in advance....

Regards,

Eliot Lee

Quote Reply
Re: Banner Exchange --> NonSSI Paramaters In reply to
I agree most banner programs are too big, do too much, and are far, far from optimized for the job at hand. Every site has a different banner need, and a different way of passing information. A links site has a very well defined way of passing data, and can eliminate lots of overhead code. Also, Links SQL has many, many routines already built in that can be used to develop the banner program, thereby reducing memory usage, number of external calls, etc.

But, I have _no_ idea what you are trying to do <G>

First, is this a banner exchange? If so, links are as you say 1->1, rather than 1->M

With a banner server, there are additional things that need to be considered. In a banner exchange it's basically an x:y ratio for serving, weighted targeting if you want it, and a reciprocal links checker.

For a banner system, you also need accounting, regions, zone, campaigns, etc.

Explain a bit more.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Banner Exchange --> NonSSI Paramaters In reply to
In Reply To:
First, is this a banner exchange?
Yes...and I did mean 1->M (although I like using N as meaning 1)....Wink

And actually...the only stats that I will be storing in the database are Hits, Views, and Percentage (actually, this will be calculated when the user accesses their banner stats)...so, I don't need zones, accounting, etc.

This is a simple banner exchange script that allows users to display the banners in their web sites. I have it working just fine via SSI...but I would like to continue the service of providing banners in user web sites...so, thus...I am looking for a way to allow the banners to be viewed NOT by SSI or javascript...less codes for users to use....

My vision is to have a link like the following:

Code:

<a href="http://www.mydomain.com/bin/banhits.cgi?id=something">
<img src="http://www.mydomain.com/bin/banclick.cgi?image=something"></a>


My thought is to match the ID (LinkID) of the banner with the IMAGE of the banner within a simple link like I have posted.

BTW: I forget to mention that the other feature I have working in this script is that if there are no random banners to display, it displays a default banner for the banner exchange.

Regards,

Eliot Lee

Quote Reply
Updated: Banner Exchange --> NonSSI Paramaters In reply to
Just wanted to bring this Thread to the top of the forum. I am not much further than I was a couple days ago. I am still experiencing the following problems:

1) Displaying the banner in NONSSI mode via external web pages.

2) Truly randomizing the banners. It seems that the random codes from jump.cgi are not the most efficient for posting banner advertisements.

I have posted two text files in my server:

http://www.anthrotech.com/tmp/banclick.txt
http://www.anthrotech.com/tmp/banhits.txt

To see this in action, go to:

http://vlib.anthrotech.com/bin/banclick.cgi

If anyone has suggestions for improving the script and also how to use it in NONSSI mode, so that I can use it for my Banner Exchange (which I am currently using WebAdverts --> YUCK!), I would appreciate them.

Regards,

Eliot Lee

Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Eliot,

You mention somewhere that you have a default banner to display if there is a problem etc. (I think), when calling via NonSSI does this default banner display?

Also have you tried using the iFrame tags aswell?

You know im not much cop a this but would like to try and help, I've spent the last hour skimming the Webadverts script and the ones you posted but both seem to reference the same things, although your is much neat and tidier.



Regards

MDJ1
http://www.isee-multimedia.co.uk
Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Hello Mark,

Thanks for the reply...I appreciate it.

In Reply To:
...when calling via NonSSI does this default banner display?
That's is the problem...it doesn't print in NonSSI...and I am still stuck as to execute the script other than SSI.

In Reply To:
Also have you tried using the iFrame tags aswell?
Good suggestion...however, this is not interoperable between browsers. Of course, I could use javascript codes to check the browser, than use IFRAME for MIE browsers and ILAYER for Netscape browsers. However, in terms of usability issues, this would be quite challenging for my Link/Banner Owners to copy the codes into their web pages. I want to employ the KISS (keep it simple stupid) method for allowing Link Owners to post banners in their web pages. This is technically not an advertisement script, but a banner exchange script.

In Reply To:
You know im not much cop a this but would like to try and help, I've spent the last hour skimming the Webadverts script and the ones you posted but both seem to reference the same things, although your is much neat and tidier.
Thanks...I guess I will continue to play around with this script...I can't wait til the day I can delete 250,000 bytes of WebAdverts files from my server and use this Banner Exchange script. Oh well...thanks for helping to bring this Thread to the forefront of this Forum.

Regards,

Eliot Lee



Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Eliot,

Which are the problems?

Randomizing the banners? If you want a non-weghted average, generate your random number from a table. I know this sounds strange, but if you generate a table of numbers, or a list of numbers that is 'random' then randomly access it for a random period of time, you end up with as close to a random distribution as possible.

There are probably random number generation scripts/modules in the CPAN archive. The problem is the 'seed' value. Time is often used, since the process ID may not change. Trouble is, the Time doesn't change quickly enough for a high-volume site. In a digital world, you don't have the random fluctuations of an analog spin of the wheel.

This is why using a complicated (and 'expensive') process to generate a table of values, then reading that table in order (FIFO) can give a close-to-random distribution and a good speed boost.

In reality, on high volume sites, running a 'random' daemon that keeps a stack of values full, and popping off the next value would be the most efficient, than trying to generate a number individually per-iteration.

This would also get around any mod_perl problems of not re-initializing pointers or index values, whatever.

It's been about 10+ years since I looked at the theory of random numbers <G> But it's hard to get a random number in a digital world. Truly random numbers come from accessing some analog device for a value <G>

When it comes to weighted randomness (such as giving certain banners priority) the algorithms get very complex, and you need to calculate it each time.

This is why I suggested (months ago when I was working on the banner issue) that some sort of compiled look up table be used to figure out the weighted value then run the random (or vice versa).

When Alex said there was going to be some integrated banner code, I stopped working on it, but not thinking about the problems.

If none of this addresses the issue, explain it again, and I'll try again. <G>

About 10 years ago I got convinced on the utility and benefits of lookup tables (after all, that's how operating systems and compiled languages work). What you need to do is figure out what you want to look up, then create the table <G>

If you have a certain number of banners, with a weighted distribution, and a look up algorithm, you can do almost anything by just changing the table.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Thanks for the reply, pugdog...The most crucial problem is getting the banners to appear in NONSSI web pages. I can continue to work on the "random" codes. The banners are randomized, although I notice that a few times, when I re-load a page with the banners, that the same banner shows.

So, I guess I am looking for some guidance to edit the scripts I've written to make banners appear on Non-SSI web pages. Does this make sense? I believe I have stated a few times in this Thread that this is the most crucial problem.

If I am unclear, please let me know.

Thank you.

Regards,

Eliot Lee

Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Can't you use a plain image tag that points to your banner script, and then chang the header to image/gif or image/jpeg, and then use:
Code:
print "Location: $image\n\n";
or whatever to print the image?

This seems like too easy an answer to be correct. Am I missing something?

--Drew
Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Thanks for the reply, Drew...but it wasn't that simple...the codes you provided do not work using strict.

I did change the Content type to image/gif..but the codes just printed out...I think I am close...

Regards,

Eliot Lee

Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
have you made any progress on this?

Have you looked over the code on some of the other programs that use non-SSI banners? In the "old" days, just using the IMG tag to call a CGI script that sent back an image was how it was done. Then, things got a bit more complicated, and many people are using "iframes".

The "backend" server keeps track of session data on the user/page and directs ore re-directs the user.

This is why so many low-end scripts use SSI, and why most of the banner services have now gone to java applets to do a "pull". Javascript is also used to create the iframes and load them.

I'm just starting to dig into this again.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/

Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
Thanks for the reply, pugdog...I appreciate it.

In Reply To:
have you made any progress on this?
Sort of...not really...I am now playing with it again...I don't know if any tricks I apply this afternoon will work...I am testing passing similar parameters as WebAdverts (this will also help Banner Owners, since if I can get similar or same parameters...all I have to do is overwrite the current ads.cgi and they do not have to edit their web pages).

In Reply To:
Have you looked over the code on some of the other programs that use non-SSI banners? In the "old" days, just using the IMG tag to call a CGI script that sent back an image was how it was done. Then, things got a bit more complicated, and many people are using "iframes".
Yes...as I mentioned above in one of my previous posts, I have been looking at WebAdverts codes and other scripts to get a feel for how to do this...

In Reply To:
This is why so many low-end scripts use SSI, and why most of the banner services have now gone to java applets to do a "pull". Javascript is also used to create the iframes and load them.
I do not want to go this route...I prefer to use IMG tags and not use some interoperable codes...I know I could use ILAYER for Netscape and IFRAMES for MIE with adding some browser check codes, but this would be complicated for Banner Owners to implement. A simple IMG tag would be best.

Thanks again for responding...I will let ya'll know if I make any progress.

Regards,

Eliot Lee


Quote Reply
Re: Updated: Banner Exchange --> NonSSI Paramaters In reply to
non ssi banners use cookies..

just save the banners ID in the cookie.. also you have to identify the page somehow in the image code so it can have multiple banners on one page..

Jerry Su