The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How can I insert and image in Ads?
I have been wrestling with this one for a while. Tried searching but get errors. I hope someone can help. I would like to insert ads that consist of a banner sized image which is local to my server with a link to the customers website if available. I don't have customer code. Is this possible? Assistance would be much appreciated!
|
#2
|
|||
|
|||
Where would you like it aligned?!
|
#3
|
|||
|
|||
Left or Center. Need to get it working then worry about the details.
|
#4
|
|||
|
|||
Just use the folowing HTML:
HTML Code:
<center> <a href="http://www.LinkToTheOtherWebsite.com"><img src="http://www.URLwhereYourBannerIsLocated.jpg" width="300" height="125" alt="Write here info about the advertiser"></a> </center> |
#5
|
|||
|
|||
Wow! Thank you! This is the most progress I have made in weeks. Both ads are displaying. Can you tell me what template they are in so perhaps I can get them to rotate instead of stack?
Your help is really appreciated! |
#6
|
|||
|
|||
If you have multiple banners you want to show, and you want to show them random with every page refresh, you can use the next code.
This code is for 4 banners. In this case your banners will be shown fully and will not be scaled, so you might have to scale them yourself. Change the array into the amount of banners you have. HTML Code:
<center> <script language="JavaScript"> images = new Array(4); images[0] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.PlaceWhereTheBannerIsStored.gif' alt='Hover text'></a>"; images[1] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.PlaceWhereTheBannerIsStored.gif' alt='Hover text'></a>"; images[2] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.PlaceWhereTheBannerIsStored.gif' alt='Hover text'></a>"; images[3] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.PlaceWhereTheBannerIsStored.gif' alt='Hover text'></a>"; index = Math.floor(Math.random() * images.length); document.write(images[index]); </script> </center> admincp --> Advertising --> Manage Ads --> Add new ad |
Благодарность от: | ||
martar |
#7
|
|||
|
|||
Again, thank you so very, very much!
--------------- Added [DATE]1302500002[/DATE] at [TIME]1302500002[/TIME] --------------- Got some time this evening and substituted the rotating code for the static code. I must have something wrong because nothing is appearing. This is what I have: <center> <script language="JavaScript"> images = new Array(2); images[0] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.jouster.com/forums/images/banner/otis.gif' alt='Hover text'></a>"; images[1] = "<a href = 'http://www.LinkToBannersWebsite.com target=_new><img src='http://www.jouster.com/forums/images/banner/turnerslings.jpg' alt='Hover text'></a>"; index = Math.floor(Math.random() * images.length); document.write(images[index]); </script> </center> Is it correct or do I have a boo-boo that I just can't see? Thank you again! |
Благодарность от: | ||
martar |
#8
|
|||
|
|||
Quote:
The error was in this (here corrected line) : images[0] = "<a href = 'http://www.LinkToBannersWebsiteA.com' target='_blank'><img src='http://www.PlaceWhereTheBannerIsStored_a.gif' alt='Funny hover text'></a>"; Complete and correct code is: HTML Code:
<center> <script language="JavaScript"> images = new Array(4); images[0] = "<a href = 'http://www.LinkToBannersWebsiteA.com' target='_blank'><img src='http://www.PlaceWhereTheBannerIsStored_a.gif' alt='Funny hover text A'></a>"; images[1] = "<a href = 'http://www.LinkToBannersWebsiteB.com' target='_blank'><img src='http://www.PlaceWhereTheBannerIsStored_b.gif' alt='Sad hover text B'></a>"; images[2] = "<a href = 'http://www.LinkToBannersWebsiteC.com' target='_blank'><img src='http://www.PlaceWhereTheBannerIsStored_c.gif' alt='Stupid hover text C'></a>"; images[3] = "<a href = 'http://www.LinkToBannersWebsiteD.com' target='_blank'><img src='http://www.PlaceWhereTheBannerIsStored_d.gif' alt='Intelligent hover text D'></a>"; index = Math.floor(Math.random() * images.length); document.write(images[index]); </script> </center> I also use target='_blank' instead of target='_new' but I don't know if this makes any difference, my programming days were somewhere back in the past... I hope this helps somebody - at least to save some hours of searching the error. |
#9
|
|||
|
|||
Thanks for correcting :up:
I could have seen that there was something wrong by the colors of the code, but havent noticed it! |
#10
|
||||
|
||||
Installed and working great!!
Thanks guys. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|