Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Make your adsense look like a post! With Referals, forum exclusion and more! Details »»
Make your adsense look like a post! With Referals, forum exclusion and more!
Version: 4, by question? question? is offline
Developer Last Online: Aug 2008 Show Printable Version Email this Page

Version: 3.5.5 Rating:
Released: 07-23-2006 Last Update: 07-24-2006 Installs: 34
Template Edits
 
No support by the author.

Hey,

This will let you show your add after x posts, put a referal box as a false avatar, and show a 336x280 banner.

Please note this has been made for my skin (legacy). You will have to alter this i think.


Add this at the end of your postbit template:
Code:
<!-- START ADSENSE REVENUE -->
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32)))">

    $spacer_open

<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr valign="top">
    <td class="alt2" width="175">
            
            <div id="postmenu_$post[postid]">
                <if condition="$show['profile']">
                <a class="bigusername" href="#">Focused.ORG</a>
                <else />
                Focused.ORG
                </if>
                <br><br><script type="text/javascript"><!--
google_ad_client = "YOUR ADSENSE ID HERE!";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as_rimg";
google_cpa_choice = "CAAQ8OCIlAIaCP1TkEVpn_IYKITHrYMB";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
            </div>
                
    </td>
    <if condition="$show['moderated']">
    <td class="alt2" id="">
    <else />
    <td class="alt1" id="">
    </if>
    
        <if condition="$show['messageicon'] OR $post['title']">
            <div class="smallfont">
                <if condition="$post['title']"><strong>Sponsored links</strong></if>
            </div>
            <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
        </if>
        
        <!-- message -->
        <div id="post_message_$post[postid]">
<if condition="$show['spacer']">
</if>
    <div align="left">
<script type="text/javascript"><!--
google_ad_client = "YOUR ADSENSE ID GOES HERE!";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "D0DFE4";
google_color_bg = "E2ECEF";
google_color_link = "85868F";
google_color_text = "85868F";
google_color_url = "85868F";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

    </div>

<if condition="$show['spacer']">

</if>   

</div>
        <!-- / message -->
    
    </td>
</tr>
</table><br>
<!-- / post $post[postid] popup menu -->

<if condition="$show['spacer']">
    </div>
    $spacer_close
</if></if>
Let me explain how to use it:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32)))">

In the array() you put the forums where you don't want to show the ads.

Here (($post[postid] == $GLOBALS['qrlastpostid'])) you choose where to show it. Use $GLOBALS['qrlastpostid'] to show it at the end of all the posts, $GLOBALS['qrfirstpostid'] to show it after the first post, or you can use a number.

For the picture blocks use <img src="random.php"> to where ever random.php is. Please remember to update the settings for random.php.

I reccomend you use a table to put your ads in.

If you want to show the ads only where there is more than 1 post use:
Code:
AND ($post['postcount'] > 1)
Like this:
Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32))) AND ($post['postcount'] > 1)">
If you want it to show to guests only use:
Code:
AND (!$show[member])
So it will be like:
Code:
<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == $GLOBALS['qrlastpostid']) AND (!in_array($forum[forumid], array(2,3,32))) AND ($post['postcount'] > 1) AND (!$show[member])">

Supporters / CoAuthors

Show Your Support

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

Comments
  #42  
Old 10-19-2006, 06:29 AM
question? question? is offline
 
Join Date: Oct 2004
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gunitman247
anywho will this work with YPN?
Yeh. Replace the Adsense code with YPN.
Reply With Quote
  #43  
Old 03-27-2007, 02:49 AM
RealitYYY RealitYYY is offline
 
Join Date: Dec 2006
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weve setup the 728 90 ads with this hack so it looks like a post. Is it possible to set it up with the pictures also. Could somebody give a bit more details about setting up the pictures. Was reading this and didnt quite follow it...
Quote:
For the picture blocks use <img src="random.php"> to where ever random.php is. Please remember to update the settings for random.php.
Reply With Quote
  #44  
Old 05-14-2007, 09:40 PM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, thanks for this!
Reply With Quote
  #45  
Old 05-14-2007, 09:46 PM
flup's Avatar
flup flup is offline
 
Join Date: Jan 2002
Location: Maastricht, NL
Posts: 872
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the client ID is not working, will the adds not show up? Cause I installed this mod now, but they wont show up.

Im not sure wether it's because there still is 'YOUR ADSENSE CLIENT ID HERE!!' or because I made a mistake with installing the mod.
Reply With Quote
  #46  
Old 05-19-2007, 03:31 PM
d8tabyte's Avatar
d8tabyte d8tabyte is offline
 
Join Date: Nov 2005
Location: Michigan
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you are supposed to change it to YOUR id.
Reply With Quote
  #47  
Old 05-22-2007, 04:38 PM
Big_J Big_J is offline
 
Join Date: May 2007
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyway to use different refferal button when setting this up to show after every 3rd post. So that each would have a different refferal product?

Also is there a way to make this the sam width as the rest of the posts on the board?

Thanks
Reply With Quote
  #48  
Old 05-23-2007, 12:47 PM
DeeperImage DeeperImage is offline
 
Join Date: Nov 2001
Location: Kennesaw, GA
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great hack but it would be nice if someone created a pluggin with auto templates. I may install later. Very nice.
Reply With Quote
  #49  
Old 06-20-2007, 12:27 PM
ar2 ar2 is offline
 
Join Date: Jan 2006
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi

What code do I need to put to show adsense only for specified usergroups?
Reply With Quote
  #50  
Old 10-14-2007, 04:55 PM
carlosacgj carlosacgj is offline
 
Join Date: Apr 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ar2 View Post
Hi

What code do I need to put to show adsense only for specified usergroups?

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



1,2,3,4 ---> groups that you show your ads
Reply With Quote
  #51  
Old 06-17-2010, 10:58 AM
Silmarillion's Avatar
Silmarillion Silmarillion is offline
 
Join Date: Jul 2004
Location: Germany/Bavaria
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this hack available for 3.8.X?
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 02:32 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.04541 seconds
  • Memory Usage 2,316KB
  • 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
  • (5)bbcode_code
  • (3)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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