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

Reply
 
Thread Tools
Adsense as a poster on your forums Details »»
Adsense as a poster on your forums
Version: 1.00, by Keyser520 Keyser520 is offline
Developer Last Online: May 2009 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 02-21-2006 Last Update: Never Installs: 85
 
No support by the author.

So I've been playing around a bit with my new vb board, and figured out how to make it appear as if the "advertiser" has the second post on every page.

You can play around with the code some more to change some of the messages from the ones I have on there (i.e. posts: location:, etc)

For kicks, I have the "online" icon set to say "Google is online", so change this tag if you want it to say something else.

This was designed for "legacy". I do not know if it works for the new forum layout

You can also ad a custom ad "Avatar" as well. Just replace the "<!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->" with the code for the avatar.

Add this code to the END of your postbit_legacy template

PHP Code:
<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">


<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
<
tr>
    <
td class="thead" style="font-weight:normal" align="left">        
            <!-- 
status icon and date -->
                         
Sponsored Ads            
        
</td>
        <
td class="thead" style="font-weight:normal" align="right">
            &
nbsp;
            
#<a><strong>1.5</strong></a>
        
</td>
        
</
tr>
<
tr valign="top">
    <
td class="alt2" width="175">
            
            <
div>

                <
class="bigusername" href="">Advertisement</a>
            </
div>
            
                        <
div class="smallfont"><div class="smallfont">Sponsored posting</div></div>
            <
div class="smallfont">
                    &
nbsp;<br />
                    <!-- IF 
YOU WANT TO GIVE THE AD AN AVATARBUT IT HERE -->
            </
div>
                        
            <
div class="smallfont">
                &
nbsp;<br />
                <if 
condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
                <if 
condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
                <if 
condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
                <
div>
                    
$vbphrase[posts]: lots
                
</div>
            </
div>                                    
        
    </
td>
    <
td class="alt1">
    

            <!-- 
icon and title -->
            <
div class="smallfont">
                <if 
condition="$post['title']"><strong>Sponsored...</strong></if>
            </
div>
            <
hr size="1" style="color:$stylevar[tborder_bgcolor]/>
            <!-- / 
icon and title -->
        
        <!-- 
message -->
        <
div align="center">
                         <!--
PUT YOUR ADSENSE CODE HERE -->
                         </
div>
        <!-- / 
message -->
            
    
    </
td>
</
tr>
<
tr>
    <
td class="alt2">
        <
img class="inlineimg" src="images/statusiconrunes/user_online.gif" alt="Google is online" border="0" />
        &
nbsp;
    </
td>
    <
td class="alt1" align="right">
    
        <!-- 
controls -->
        <!-- / 
controls -->
    </
td>    
</
tr>
</
table>

</
div>
$spacer_close

</if> 

Show Your Support

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

Comments
  #12  
Old 02-23-2006, 01:15 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for saving me the work! i see this someone where was gonna make it :P very nice dude!
Reply With Quote
  #13  
Old 02-23-2006, 01:30 AM
neutek neutek is offline
 
Join Date: Mar 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks! does this have support for horizontal user info view also?
Reply With Quote
  #14  
Old 02-23-2006, 01:32 AM
influence influence is offline
 
Join Date: Jan 2002
Location: inside a bullet
Posts: 207
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wasn't this created long time ago? I have seen few sites with it before
Reply With Quote
  #15  
Old 02-23-2006, 02:09 AM
AshokForums.com AshokForums.com is offline
 
Join Date: Nov 2005
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks great mate..
Reply With Quote
  #16  
Old 02-23-2006, 02:28 AM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Keyser520
Thanks.

I replaced it with "Sponsored posting" but you could make it whatever you want.
Not true.

Quote:
Originally Posted by adsense Program Policies
Incentives

Web pages may not include incentives of any kind for users to click on ads. This includes encouraging users to click on the ads or to visit the advertisers' sites as well as drawing any undue attention to the ads. For example, your site cannot contain phrases such as "click here," "support us," "visit these links," or other similar language that could apply to any ad, regardless of content. These activities are strictly prohibited in order to avoid potential inflation of advertiser costs. In addition, publishers may not bring unnatural attention to sites displaying ads or referral buttons through unsolicited mass emails or unwanted advertisements on third-party websites. Publishers are also not permitted to use deceptive or unnatural means to draw attention to or incite clicks on referral buttons.
Reply With Quote
  #17  
Old 02-23-2006, 02:49 AM
yinyang's Avatar
yinyang yinyang is offline
 
Join Date: May 2004
Location: Los Angeles
Posts: 580
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.
Reply With Quote
  #18  
Old 02-23-2006, 04:03 AM
MissKalunji's Avatar
MissKalunji MissKalunji is offline
 
Join Date: Aug 2003
Location: Canada
Posts: 2,845
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by yinyang
nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.
lol yes they do
Reply With Quote
  #19  
Old 02-23-2006, 04:58 AM
Smiry Kin's's Avatar
Smiry Kin's Smiry Kin's is offline
 
Join Date: Dec 2005
Location: United Kingdom!
Posts: 954
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you make it show like this one?? say if you got a big thread, make it show more then once?

https://vborg.vbsupport.ru/showthread.php?t=106596
Reply With Quote
  #20  
Old 02-23-2006, 02:06 PM
Keyser520 Keyser520 is offline
 
Join Date: Feb 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm confused. What fine print does this violate?

Smirky, the same if conditionals that Moparx used will work in the one I did as well. The real difference between the two is that mine is designed to LOOk like an actual post, where his is more of an inserted banner. It's just a matter of which style you want to use.
Reply With Quote
  #21  
Old 02-23-2006, 04:27 PM
thedvs thedvs is offline
 
Join Date: May 2002
Posts: 353
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you nice hack
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 06:30 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.06638 seconds
  • Memory Usage 2,335KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_php
  • (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