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

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2006, 06:29 PM
randy. randy. is offline
 
Join Date: Apr 2006
Location: Ireland
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Ad banners

how can i add adverts to my forums??
Reply With Quote
  #2  
Old 09-18-2006, 03:11 PM
satcruiser satcruiser is offline
 
Join Date: Sep 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by randy.
how can i add adverts to my forums??
Adding a banner is easy if you are running vbulletin version 3.5 or higher (with plug in capability)

acitvate the admincp control panel
click on add plug in
select hook location (forumhome_complete)
add the following PHP code in the PHP window

echo "<div align='right'>";
echo "<table border='0' cellpadding='0' cellspacing='0'>";
echo "<tr>";
echo "<td width='100%' align='right'>";
echo "<p align='justify'>";
echo "<a href='http://www.EXMAPLE.com/index.html' target='_blank'>";
echo "<img src='http://www.EXAMPLE.com/images/bn_banner.gif' border='0' align='right' width='200' height='80'>";
echo "</a>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";

Note***: IF a PHP line above does not start with "ECHO" then it is part of the previous line (darn wrapping) and should have a space after the last word of the previous line.

The above code will create a banner using image file bn_banner.gif and will create a new window (target _blank) when you click on the image. If you do not want to create new window then just remove (target _blank). WWW.EXAMPLE.COM is your website, you can use subdirectory if you want to point to your shopping cart for example use www.example.com/shopping/index.html

The only problem is that this code will be displayed only when you start the forum. If you want the advertisement to show in the threads or when someone reads a post, then just create two more plug ins at these hook locations using the same PHP code, the locations are (showthread_complete and forumdisplay_complete)

I do not know of a "hook location" where I would have to enter this code only once and make it appear on every page. If someone knows, any help will be appreciated.

I selected image size 200 by 80, you can use your own image size, I found it to look the best.

It took me sometime to figure this out, so I hope this will help you. Good luck
Reply With Quote
  #3  
Old 09-20-2006, 05:22 PM
randy. randy. is offline
 
Join Date: Apr 2006
Location: Ireland
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i've just upgraded to ver 3.6.1 is there a advertisment plugin i can use?
Reply With Quote
  #4  
Old 09-20-2006, 05:40 PM
jackceltic1888 jackceltic1888 is offline
 
Join Date: Apr 2006
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by randy.
i've just upgraded to ver 3.6.1 is there a advertisment plugin i can use?


Just add the coding in the templates, no need for a plugin




PM me if you need anyhelp....
Reply With Quote
  #5  
Old 09-20-2006, 06:13 PM
Ntfu2 Ntfu2 is offline
 
Join Date: Feb 2006
Posts: 1,247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by satcruiser
Adding a banner is easy if you are running vbulletin version 3.5 or higher (with plug in capability)

acitvate the admincp control panel
click on add plug in
select hook location (forumhome_complete)
add the following PHP code in the PHP window

echo "<div align='right'>";
echo "<table border='0' cellpadding='0' cellspacing='0'>";
echo "<tr>";
echo "<td width='100%' align='right'>";
echo "<p align='justify'>";
echo "<a href='http://www.EXMAPLE.com/index.html' target='_blank'>";
echo "<img src='http://www.EXAMPLE.com/images/bn_banner.gif' border='0' align='right' width='200' height='80'>";
echo "</a>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</div>";

Note***: IF a PHP line above does not start with "ECHO" then it is part of the previous line (darn wrapping) and should have a space after the last word of the previous line.

The above code will create a banner using image file bn_banner.gif and will create a new window (target _blank) when you click on the image. If you do not want to create new window then just remove (target _blank). WWW.EXAMPLE.COM is your website, you can use subdirectory if you want to point to your shopping cart for example use www.example.com/shopping/index.html

The only problem is that this code will be displayed only when you start the forum. If you want the advertisement to show in the threads or when someone reads a post, then just create two more plug ins at these hook locations using the same PHP code, the locations are (showthread_complete and forumdisplay_complete)

I do not know of a "hook location" where I would have to enter this code only once and make it appear on every page. If someone knows, any help will be appreciated.

I selected image size 200 by 80, you can use your own image size, I found it to look the best.

It took me sometime to figure this out, so I hope this will help you. Good luck
Maybe the most complicated way i've ever seen anyone add advertisements to their forums...ever
Reply With Quote
  #6  
Old 09-20-2006, 06:20 PM
jackceltic1888 jackceltic1888 is offline
 
Join Date: Apr 2006
Posts: 67
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ntfu2
Maybe the most complicated way i've ever seen anyone add advertisements to their forums...ever

I agree,


I always use.

Code:
   <td valign="top"><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0" class="topWrapper">
<tr><a href="URL"><img src="BANNER" border="0"></a></tr>
        </table></td>
        </tr>


Regards
Reply With Quote
  #7  
Old 09-28-2006, 06:47 PM
randy. randy. is offline
 
Join Date: Apr 2006
Location: Ireland
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im lost
Reply With Quote
  #8  
Old 09-30-2006, 12:59 PM
randy. randy. is offline
 
Join Date: Apr 2006
Location: Ireland
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jackceltic1888
I agree,


I always use.

Code:
   <td valign="top"><table width="100%" border="0" align="right" cellpadding="0" cellspacing="0" class="topWrapper">
<tr><a href="URL"><img src="BANNER" border="0"></a></tr>
        </table></td>
        </tr>


Regards

went into templates but got lost, which template do i edit and where exactly do i add the code?
Reply With Quote
  #9  
Old 10-01-2006, 02:05 AM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These might help you out

CFM: Google AdSense for Search Integration

Adsense Banners in Your Archive

Info Box - Adsense, Register, and Donations Box (Working Quick Reply)

Adsense & Banner - Posbit < This is really for 3.5.1 but I use it on my 3.61 and it works great 1 banner after the 1st post
Reply With Quote
  #10  
Old 10-01-2006, 04:37 PM
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
Location: Boston | Seoul, S. Korea
Posts: 1,311
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nathan2006
These might help you out

CFM: Google AdSense for Search Integration

Adsense Banners in Your Archive

Info Box - Adsense, Register, and Donations Box (Working Quick Reply)

Adsense & Banner - Posbit < This is really for 3.5.1 but I use it on my 3.61 and it works great 1 banner after the 1st post
thanks!! I always forget where the adsense threads are!
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:50 PM.


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.13962 seconds
  • Memory Usage 2,262KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (6)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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete