Advertising Widget Code
3 posters
Page 1 of 1
Advertising Widget Code
Okay...I have noticed how on sites like Yahoo!, whatever..they all show a random advertisment. What is the code to show a random advertisment on every page visit.
Last edited by Cman on August 2nd 2009, 8:15 pm; edited 3 times in total
Re: Advertising Widget Code
If you have registered with the Google Adsense program, you can get a code that places ads on your page. As for the widget, that doesn't seem to work with those ad codes. The Google Adsense program allows Google to place ads on your forum using the code they give when you design the ad and Google will pay you per page impression or per click. Hope that helps.
Re: Advertising Widget Code
Well, I am doing my own advertisments. I just need the code. I think Google ads are things like <img src=*******>
Re: Advertising Widget Code
Hi Cman!
You can use this code to put random advertisement on your page.
You can put it in widgets or anywhere by editing your template.
Read the script carefully, it is self explanatory
You just have to edit image url and link url.
You can use this code to put random advertisement on your page.
You can put it in widgets or anywhere by editing your template.
- Code:
<script language="JavaScript">
<!--
/*
Random Image Link Script
By Website Abstraction (http://www.wsabstract.com)
and Java-scripts.net (http://www.java-scripts.net)
*/
function random_imglink(){
var myimages=new Array()
//specify random images below. You can have as many as you wish
myimages[1]="img1.gif"
myimages[2]="img2.gif"
myimages[3]="img3.gif"
//specify corresponding links below
var imagelinks=new Array()
imagelinks[1]="http://www.wsabstract.com"
imagelinks[2]="http://www.dynamicdrive.com"
imagelinks[3]="http://www.java-scripts.net"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<a href='+'"'+imagelinks[ry]+'"'+'><img src="'+myimages[ry]+'" border=0></a>')
}
random_imglink()
//-->
</script>
Read the script carefully, it is self explanatory
You just have to edit image url and link url.
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Advertising Widget Code
Thanks...that is EXACTLY what I needed...you solved it on the first try. Once AGAIN, ankillien, you solved it.
Edit: wait...it doesn't work on my forum, but it works everywhere else.
Edit: wait...it doesn't work on my forum, but it works everywhere else.
Re: Advertising Widget Code
Where do you put the code?
In a widget? or HTML page?
The code should go between <body> tags.
In a widget? or HTML page?
The code should go between <body> tags.
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Advertising Widget Code
hmmm.. there is a problem with the script.
It has to go between <html> <body> tags and widgets won't execute these tags.
So, now you need to create an HTML page, put the script between <html> and <body> tags and save.
Check if it works. If yes, go ahead....
Put this code in the widget where you want to show the ads...
Just add the url of the HTML page that you just created and save.
It should work now.
Hope you understand this
It has to go between <html> <body> tags and widgets won't execute these tags.
So, now you need to create an HTML page, put the script between <html> and <body> tags and save.
Check if it works. If yes, go ahead....
Put this code in the widget where you want to show the ads...
- Code:
<iframe src="HTML PAGE URL HERE" width="98%" height="98%"></iframe>
Just add the url of the HTML page that you just created and save.
It should work now.
Hope you understand this
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Advertising Widget Code
Oh my gosh! You are sidekick! I already did that. Except I used this code:
Thanks for the help, it is solved.
- Code:
<center><iframe name="FRAME1" src="http://justcorbin.forumotion.net/Advertisments-h39.htm" width="100%" height="110" frameborder="1" ></iframe>
<br><A href="about:blank" target="FRAME1" onfocus="this.blur()"><FONT size=4 face=Arial>Disable Advertisments</FONT></A></br></center>
Thanks for the help, it is solved.
Re: Advertising Widget Code
Since the topic is solved, I'll lock it.
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Similar topics
» Created a widget but when I paste the code to embed it and add to our forum it just shows the code in the widget box.
» I add a new Forum widget for my Affiliates code but I want to remove the code that shows there!
» My own advertising code
» HTML code similar to External Widget but for AD widget instead?
» Advertising table code
» I add a new Forum widget for my Affiliates code but I want to remove the code that shows there!
» My own advertising code
» HTML code similar to External Widget but for AD widget instead?
» Advertising table code
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum