vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Ad banners for unregistered users (https://vborg.vbsupport.ru/showthread.php?t=35357)

DrkFusion 06-24-2002 03:46 AM

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.

Michael2 07-10-2002 12:16 AM

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.

halloweennation 08-19-2002 04:06 PM

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/

James Cridland 08-19-2002 06:04 PM

Quote:

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.

halloweennation 08-19-2002 06:33 PM

Tried the popup "_blank" thing, but there's a restriction on using "'s in the code, so it didn't take too well.

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,

And am a novice about code, so need it spelled out really plain to get a rotating banner. Here's what I've got online.

// This code is PHP4 only:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
//ad banner
$adcode="";
if ($bbuserinfo['userid']<"1") {
$adcode="<TABLE width='100%' bgcolor='#000000><TR><TD align='center'><normalfont><B><a href=\"register.php?s=$session[sessionhash]&action=signup\">Register free</a> to remove this ad banner</b></normalfont></td><TD align='right'>
<a href=\"http://www.sideshowtoy.com\"><img src=\"http://www.halloweennation.com/Images/sst.jpg\">
</td></tr></table>";
}
//end

James Cridland 08-19-2002 07:01 PM

Quote:

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.

monstergamer 05-30-2003 01:56 AM

clicks installed*


All times are GMT. The time now is 07:59 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01503 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete