vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - Google Adsense Postbit Integration (https://vborg.vbsupport.ru/showthread.php?t=194817)

aapkae 08-29-2009 06:21 PM

Work Fine with 3.8.3 thanks

Bob_R 08-29-2009 06:24 PM

It would be great if it could place ads after the last post.

And maybe if chose for guests only.

mindfrost82 09-04-2009 03:59 PM

I don't want to display ads in my VIP forums, if I try adding this around the AdSense code it still seems to display in all forums:

Code:

<if condition="!in_array($GLOBALS[forumid], array(X,Y,Z))">

</if>

Any ideas if this is possible?

Thanks!

aaa007 09-05-2009 06:45 PM

how can i have ads on every 3-4 posts??

Is this possible?

duditas 09-06-2009 09:38 AM

Does it work with Vidvertiser too? Thanks

iheartvb 09-06-2009 04:53 PM

how do i align the ad to the left part of the post instead of the center?

Guvadan 09-07-2009 09:08 PM

There seems to be a bug in this as I am also finding it works in one browser but not another. Works fine in Firefox, but doesn't show in IE or chrome. I notice someone else posted the opposite a few posts back. Any ideas?

Tibia4 09-07-2009 11:43 PM

nice, thanks it's work for me

Jeweetog 01-18-2010 09:19 PM

Hi,

Nice hack!

I was wondering if you can alter it so that the google adsense bar can show up on multiple places.

For example under all posts, and under forums at forum home, and under the navbar.

For all those options a yes/no would be enough and a place to put the adsense code which is already present.

Bouncer222 01-24-2010 03:18 PM

**REQUEST**

Could you please instead of making it after Post #, make it to show up after each X posts, example would be that it would show up every 3 posts, so that it doesnt only show up one advertisement?

Bouncer222 01-24-2010 03:24 PM

And I cannot find <!-- post $post[postid] popup menu --> in postbit_legacy ... help please???

helmica 01-27-2010 02:30 PM

hi,
By me it is not working on VB4 do you plan to make it work for Vb4?
I am loving it i hope to be able to use it on Vb4
Thanks in advance for your prompt response

G-man 02-04-2010 03:26 AM

I second this. Had it working before I upgraded and would love to have it back with 4.0. I can't stand the limitations of the only 4 places for ads that are built into 4.0

xlguy 03-17-2010 03:24 PM

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') . '";');


That would, in our case, add it after the 19th post as well as the one specified in the options section. Obviously this is a bit of an ugly solution, as you have to hard code in the post number (but it works on all pages, i.e. the 19th post on each page not just the first one) but I hope it helps others.

BeefyBeefo 03-21-2010 08:31 PM

Works great! Thanks!

**Installed**

matthewhotdude 04-01-2010 06:44 PM

installed but the adds are showing up twice?

BadgerDog 05-02-2010 09:53 PM

This works great for us under v3.6 ... :up:

We really need the user group permissions capability of this kind of mod, so is there any chance it will be upgraded for v4, as there doesn't seem to be a v4 adsense mod that does this.

Thanks ... :)

Regards,
Badger

muratcan25 05-11-2010 09:35 AM

thanks installed !

basskiller 06-13-2010 06:37 AM

is there a way to run a rotation of different scripts?
Like adsense , some affiliate banner, amazon.. and have it rotate between the three different blocks of code?

M.C. 07-17-2010 01:59 PM

Can someone or developer please take attention!!!

Would be great to add option to disable it for some forums or even threads by IDs as some forums can be nonGoogle friendly and they can BAN your account for it (just got email about that)!

oldfan 08-01-2010 12:49 AM

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

TitanJeff 09-10-2010 01:17 PM

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.

fxwoody 09-11-2010 10:16 AM

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 ;)

BadgerDog 09-27-2010 10:10 AM

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

TitanJeff 10-01-2010 12:56 PM

Try this:

PHP Code:

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


BadgerDog 10-01-2010 08:24 PM

Quote:

Originally Posted by TitanJeff (Post 2105488)
Try this:

PHP Code:

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


Thanks ... :)

Regards,
Badger

shoppingtelly 10-06-2010 09:11 AM

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

BadgerDog 10-06-2010 10:15 AM

Quote:

Originally Posted by shoppingtelly (Post 2107320)
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

BadgerDog 10-06-2010 10:26 AM

Quote:

Originally Posted by oldfan (Post 2077428)
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

asabet 05-22-2011 12:42 AM

Quote:

Originally Posted by xlguy (Post 2005612)
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.

Big Kahuna 08-01-2011 10:56 PM

Man I wish there was a version of this for VB4

8thos 08-02-2011 12:30 AM

Word.

basskiller 10-25-2011 10:03 PM

is there a way to create a second one that is totally different from the first???

This way I could add different sponsors to the second one in a second location

TitanJeff 12-03-2011 03:37 PM

I also wanted to check to see if there is a way for this to pull a random image from a designated folder on my server. I assume it would be writing some code to go where the ad code is now. Any ideas?

Also, would it be possible to randomize where the photo is inserted? Right now, I can choose the number but would prefer it be something like between posts 4 and 9 so the reader never knows when it'll show.

This might be an entirely new hack but this one seems to do almost what I need.

g0rdy 12-06-2011 05:40 PM

Quote:

Originally Posted by TitanJeff (Post 2274341)
I also wanted to check to see if there is a way for this to pull a random image from a designated folder on my server. I assume it would be writing some code to go where the ad code is now. Any ideas?

Also, would it be possible to randomize where the photo is inserted? Right now, I can choose the number but would prefer it be something like between posts 4 and 9 so the reader never knows when it'll show.

This might be an entirely new hack but this one seems to do almost what I need.

Yes, should be, google for javascript image / banner rotator.

M.C. 02-16-2012 09:36 PM

is there vb4 version?! Can't find any similar :(

basskiller 05-10-2013 01:37 PM

does anyone know how to not show on certain styles. I have several different styles for specific areas. there are a few where I do not want this to show on

captain-busa 10-25-2013 09:17 PM

This was a great mod until 4.2.2 and it caused errors. Gonna miss the old girl...

ozzy47 10-25-2013 09:25 PM

Quote:

Originally Posted by captain-busa (Post 2456223)
This was a great mod until 4.2.2 and it caused errors. Gonna miss the old girl...

What were the errors?

EDIT: Nevermind, I see this is not even for vB4 at all.

Jim Oaks 01-28-2014 03:28 AM

This stopped working today. I tried to uninstall, but it won't uninstall. I re-installed, and when I went to ad my adsense code, my code from the last install was there. I even had it checked to overwrite.

Can someone please tell me how to uninstall this?


All times are GMT. The time now is 06:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01279 seconds
  • Memory Usage 1,836KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (8)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete