Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Adsense (or other) in a Block like a Thread on FORUMDISPLAY Details »»
Google Adsense (or other) in a Block like a Thread on FORUMDISPLAY
Version: 1.01, by Leo Brazil Leo Brazil is offline
Developer Last Online: Aug 2017 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 4.0.x Rating:
Released: 03-03-2010 Last Update: 03-11-2010 Installs: 65
Template Edits
Re-useable Code Translations  
No support by the author.

This is a simple code to be added into your FORUMDISPLAY Template that will deliver your adsense or images just like Thread Table and it'll fit the same design you have on your forums.

Khalled had this idea from a vb3 Code and asked me some help because of my other mod: Google Adsense (or other) in a Block like an Individual Post
And this was from where his original idea came from https://vborg.vbsupport.ru/showthread.php?t=237136

Code:
<ol>
<div id="forumbits" class="forumbits">
<div class="forumhead">
<h2><span class="forumtitle">Sponsored Links</span>
</h2>
</div>
<div class="forumbit_post L2 table">
<div class="forumrow">
<center>-----ADD YOUR ADSENSE CODE GOES HERE----</center>
</div>
</div>
</ol>
Note: Just don't forget to add your adsense code where is indicated.


If you want it below your thread list considering a respective Forumdisplay that plays like a forum and not a category you have to:

On FORUMDISPLAY Template

Find:

Code:
   <vb:if condition="$show['threads']">
    <ol id="threads" class="threads">
     {vb:raw threadbits}
    </ol>
<ol>
Just place the code below it.

If you want it above your subforum list as well as Threadlist you have to:

Find:

Code:
{vb:raw template_hook.forumdisplay_above_subforums}
Just place the code below it.


If you want it below your subforum list as well as Threadlist you have to:


Find:

Code:
{vb:raw template_hook.forumdisplay_below_subforums}

If you want it below your sticky threads you have to:

Find:

Code:
     {vb:raw threadbits_sticky}
    </ol>
Just place the code below it.

Update!!

If you'd like to have your adsense looking just like a thread (see 4th screen shot) use the code below:

Code:
<li class="threadbit dot hot">
<div class="rating0 sticky">
 <div class="threadinfo">
<a class="threadstatus" rel="vB::AJAX" title="Sponsored Links"></a>
 <div class="inner">
 <span class="prefix understate">-----YOUR ADSENSE GOES HERE------</span>
 </div>    
 </div>
 <ul class="threadstats td">
 <li>-</li>
 </ul>
  <dl class="threadlastpost td">
<dd><div class="popupmenu memberaction">-</div>
</dd>
</dl>
</div>
</li>
Just don't forget to replace on the code above with your own adesense.
Note: The code above will look good only if placed as suggested below and will appear like a sticky thread after the sticky ones you already have.

Find:

Code:
 
{vb:raw threadbits_sticky}
</ol>
Just place the code below it.

If you have other ideas how to use and don't mind to share with us, make your self comfortable for it. :up:

Edit: Screen Shots Added:
1- Above Sub Forums
2- Below Sub Forums
3- After Sticky Threads

If you like it, don't forget to mark as INSTALLED !!!

Download Now

File Type: txt Google Adsense (or other) in a Block like a Thread on FORUMDISPLAY.txt (2.6 KB, 271 views)

Screenshots

