Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

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
  #32  
Old 07-31-2006, 12:45 PM
question? question? is offline
 
Join Date: Oct 2004
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It should already do that.
Reply With Quote
  #33  
Old 08-02-2006, 06:01 PM
ryans ryans is offline
 
Join Date: Feb 2002
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how can we have it show as the 2nd post on all pages?
Reply With Quote
  #34  
Old 08-02-2006, 07:58 PM
dacho's Avatar
dacho dacho is offline
 
Join Date: Dec 2004
Location: Tell-Aviv
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

question? you can help me please ?
it's not working for me

if you can geav me the code to do a copy
i work with postbit

after 4 post
in all the forums
Reply With Quote
  #35  
Old 08-10-2006, 02:49 AM
ldma ldma is offline
 
Join Date: Jul 2006
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this code work on 3.6? Before I go charging into things......
Reply With Quote
  #36  
Old 08-24-2006, 11:19 AM
tweakmonkey tweakmonkey is offline
 
Join Date: Jul 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod, quick to install and works flawlessly.
Reply With Quote
  #37  
Old 10-01-2006, 05:53 PM
question? question? is offline
 
Join Date: Oct 2004
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ldma
Does this code work on 3.6? Before I go charging into things......
I'll check now. I'm going to try it.
Reply With Quote
  #38  
Old 10-03-2006, 05:52 PM
gunitman247 gunitman247 is offline
 
Join Date: Aug 2005
Location: Omaha
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi awesome hack. it is showing up after the last post on every page. is there a way i can make it after the first post?
Reply With Quote
  #39  
Old 10-05-2006, 09:58 AM
newmomsforum newmomsforum is offline
 
Join Date: Mar 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gunitman247
Hi awesome hack. it is showing up after the last post on every page. is there a way i can make it after the first post?
In the instructions mate:

Quote:
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.
Reply With Quote
  #40  
Old 10-09-2006, 01:42 PM
gunitman247 gunitman247 is offline
 
Join Date: Aug 2005
Location: Omaha
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by newmomsforum
In the instructions mate:
Ya dont i feel like a blub i saw it after awhile. anywho is there any way i can make this work with YPN?
Reply With Quote
  #41  
Old 10-12-2006, 01:24 AM
gunitman247 gunitman247 is offline
 
Join Date: Aug 2005
Location: Omaha
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anywho will this work with YPN?
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 07:38 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.10705 seconds
  • Memory Usage 2,303KB
  • 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
  • (4)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
  • (4)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