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

Reply
 
Thread Tools
Google Adsense Postbit Integration Details »»
Google Adsense Postbit Integration
Version: 2.00, by Atakan KOC Atakan KOC is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.8.x Rating:
Released: 10-27-2008 Last Update: Never Installs: 355
Uses Plugins Template Edits Auto-Templates
 
No support by the author.

Google Adsense Postbit Integration

install

Go to your admin cp, then:
Plugin System -> Manage Products -> [Add/Import Product] -> Select 'product-googleadsensei.xml' from your computer then press 'Import'

Modifications Info

Plugin : 2
Phrases : 12
Template : 1
Setting : 5

Google Adsense Postbit Setting

Go to your admin cp, then:
vBulletin Options -> Google Adsense Postbit Integration ->

Versions:
v1.0 - 30 July 2007
-First release

v1.1
- 31 July 2007
- Usergroup Permissions Added

v1.2 - 31 July 2007
- Usergroup Permissions Problem Fixed

v1.3 - 20 December 2007
- "Sponsored Links" Phrase added
- small template change
- vBulletin 3.7 released

v2.0 - 12 Octaber 2008
- vBulletin 3.7 released

If does not work;

Open template "postbit or postbit_legacy"

Find
HTML Code:
<!-- post $post[postid] popup menu -->

After Add

HTML Code:
$template_hook[postbit_end]

Download Now

File Type: xml product-googleadsensei.xml (5.3 KB, 2140 views)

Screenshots

File Type: jpg resimxx8.jpg (28.6 KB, 0 views)
File Type: jpg resimxx9.jpg (62.9 KB, 0 views)

Show Your Support

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

Comments
  #62  
Old 08-01-2010, 12:49 AM
oldfan's Avatar
oldfan oldfan is offline
 
Join Date: Jul 2004
Posts: 813
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I played around with the script a bit and I got the ads to work after the last post

SHOWTHREAD template, I added the red text.
Now I have the first and last post

Quote:
<div id="posts">$postbits<div id="lastpost"></div></div>
<!-- start content table -->
$spacer_open
<!-- / start content table -->
$gaip_code1
<p>

<!-- controls below postbits -->
Now if I could figure out to have different ad colors for my other skins
Reply With Quote
  #63  
Old 09-10-2010, 01:17 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Love this hack. I started using it with 3.7 and the same version works fine with 3.8.6.

If I could add a feature, it would be to have the option to add code in multiple areas of a thread, use different code and be able to set each for different usergroups.

For example:

After the third post, a leaderboard is placed which is set to be viewed by all.

After the sixth post, a 300x250 is added to be seen by only guests.

I think I can add conditions for it to be seen by only certain groups but can't figure out how to add multiple code options.
Reply With Quote
  #64  
Old 09-11-2010, 10:16 AM
fxwoody's Avatar
fxwoody fxwoody is offline
 
Join Date: Jun 2010
Location: On Earth
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack tks! Lots of good ideas here for this, should be interesting to see what will be the results of all these?

Anyway, installed
Reply With Quote
  #65  
Old 09-27-2010, 10:10 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to get an answer in the programming area, but nobody there seems to know how to do this, or doesn't want to help out ....

I have this mod installed and it works great, so I thought either the programmer here or someone else could help me with a simple question ...

I'm not a programmer, but know enough to be dangerous and can insert code within templates etc.

I'd like to have my adsense ads only appear for specific usergroups (1,2,3,4,6,13,16)...

So, in simple terms, what is the code to wrap around my adsense script to have the ads displayed for just those usergroups and centered.

ie:

===================
if ....

<script>

xxx
xxxx
xx

<script>

endif
==================

Thanks for any help ...

Regards,
Badger
Reply With Quote
  #66  
Old 10-01-2010, 12:56 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

PHP Code:
<if condition="is_member_of($vbulletin->userinfo,1,2,3,5)">
Your ad code here.
</if> 
Reply With Quote
  #67  
Old 10-01-2010, 08:24 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TitanJeff View Post
Try this:

PHP Code:
<if condition="is_member_of($vbulletin->userinfo,1,2,3,5)">
Your ad code here.
</if> 
Thanks ...

Regards,
Badger
Reply With Quote
  #68  
Old 10-06-2010, 09:11 AM
shoppingtelly shoppingtelly is offline
 
Join Date: Apr 2002
Location: Blackpool
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to use this twice? So I can see the mod twice in control panel and add ads under two different number posts?

Many thanks
Reply With Quote
  #69  
Old 10-06-2010, 10:15 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by shoppingtelly View Post
Is there a way to use this twice? So I can see the mod twice in control panel and add ads under two different number posts?

Many thanks
I'd like to add this as well, just after first post and before last post ....

Regards,
Badger
Reply With Quote
  #70  
Old 10-06-2010, 10:26 AM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by oldfan View Post
I played around with the script a bit and I got the ads to work after the last post

SHOWTHREAD template, I added the red text.
Now I have the first and last post
Hi ...

I can't seem to find the code you posted anywhere in showthread template, so I can add the part you indicated in red and get adsense in the two places?

Thanks for any help ....

Regards,
Badger
Reply With Quote
  #71  
Old 05-22-2011, 12:42 AM
asabet asabet is offline
 
Join Date: Dec 2008
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xlguy View Post
If you want the ad to appear twice in a thread then you just need to edit the plugin code, Google Adsense Postbit Integration > postbit_display_complete find this bit of code

PHP Code:
if ($post[postcount] % $vbulletin->options[maxposts] == $google_sira and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval(
'$template_hook[postbit_end] .= "' fetch_template('gaip_code1') . '";');

and add below this code (editing 19 to your choice)...

PHP Code:
if ($post[postcount] % $vbulletin->options[maxposts] == 19 and !$GLOBALS['vbulletin']->GPC['ajax'])
{
eval(
'$template_hook[postbit_end] .= "' fetch_template('gaip_code1') . '";');

Thanks for the tip! I changed

PHP Code:
if ($post[postcount] % $vbulletin->options[maxposts] == $google_sira and !$GLOBALS['vbulletin']->GPC['ajax']) 
to

PHP Code:
if ($post[postcount] % == and !$GLOBALS['vbulletin']->GPC['ajax']) 
and now have the ad after every 3rd post the way I wanted it.
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:29 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.05161 seconds
  • Memory Usage 2,363KB
  • 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
  • (2)bbcode_html
  • (6)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)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
  • (3)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete