Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Looking for advice on banner ad implementation
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Looking for advice on banner ad implementation

 Post Reply Post Reply Page  <12
Author
alabamatoy View Drop Down
Groupie
Groupie


Joined: 04 February 2006
Location: United States
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote alabamatoy Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2010 at 1:21am
I just added some code to the header.asp file to display a randomly selected 500X100 hyperlinked banner image from a list.  See www.rocketcityrockcrawlers.com/forum and www.sfwda.org/forum for examples.  Open the main forum page, and hit refresh a few times.  I think I posted the code on here somewhere....

Edited to add:  Here's the code I used: http://forums.webwiz.net/banner-advertising_topic26419_post136258.html?KW=#136258



Edited by alabamatoy - 13 December 2010 at 1:25am
Back to Top
TonyM View Drop Down
Newbie
Newbie
Avatar

Joined: 10 November 2009
Location: Downunder
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote TonyM Quote  Post ReplyReply Direct Link To This Post Posted: 13 December 2010 at 2:06am
Thanks alabamatoy

Looks like it would do the job. Thumbs Up

I had a play with a javascript solution earlier this week as well, I think either js or a solution similar to yours is probably the best way to go given that the classic asp adrotator component is no longer supported, and using asp.net in conjunction with classic asp creates far too much overhead on the server judging by another post of billd's that I came across. (which is a shame as the asp.net banner rotator is a very nice solution)


Back to Top
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Post Options Post Options   Thanks (0) Thanks(0)   Quote billd3 Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 1:16pm
would that work with FLASH ads? AND allow the Flash to link?

Please see our forum:
http://theamcforum.com/forum
Check the banner ads (just 2 rotating at this point) and note that they are flash ads.......
Ordinary files such as PNG, GIF, BMP and JPG are simple, flash, well, that's different....
if we can do rotating with flash, and have the links work, etc. - I'd be willing to pay for something that worked and didn't suck all the resources! I love the setup we have now - someone can buy 30 days of advertising, I setup an account and an ad/banner, and set it for 30 days. After 30 days, their ad stops showing and the others keep on showing and I don't have to do a thing!!!
It even sends them an email on how many clicks there have been and how many "impressions".
But wow, it's sucked all the resources and memory, even adding memory, it still recycles according to Bruce.
Supposedly we can put the ad app in its own memory space and let it recycle often and not impact the rest of the forum, but I've not talked to Bruce about that, been TOO busy...

btw - alabamatoy - nice site.
BillD
http://theamcpages.com
http://theamcforum.com
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post Posted: 14 December 2010 at 7:44pm
Hi Bill

I think it would work and it would not cost you anything to implement it.
If you look at your current header file then I think you would need to edit from where it starts with:

<!-- Begin -  Site: TheAMCForum Zone: main-banner -->
and ends with
<!-- End -  Site: TheAMCForum Zone: main-banner -->

And replace the code in between with this:

<%
    Dim strarrayimage(3), strarraylink(3)
    Dim randomval
    
    'enter names of random banner images
    strarrayimage(0) = "/forum/bannerimages/2_star_rating.png"
    strarrayimage(1) = "/forum/bannerimages/3_star_rating.png"
    strarrayimage(2) = "/forum/bannerimages/4_star_rating.png"
    strarrayimage(3) = "/forum/bannerimages/5_star_rating.png"
    
    'enter links associated with above listed files
    strarraylink(0) = "http://www.link2"
    strarraylink(1) = "http://www.link3"
    strarraylink(2) = "http://www.link4"
    strarraylink(3) = "http://www.link5"
    
    randomval = Int(Rnd(1)*UBound(strarrayimage))
    Response.Write("<a href=""" & strarraylink(randomval) & """><img src=""" & strarrayimage(randomval) & """ ></a>")
    %>


as the example stated.
Obviously as you say the actual extension is the only difference, but I cannot see why it would not work. I'd advise you to make a backup of the includes/header.asp file which is the one you would need to change!
If you are unsure, then PM me and I'll see if I can help you with this

Back to Top
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Post Options Post Options   Thanks (0) Thanks(0)   Quote billd3 Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2010 at 9:21pm
That script won't work for FLASH because flash uses a variable that's in the file. So the script would have to be something like if xxx = fla (or whatever) then do whatever.
When you click on the flash file, it passes a variable if I have that correct. The banner programs take that into account. The Flash file doesn't act like a normal image.
one example - THIS is inside the flash file:


myButton_btn.onRelease = function(){
	getURL(url, "_blank");
};


BillD
http://theamcpages.com
http://theamcforum.com
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2010 at 9:47pm

Your using BanManPro for your advert system?

Does it now allow you to enter HTML for the advert?

(according to the site it says it does)

If this is the case, simply enter the code provided with the flash image
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
billd3 View Drop Down
Senior Member
Senior Member


Joined: 19 February 2003
Location: United States
Status: Offline
Points: 530
Post Options Post Options   Thanks (0) Thanks(0)   Quote billd3 Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2010 at 12:55am
Uh, we aren't having problems with links in banman, I was stating that the code pasted here in this thread that does random image display will not work for flash because it doesn't deal with how flash handles links. You have to pass the link as a variable to the flash ad. That code doesn't do it.
Banmanpro handles flash ads wonderfully. The issue is the memory overhead.
So I was thinking if I could simply use code to display random ads, that would be fine, except the code as posted here won't do flash. It will not display a flash ad that's "clickable".
 
This is part of the code, and the url for the link is defined elsewhere in the program.
 

<SCRIPT LANGUAGE=JavaScript>
var ShockMode = 0;
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave Flash"])
ShockMode = 1;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.userAgent.indexOf("Windows 9")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) ');
document.write('<\/SCRIPT\> ');
}
if ( ShockMode ) {
document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"');
document.write(' ID=banner WIDTH="300" HEIGHT="100" >');
document.write(' <PARAM NAME=movie VALUE="http://theamcforum.com/forum/ads/alternator.swf?url=[BanManProURL]"> ');
document.write(' <param name="wmode" value="transparent"> ');
document.write(' <PARAM NAME=quality VALUE=autohigh> ');
document.write('<EMBED SRC="http://theamcforum.com/forum/ads/alternator.swf?url=[BanManProURL]"');
document.write(' swLiveConnect=FALSE WIDTH="300" HEIGHT="100"');
document.write(' QUALITY=autohigh wmode="transparent"');
document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="'">http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
document.write('</EMBED>');
document.write('</OBJECT>');
} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
document.write('<A HREF="[BanManProURL]" TARGET="_top"><IMG SRC="http://theamcforum.com/forum/ads/alt-ad.gif" WIDTH="300" HEIGHT="100" BORDER="0"></A>');
}
</SCRIPT>
BillD
http://theamcpages.com
http://theamcforum.com
Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.