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
  #52  
Old 03-11-2006, 09:23 PM
HappyDJ HappyDJ is offline
 
Join Date: Mar 2006
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can not get this to work at all!

I have opened the file postbit_legacy and at the very end of the file (after <!-- / post #$post[postid] -->) - I then added the code and inserted my adsence code. Then looked, but nothing!

so,

I then tried again but moved the code above the <!-- / post #$post[postid] --> - tried again and still nothing!

Can anyone please help?
Reply With Quote
  #53  
Old 05-08-2006, 12:31 AM
bizpro bizpro is offline
 
Join Date: Feb 2006
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want this to be the last post of every thread.

what do I do?
Reply With Quote
  #54  
Old 05-08-2006, 05:01 AM
tanker300 tanker300 is offline
 
Join Date: Sep 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Nice Nice idea. It works for me when I paste in the postbit. My only question is the image area on the lower left "user_online.gif" does not show a image I want. I even changed the name to "user_onlines.gif" in the code and uploaded my preffered image and nothing. Just the red X. I changed permissions from 644 to 777 and still 0. How do we get an image to appear.
Reply With Quote
  #55  
Old 05-11-2006, 05:19 PM
Bro_Joey_Gowdy's Avatar
Bro_Joey_Gowdy Bro_Joey_Gowdy is offline
 
Join Date: May 2002
Location: Hickory Flat MS 38633
Posts: 364
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any updates ?
Reply With Quote
  #56  
Old 05-11-2006, 05:41 PM
brianmt brianmt is offline
 
Join Date: May 2006
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

is there a way to make it do this in only certain forums?
Reply With Quote
  #57  
Old 05-11-2006, 06:16 PM
Keyser520 Keyser520 is offline
 
Join Date: Feb 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THere are ways to do it in certain forums and to make it the last post etc, but I don't have those conditionals. The other adsense topics address those.

As far as the green "online" image goes, please right click on it and tell me it says the properties are? Or link me to your forum.
Reply With Quote
  #58  
Old 05-19-2006, 09:27 PM
monkeywarplane monkeywarplane is offline
 
Join Date: Sep 2005
Location: Bay Area
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, it's a nice personal touch to the site instead of just jamming the ads in. I am also getting the red-box-image-not-uploaded. My site is http://www.interbasket.net and the forums at forums.interbasket.net

Again, great hack... *clicks install

Stuart

P.S. Keyser520, have you emailed Google about whether this is a violation to their terms of service? This is a great install, but I don't want to risk my account being deleted because of it. I've actually taken out the parts that says sponsored posting and replaced it with advertisement, I think that'll help.
Reply With Quote
  #59  
Old 05-23-2006, 07:53 PM
Kwak Kwak is offline
 
Join Date: Sep 2003
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice. Installed. Thankyou.
Reply With Quote
  #60  
Old 05-25-2006, 08:06 PM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just had an awesome idea. Have not installed it yet so dont know if its already got it.

Can you give this advertisement a sig?

Then I can add links to a donation, premium, advertise my other sites, rules, faq etc. and it will be in every single thread.
Reply With Quote
  #61  
Old 05-25-2006, 08:16 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes you can. Just add whatever you want to display as his sig.
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 04:36 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.06755 seconds
  • Memory Usage 2,341KB
  • 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
  • (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