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
  #42  
Old 02-28-2006, 08:17 PM
Keyser520 Keyser520 is offline
 
Join Date: Feb 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I haven't come across that error. I have quick reply enabled on my forums and it works just fine www.runeescape.net/Escape


Honestly, I'm not sure how to diagnose that one...any experienced coders around that could take a look at that?
Reply With Quote
  #43  
Old 02-28-2006, 10:33 PM
mholtum's Avatar
mholtum mholtum is offline
 
Join Date: May 2004
Location: Arizona
Posts: 697
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any news on the postbit version?
Reply With Quote
  #44  
Old 02-28-2006, 10:49 PM
mikehawk's Avatar
mikehawk mikehawk is offline
 
Join Date: May 2004
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thankyou! *installed*
Reply With Quote
  #45  
Old 03-02-2006, 03:38 PM
faisj faisj is offline
 
Join Date: Oct 2005
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I really have no idea where to place this php code?
( in witch file should I add it )?

my forum: www.twentyfourforum.com
Reply With Quote
  #46  
Old 03-02-2006, 03:48 PM
Keyser520 Keyser520 is offline
 
Join Date: Feb 2006
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As far as the postbit version goes, Id suggest using one of the other adsense codes that has been shown here, as they already look a lot like the postibit. This one was designed for legacy.

You add it into your postbit_legacy template. Go to the admint cp, styles manager, and find that template. Add the code at the END of that template.
Reply With Quote
  #47  
Old 03-04-2006, 01:51 AM
wwwdjrcs wwwdjrcs is offline
 
Join Date: Feb 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, thanks

http://forum.djrcs.com
Reply With Quote
  #48  
Old 03-04-2006, 02:29 AM
indie indie is offline
 
Join Date: Aug 2004
Posts: 127
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice! But do you know why in Firefox, the google ad "sometimes" has a white strip underneath it. Try refreshing a few times, and wait for it to appear. Using the leaderboard.
Reply With Quote
  #49  
Old 03-04-2006, 05:11 AM
wwwdjrcs wwwdjrcs is offline
 
Join Date: Feb 2006
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How come I get a red "x" where the picture says that Google is online?
Reply With Quote
  #50  
Old 03-05-2006, 07:46 PM
icare icare is offline
 
Join Date: Jan 2006
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one *clicks install*

Can anybody help, I want to make that it shows after fist page on every page. Fo rnow i think ti shows on after fist post on first page...

and ohter thing i would like is that user name on top rather than havin on side as

per my setting my username is above the post not at the sides.

Please help...
Reply With Quote
  #51  
Old 03-09-2006, 04:37 PM
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Location: UK
Posts: 862
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you it looks great!

Install
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:23 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.10072 seconds
  • Memory Usage 2,340KB
  • 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