File Type: jpg above-sub.jpg (37.4 KB, 0 views)
File Type: jpg below-sub.jpg (53.9 KB, 0 views)
File Type: jpg after-sticky.jpg (73.4 KB, 0 views)
File Type: jpg Sticky.jpg (93.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
ramesh_umk3

Comments
  #32  
Old 11-19-2010, 01:05 PM
Markos Markos is offline
 
Join Date: Aug 2006
Posts: 522
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can anyone help me I'm trying to get this to have 6 images in it like this one


here is the code I'm trying to do it with

Code:
<ol>
<div id="forumbits" class="forumbits">
<div class="forumhead">
<h2><span class="forumtitle">Sponsored Links</span>
</h2>
</div>
<div class="forumbit_post L2 table">
<div class="forumrow">
<center><!-- Ad Block ONE -->

    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font></td>

<!-- Ad Block TWO -->


    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font></td>

<!-- Ad Block THREE -->


    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font></td>

<!-- Ad Block FOUR -->

    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font> </td>

<!-- Ad Block FIVE -->

    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font></td>

<!-- Ad Block SIX -->

    <td width="17%" bgcolor="#76EE00" align="center" valign="top"><a rel="nofollow" href='http://www.scottishexoticreptilesforum.co.uk/payments.php' target='_blank'><img src='http://www.scottishexoticreptilesforum.co.uk/images/ads/ad1.gif' border='0' alt='' style="border-color:#000000"  /></a><br>
    <font face="verdana, arial, helvetica, sans-serif" size="1"> <a rel="nofollow" href="http://www.scottishexoticreptilesforum.co.uk/payments.php" target="_blank">SERF AD BLOCKS</a></font></td>
</center>
</div>
</div>
</ol>
it doesn't turn out right instead of going along the way it goes up and down the way
Reply With Quote
  #33  
Old 01-05-2011, 09:14 AM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I've been pretty busy for awhile. Just trying to get back.

When I decided to do this mod, I had in mind to migrate my forum from vB3 to vB4 in a couple of months tops. Point is I was so disapointed with 4.0.X versions that simply couldn't waste my time. You know, bugs everywhere....
Now with 4.1 seems to be better (not perfect for sure) makes me think about getting back into it.

Quote:
Originally Posted by medicalforums View Post
Is there anyway I can use this modification on my 3.8 VB?
Not this one, as this code is for vB4 and vB3.X code is quite different.

Quote:
Originally Posted by asus78 View Post
it would be awesome to put adsense within cms articles or blog post. Is that possible at all?
It's possible for sure, but would need some time to work on it. I don't have full package of CMS and Blogs but If I decided to move my forums to vB4 I'll probably work on something., but not for now.

Quote:
Originally Posted by onehost View Post
I tried this on my forum as an inpost ad...

It looked horrible...It looked some spammy ad, did not match nothing.

let me know when you come up with something like this:

DEMO: Look at this if you want to see how an AD really matches....

http://www.patientenfragen.net/en/vo...ome-t1810.html
Tried to see what happened but couldn't.
The point is, the idea for this code is to use exactly the same design as original vB template. If have a custom design or something, it'll probably look really off.
If you have a custom design but still want to use this concep, you'll need to search the code of your won templates.

Quote:
Originally Posted by lubbie View Post
onehost
Warnung: filemtime() [function.filemtime]: stat failed for [path]/vbet_guestcache/en/_showthread_php_t_181012.zip in [path]/includes/vbenterprisetranslator_functions_guestcache.php (Zeile 53)
Oo
Von daher.Ich finds auch ehrlich gesagt nicht ok sowas zu schreiben und dann noch auf seinen eigenen Mod zu verweisen.

Man k?nnte meinen... Du musst es ja n?tig haben.

Wenn Du schon Kritik ?ben willst dann doch konstruktiv!
edit. Abgesehen davon ist Deine Variante durchaus ansprechend.

Sry everybody, but i could not find any Words for what i wanted to "say", in english
I can tell you this is not related to this mod at all.
By the way, any mistakes you made all you have to do is revert edited templates.

Just a tip for you guys that are not familiar in editing templates.
Created a new Style and called "Test Style" but don't give access to it for users, just for you. Make any changes you want only on this style, test it, if goes OK all you have to do is copying the whole template and paste on wroking style.
This is safer and kind bullet proof.

Quote:
Originally Posted by Dr Longhorn View Post
Hi Leo Brazil,

This works fine with the forumdisplay template, and it looks great.

Can you help with editing the postbit or showthread template in order to place an adsense ad in a block, right above the first post of each thread.

I got this to work with just an adsense ad, but can't seem to get it to work with a block like in your example images.

Can you help with the correct code and position for this? Am I editing the correct templates?

Also I would like to have the ad block on the category pages as well as forums, i.e. forums that are set-up as categories.

Can you please help with this too?

Longhorn.
Have you checked this one ?
https://vborg.vbsupport.ru/showthread.php?t=236313
Reply With Quote
  #34  
Old 03-14-2011, 10:46 AM
wraggster wraggster is offline
 
Join Date: Mar 2005
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi this seems a great mod, is there a way to have this showing to guests only with the option

just like a thread (see 4th screen shot)
Reply With Quote
  #35  
Old 08-12-2011, 12:07 PM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leo Brazi
If you have other ideas how to use and don't mind to share with us, make your self comfortable for it.
Dear Leo Brazil
very thanks for your help to us and for your fantastic and High ability to convert ideas to reality
Your above sentence Encouraged me to ask you if it possible to make this ad show in different or random position between others threads in the formdispaly instead to be showed in fixed position.
thanks for your effort
Reply With Quote
  #36  
Old 08-12-2011, 01:31 PM
victorvu victorvu is offline
 
Join Date: Mar 2011
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi:

I have been looking for this simple way for ads and here it is! Thanks.

Installed, voted and nominated.

Victor:up:
Reply With Quote
  #37  
Old 09-02-2011, 02:31 PM
BrightStar's Avatar
BrightStar BrightStar is offline
 
Join Date: Nov 2008
Location: UK
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hiya

Thanks for the mod. It seems to word with my forum. Just a quick question.....what should be the ad type and size? Letter board or text links only?

Also I am trying to put a letter board of size 728x90 and it's not centred but aligned to left.

How can I fix that? Thanks
Reply With Quote
  #38  
Old 09-09-2011, 08:05 PM
BrightStar's Avatar
BrightStar BrightStar is offline
 
Join Date: Nov 2008
Location: UK
Posts: 164
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know the answer why am I getting this error when this mod is enabled?

Quote:
Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: gaip_code1 in [path]/includes/functions.php on line 4161
Reply With Quote
  #39  
Old 09-24-2011, 03:48 AM
byalik byalik is offline
 
Join Date: Oct 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried adding all the different types of code but nothing happens on my forum - legalhelp(dot)org - anyone have any suggestions
Reply With Quote
  #40  
Old 04-01-2012, 09:18 PM
ptceuro ptceuro is offline
 
Join Date: Jan 2012
Location: U.S.A
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excelent!! Thanks!
Reply With Quote
  #41  
Old 09-12-2013, 05:53 PM
dany_danay dany_danay is offline
 
Join Date: Jul 2009
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not showing in VB 4.2
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 10:37 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.11157 seconds
  • Memory Usage 2,368KB
  • Queries Executed 26 (?)
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
  • (8)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • 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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete