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
  #12  
Old 03-09-2010, 07:26 AM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by baghdad4ever View Post
thanks khaled to confirm that

so can i install the other mod of Leo Brazil (post inside thread ) with this mod?????



see this if you want it i will pm you

http://www.baghdad4ever.net/vb/forumdisplay.php?f=175
yes you can
and good site
Reply With Quote
  #13  
Old 03-09-2010, 10:25 AM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by baghdad4ever View Post
is that against google policy or not??

please can you tell me
No, that's for sure. If the ads are clearly visible and you don't change Google's script, you'll be 100% clear with that.

Quote:
Originally Posted by baghdad4ever View Post

so can i install the other mod of Leo Brazil (post inside thread ) with this mod?????

see this if you want it i will pm you

http://www.baghdad4ever.net/vb/forumdisplay.php?f=175
You can use both of my mods without any problems, I've tested them together.
Great site by the way, good to see my mod installed and work good on RTL language.

Quote:
Originally Posted by khalled View Post
dear Leo Brazil very very thanks for your quick cooperation and help

but please there is minor different between what i want and the code you give although your code is very useful

What i want that Google Adsense appear as it is threads
like the below pictures in vb 3.8 the Google Adsense appear as threads in thredlist
can we do the same thing with vb 4

i wait for your help if it's possible
Khalled, I've got your idea and will see what I can do, OK ? Just give me some time, this week I'm terrible busy with a lot of things but I'll do it OK. :up:
Reply With Quote
  #14  
Old 03-09-2010, 11:33 PM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leo Brazil View Post


Khalled, I've got your idea and will see what I can do, OK ? Just give me some time, this week I'm terrible busy with a lot of things but I'll do it OK. :up:

Very thanks Leo Brazil , i think you forget me , take your time and thanks again for your cooperation
Reply With Quote
  #15  
Old 03-12-2010, 05:34 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if u need it to be just like threads , u need to copy ALL contents of threadbit and paste it in forumdisplay in appropriate area as mentioned above by leobrazil , and just replacing title by adsense coe and inset some random values for replies and vies and last post
Reply With Quote
  #16  
Old 03-12-2010, 06:34 PM
Leo Brazil's Avatar
Leo Brazil Leo Brazil is offline
 
Join Date: Dec 2007
Location: Brazil
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

Reply With Quote
  #17  
Old 03-12-2010, 08:29 PM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leo Brazil View Post
Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

Dear Leo Brazil
very very thanks for your help your are very marvelous man
Reply With Quote
  #18  
Old 03-12-2010, 08:41 PM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Leo Brazil View Post
Khalled,

Updated this one just for you. Now you'll have the option to have your adsense to be showed just like this:

Dear Leo Brazil
very very thanks for your help your are very marvelous man
Reply With Quote
  #19  
Old 03-12-2010, 11:14 PM
javivi0 javivi0 is offline
 
Join Date: Jun 2006
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thankssssss work fine !!!!!!!
Reply With Quote
  #20  
Old 03-15-2010, 07:38 PM
khalled khalled is offline
 
Join Date: Apr 2007
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dear Leo Brazil
i use your code after the following in search_resultlist to add the block at the end of search result

- after the following add the adsense code
Code:
<vb:if condition="$show['results']">
				<ol id="searchbits" start="1" class="searchbits">
					{vb:raw searchbits}
				</ol>
but where i can add it to appear in the beginning of search result
Reply With Quote
  #21  
Old 03-16-2010, 04:26 PM
B?rger_von_Rado B?rger_von_Rado is offline
 
Join Date: Jan 2010
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, worked and installed/modified.
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 08:25 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.06189 seconds
  • Memory Usage 2,357KB
  • 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