Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-10-2011, 03:44 PM
Gloria Culver Gloria Culver is offline
 
Join Date: Aug 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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!
Reply With Quote
  #2  
Old 04-10-2011, 03:48 PM
Frosty Frosty is offline
 
Join Date: Apr 2011
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where would you like it aligned?!
Reply With Quote
  #3  
Old 04-10-2011, 04:04 PM
Gloria Culver Gloria Culver is offline
 
Join Date: Aug 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Left or Center. Need to get it working then worry about the details.
Reply With Quote
  #4  
Old 04-10-2011, 08:48 PM
Stefan118 Stefan118 is offline
 
Join Date: Dec 2010
Location: Vaassen (Netherlands)
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #5  
Old 04-10-2011, 09:07 PM
Gloria Culver Gloria Culver is offline
 
Join Date: Aug 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #6  
Old 04-10-2011, 10:06 PM
Stefan118 Stefan118 is offline
 
Join Date: Dec 2010
Location: Vaassen (Netherlands)
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Just put it in:
admincp --> Advertising --> Manage Ads --> Add new ad
Reply With Quote
Благодарность от:
martar
  #7  
Old 04-10-2011, 11:18 PM
Gloria Culver Gloria Culver is offline
 
Join Date: Aug 2009
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
Благодарность от:
martar
  #8  
Old 07-25-2011, 11:45 PM
martar martar is offline
 
Join Date: Jul 2011
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gloria Culver View Post
[...]
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?

[...]
There are missing some single quotes.

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.
Reply With Quote
  #9  
Old 09-20-2011, 09:08 PM
Stefan118 Stefan118 is offline
 
Join Date: Dec 2010
Location: Vaassen (Netherlands)
Posts: 299
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for correcting :up:

I could have seen that there was something wrong by the colors of the code, but havent noticed it!
Reply With Quote
  #10  
Old 01-15-2012, 06:37 PM
mradlin's Avatar
mradlin mradlin is offline
 
Join Date: Nov 2008
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working great!!
Thanks guys.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09647 seconds
  • Memory Usage 2,266KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete