Version: , by James Cridland
Developer Last Online: Mar 2022
Version: Unknown
Rating:
Released: 02-23-2002
Last Update: Never
Installs: 0
No support by the author.
I loathe and detest ad banners.
But when you run a board where 50% 'unregistered users' use it, and you want to increase the amount of users you have registered, it might be worth experimenting with an ad banner for unregistered users only.
Enclosed is the code to do that: it's modifying two templates.
This is v2 of the code, with the following enhancements:
- Hide ad banners for users who have donated
- Bug fix: I didn't close the 'normalfont' tag!
- Force users to both register AND verify e-mail addresses
Plus, enhanced information for users, following feedback here
I have accomplished this via editing index.php, and it uses tables, i released it as a forum home modification, as an addon to Welcome Panel, but it can be removed from Welcome Panel, and used by itself in ForumHome.
It can be editied easily to fit any of your needs, especially Saint Dogs, or Organic-Hosting.
Well,
I've got this installed, but when I changed the color (white text on light grey didn't go) the color wasn't dark grey, but red AND the "register to remove this banner......" was moved to above the bar, instead of inside the middle of it. Help!
I'd also like the links to pop upon into a new page, and rotating banners instead of just one. Any ideas? Please email directly to Vlad@halloweennation.com
Thanks in advance,
-Chris http://forums.halloweennation.com/
Originally posted by Michael2 Can I replace the ad banner code and table that you have now with a code for a pop up? I want unregistered users to get pops but not registered users.
You can, no problem at all. Instead of the "$adcode" being an ad, you can chuck your nasty pop-up code in there. Then, call $adcode in your footer template rather than the header template (because then the popup code will activate once the page is fully loaded, and not before).
Just remember to escape any " characters - i.e. turn them into \".
Quote:
Originally posted by halloweennation I've got this installed, but when I changed the color (white text on light grey didn't go) the color wasn't dark grey, but red AND the "register to remove this banner......" was moved to above the bar, instead of inside the middle of it. Help!
I'd also like the links to pop upon into a new page, and rotating banners instead of just one. Any ideas? Please email directly to (snip)
The first one's an HTML thing, and something I can't really help on. Sounds like you've removed a </td> when you shouldn't have.
Links to pop-up a new browser window is fairly easy: <a href="foo.html">This</a> will open in the same browser window. <a href="foo.html" target=_blank>This</a> will open in a new one. How you author your ad code is really up to you.
Rotating ad banners? Well, I've got these: there must be an easier way, but this is how I've done it.
Replace the $adcode="<TABLE..... bit of your code with the following:
PHP Code:
$adcoderandom = rand(1,4); \\picks a random number between 1 and 4
if ($adcoderandom==1) {$adcode = "<TABLE><TR><TD>BUY FISH</TD></TR></TABLE>"; } //this ad shows if random number is "1"
if ($adcoderandom==2) {$adcode = "<TABLE><TR><TD>BUY SAUSAGES</TD></TR></TABLE>"; } //this one if it's "2"
if ($adcoderandom==3) {$adcode = "<TABLE><TR><TD>BUY TROUSERS</TD></TR></TABLE>"; } // etc
if ($adcoderandom==4) {$adcode = "<TABLE><TR><TD>BUY CHEESE</TD></TR></TABLE>"; }
Sorry, but I'll never mail support direct to someone; it's not what community forums are all about.
Originally posted by halloweennation Tried the popup "_blank" thing, but there's a restriction on using "'s in the code, so it didn't take too well.
<a href=\"http://www.sideshowtoy.com\">
should become
<a href=\"http://www.sideshowtoy.com\" target=\"_blank\">
Quote:
[/b]Still can't get the "register to make this banner disappear....." text into the middle of the box beside the banner, as opposed to above it[/b]
The code looks fine - just dunno what it's been put into. If the space for the table is less than 468x60, it'll not fit properly anyway. Can't help much with that, sorry.
This hack's really for people that have a vague inkling about PHP (you don't need much, just a vague inkling). If you copied the code above for four rotating ad banners, but put your own ad code into the holes, it should work just fine for you.