vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Adsense in last thread of search results (https://vborg.vbsupport.ru/showthread.php?t=103236)

AWI 12-17-2005 10:00 PM

Adsense in last thread of search results
 
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)">

AWI 12-18-2005 07:53 PM

Screenshot:

http://www.dntycoon.com/images/capture.jpg

ugmphelon 12-18-2005 09:47 PM

installed

Neutral Singh 12-19-2005 04:29 AM

Thanks for this!! How if i would like to have this as the first result in the search results? Thanks in advance.

Neutral Singh 12-19-2005 04:55 AM

Edit: Nevemind did that myself. Thanks for a nice addon.

Cebby 12-19-2005 08:19 PM

If I want everyone to get the ad at the end of the search results, do I need the user group permission line at all?

AWI 12-19-2005 10:07 PM

Quote:

Originally Posted by Cebby
If I want everyone to get the ad at the end of the search results, do I need the user group permission line at all?


No just get rid of the code
Code:

<if condition="is_member_of($bbuserinfo, 1,2)">
</if>


Cebby 12-20-2005 02:53 AM

Quote:

Originally Posted by AWI
No just get rid of the code
Code:

<if condition="is_member_of($bbuserinfo, 1,2)">
</if>


Thanks!! *Installed*

murrtex 01-19-2006 12:38 AM

nice,and you should add this;(bold)

Code:

        <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>


MentaL 01-19-2006 02:35 AM

Fanstatic INSTALLED

Kwak 01-19-2006 04:44 AM

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.

Kwak 01-20-2006 06:58 PM

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.


lazytown 01-29-2006 09:23 AM

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

Black_Widow 02-03-2006 01:17 AM

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.

dinodonk 06-03-2006 02:54 AM

installed...
but your hack use wrong template when showing search result as post.
could you please fix it?

yoyoyoyo 09-18-2007 04:49 PM

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

fishmaster 10-06-2007 03:23 PM

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?


All times are GMT. The time now is 06:07 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.01177 seconds
  • Memory Usage 1,780KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (17)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete