Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Template Modifications

Reply
 
Thread Tools
Adsense in last thread of search results Details »»
Adsense in last thread of search results
Version: 1.00, by AWI AWI is offline
Developer Last Online: Jun 2008 Show Printable Version Email this Page

Version: 3.5.2 Rating:
Released: 12-17-2005 Last Update: Never Installs: 23
 
No support by the author.

I saw some people asking for this so here it is...quick and painless.

In template search_results find:
Code:
<if condition="$show['ajax_js']">
	<script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js"></script>
	<script type="text/javascript">
	<!--
	vB_AJAX_Threadlist_Init('threadslist');
	//-->
	</script>
</if>

</if>

Add below
Code:
<if condition="is_member_of($bbuserinfo, 1,2)"> 
<tr>
    <td height="60" class="alt1">
        <img src="$stylevar[imgdir_statusicon]/image.gif" alt="" border="" />    </td>
        <td height="60" align="center" class="alt2">&nbsp;</td>

    <td height="60" align="center" class="alt1">
        <div>
       **YOUR ADSENSE CODE HERE**
        </div>        
    </td>
    
    <td height="60" align="center" class="alt2 smallfont">Sponsored Link</td>

        <td height="60" align="center" class="alt1"></td>
        <td height="60" align="center" class="alt2"></td>
         <if condition="$show['inlinemod']"><td height="60" align="center" class="alt1"></td>
         </if>

</tr>
</if>

Change this line to set usergroup permission
Code:
<if condition="is_member_of($bbuserinfo, 1,2)">

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 01-19-2006, 04:44 AM
Kwak Kwak is offline
 
Join Date: Sep 2003
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the mod.

Installing but I have no idea why the template page 'hands' (Loading...) when I add the content and try to save.
Reply With Quote
  #13  
Old 01-20-2006, 06:58 PM
Kwak Kwak is offline
 
Join Date: Sep 2003
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed the problem. Great template hack.
Quote:
Originally Posted by Kwak
Installing but I have no idea why the template page 'hands' (Loading...) when I add the content and try to save.
Reply With Quote
  #14  
Old 01-29-2006, 09:23 AM
lazytown lazytown is offline
 
Join Date: Feb 2004
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will this actually pull up proper adsense ads relavent to the search results? I thought adsense needed fairly static content to gather information for ads.

-vissa
Reply With Quote
  #15  
Old 02-03-2006, 01:17 AM
Black_Widow Black_Widow is offline
 
Join Date: Aug 2004
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mhm are you sure that this hack don't violate Adsense policy?
I'm fear to be banned for this.
Users could become confused and click on adsense links thinking they are regular forum results. Of course this would probably be unuseful click for the publisher.
Reply With Quote
  #16  
Old 06-03-2006, 02:54 AM
dinodonk dinodonk is offline
 
Join Date: Aug 2005
Posts: 106
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

installed...
but your hack use wrong template when showing search result as post.
could you please fix it?
Reply With Quote
  #17  
Old 09-18-2007, 04:49 PM
yoyoyoyo's Avatar
yoyoyoyo yoyoyoyo is offline
 
Join Date: Dec 2004
Location: USA
Posts: 1,612
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't see any ad in the last search result - just a blank box with no ad and the "sponsored links" text next to it.

in template search_results I looked for:

PHP Code:
<if condition="$show['ajax_js']">
    <
script type="text/javascript" src="clientscript/vbulletin_ajax_threadslist.js"></script>
    <
script type="text/javascript">
    <!--
    
vB_AJAX_Threadlist_Init('threadslist');
    
//-->
    
</script>
</if>

</if> 
This is the code I added after that code:

PHP Code:
<if condition="is_member_of($bbuserinfo, 1,2)"
<
tr>
    <
td height="60" class="alt1">
        <
img src="$stylevar[imgdir_statusicon]/image.gif" alt="" border="" />    </td>
        <
td height="60" align="center" class="alt2">&nbsp;</td>

    <
td height="60" align="center" class="alt1">
        <
div>
       <
script type="text/javascript"><!--
google_ad_client "pub-3279101748510677";
google_ad_width 468;
google_ad_height 60;
google_ad_format "468x60_as";
google_ad_type "text";
//2007-09-18: http://mysite.com/, http://mysite.com/forum/
google_ad_channel "9873387342+5679035227";
google_color_border "CCCCCC";
google_color_bg "CCCCCC";
google_color_link "000000";
google_color_text "333333";
google_color_url "666666";
google_ui_features "rc:6";
//-->
</script>
<
script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</
script>
        </
div>        
    </
td>
    
    <
td height="60" align="center" class="alt2 smallfont">Sponsored Link</td>

        <
td height="60" align="center" class="alt1"></td>
        <
td height="60" align="center" class="alt2"></td>
        <
td height="60" align="center" class="alt1"></td>
         <if 
condition="$show['inlinemod']"><td height="60" align="center" class="alt1"></td>
         </if>

</
tr>
</if> 
any idea why the ads aren't showing? I am using 3.6.8, but that shouldn't rally make a difference in this mod I don't think
Reply With Quote
  #18  
Old 10-06-2007, 03:23 PM
fishmaster fishmaster is offline
 
Join Date: Nov 2006
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you ever get this debugged, what was the root cause for it not displaying Adsense?

One of the Posters feared it violated Google Adsense rules, do you think it does, or does not?
Reply With Quote
Reply

Thread Tools

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 12:18 AM.


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.11394 seconds
  • Memory Usage 2,292KB
  • Queries Executed 22 (?)
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
  • (3)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete