vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Randomly positioned ad in between postbits in showthread (https://vborg.vbsupport.ru/showthread.php?t=98057)

dieselpowered 12-07-2005 03:25 PM

UK, just wanted to let you know that this works with 3.5.2, incase you wanted to change the version at the top of the thread :)

Warrior 12-15-2005 04:28 PM

This is perfect - works with the click for quick reply too! Just what I needed...

gc1 12-15-2005 04:37 PM

Yes this is very nice, I have a Advertiser that pays 100 bucks a month for that spot :)

UK Jimbo 12-15-2005 09:28 PM

Quote:

Originally Posted by gc1
Yes this is very nice, I have a Advertiser that pays 100 bucks a month for that spot :)

I'll take 10% please ;)

Zilvia 12-16-2005 03:27 AM

Is there any way to have this display after the 1st post?

Cebby 12-18-2005 07:23 PM

Works Great! Thanks!!

*Installed*

UK Jimbo 12-18-2005 10:59 PM

Quote:

Originally Posted by Zilvia
Is there any way to have this display after the 1st post?

Yes - but you don't need to install the hack to do that. Just add the following (untested) to the end of the postbit and postbit_legacy templates:

PHP Code:

<if condition="$post['postcount'] == 1">
$spacer_open 
<div style="padding:0px 0px $stylevar[cellpadding]px 0px"

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center"
<
tr
    <
td class="thead" align="left">Sponsored Links</td
</
tr
<
tr
    <
td class="alt1" align="center">

<!-- 
ad code goes here -->

    </
td
</
tr
</
table

</
div
$spacer_close 
</if> 


mikepmm 12-19-2005 12:07 AM

best adsense mod !!!

wedgey 12-27-2005 02:16 AM

This is great! Thank You!

I'm a newbie to vBulletin so it took me about 10 minutes to install. For other newbs, if it doesn't work the first time, try the other template (postbit OR postbit_legacy).

I have no idea what the difference is, but this plugin worked for me in v3.5.2 in the postbit_legacy template.

Thanks again!

http://forums.airlinepilotcentral.com

GamerJunk.net 01-01-2006 09:11 AM

Awesome thanks.

kommuni 01-01-2006 12:17 PM

Quote:

Originally Posted by RasMasta
Awesome thanks.

Quote:

I have no idea what the difference is, but this plugin worked for me in v3.5.2 in the postbit_legacy template.
there are two "styles" to display posts in vbulletin- one of both has the avatar and information about a user above his/her post (the default setting) the other "old style" is the one wich shows it on the left like here in this forums. That's the difference.

Awesome idea - i hope that will pull up my click-through rate a bit... :D

*installed*

PolyMarauder 01-05-2006 03:20 PM

Brilliant? Absolutely Brilliant?

Cheers! (installed)

Here is my thank you? enjoy ;)

http://img313.imageshack.us/img313/6...n392x727xa.jpg

lochie 01-05-2006 10:31 PM

Does this deffinetly work with 3.5.3? I've installed it and it doesn't appear at al;l no matter which of the 2 postbits I put the code in. I'm having some issues with my skin since upgrading and not sure if this is all connected.

I know it's for 3.5.2 but wasn't sure if it's just not compatible with my version or caused by my other issues.

PolyMarauder 01-06-2006 12:16 PM

I usually just do the patches and wait a week or so to see if there are any issues like this. I have to admit though with the new plugin system it will be a lot easier to do a global update. For me now its not a matter of reinstalling my hacks itÂ’s more of will they work with the next version. Anyway I too would like to know if anyone else is having an issue.

neutek 01-10-2006 02:56 PM

thanks 1st of all
this works fine for me to show to everyone - i can see ads

but doesnt work for me when i change to this - (so usergroups cannot see)

Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(1,2,3))">


my code:
Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead" align="left">Sponsored Links</td>
</tr> <tr>
        <td class="alt1" align="center">
<!-- MY AD CODE HERE -->
        </td>
</tr>
</table>
</div>
$spacer_close
</if>

i would really like some help
just want certain usergroups not to be able to see

TitanJeff 01-13-2006 02:25 PM

Just installed and lovin' it. Mine also needed to go to the postbit-legacy.

I do have one question. I have a space below my ad and my other posts don't have that. If possible, I would like to remove that space below my ad. Anyone know how?

adobepoint 01-14-2006 04:01 PM

Is there a way to post the ads on top of the first post?

PolyMarauder 01-15-2006 05:40 AM

Quote:

Originally Posted by TitanJeff
I have a space below my ad and my other posts don't have that. If possible, I would like to remove that space below my ad. Anyone know how?

I don't know for sure but I think if you remove the "$spacer_close" part at the end of the code that will get rid of the space.

TitanJeff 01-15-2006 01:19 PM

A little help for a newbie.

I got this working great and then wanted to set it up to show up only for guests, etc.

I got this error after making the change:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jfuqua/public_html/goForum/includes/adminfunctions_template.php(3532) : eval()'d code on line 223

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Here's what I added:
<!-- / post #$post[postid] -->
<if condition="is_member_of($bbuserinfo,array(2,5,6,7) )">
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

My goal is for groups 2,5,6,7 to not see the ads.

Where did I goof? Thanks.

TitanJeff 01-15-2006 03:12 PM

Quote:

Originally Posted by PolyMarauder
I don't know for sure but I think if you remove the "$spacer_close" part at the end of the code that will get rid of the space.

Thanks but that didn't take care of it for me.

TitanJeff 01-15-2006 03:21 PM

Quote:

Originally Posted by neutek
just want certain usergroups not to be able to see

Me too.

Also, I'm wondering if there is a way to randomize ads for that area if you want to rotate banners along with AdSense.

TitanJeff 01-18-2006 09:02 PM

Bump for the cause.

bloggerMel 01-20-2006 05:30 AM

thanks for the hack, works well :)

Dreamchaser 01-21-2006 08:36 PM

Quote:

Originally Posted by lochie
Does this deffinetly work with 3.5.3? I've installed it and it doesn't appear at al;l no matter which of the 2 postbits I put the code in. I'm having some issues with my skin since upgrading and not sure if this is all connected.

I know it's for 3.5.2 but wasn't sure if it's just not compatible with my version or caused by my other issues.

I am using vb 3.5.3 and this works great with no problem and did anyone find a best way to restrict some user groups in seeing the ads or anyway where every can see the ads ?

Thanks for the wonderful hack!

DC

UK Jimbo 01-25-2006 02:21 AM

Quote:

Originally Posted by TitanJeff
Here's what I added:
<!-- / post #$post[postid] -->
<if condition="is_member_of($bbuserinfo,array(2,5,6,7) )">
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

My goal is for groups 2,5,6,7 to not see the ads.

Where did I goof? Thanks.

Did you add an other </if> to close the statement?

You're logic would also only show it to users that are in groups 2,5,6,7. If you want to stop them from seeing it I suggest you use the template code listed in my first post with the following change:

instead of

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0"

use

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && ! is_member_of($bbuserinfo,array(2,5,6,7))"

This will mean the ad is not shown to groups 2,5,6 and 7.

If you wanted to do the opposite and only show it to groups 2,5,6 and 7 then you should remove the ! like:

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(2,5,6,7))"

No other changes to the template will be necessary

UK Jimbo 01-25-2006 02:23 AM

Update: I've changed the tested version info to v3.5.3 as it runs fine in this latest version.

UK Jimbo 01-25-2006 02:25 AM

Quote:

Originally Posted by adobepoint
Is there a way to post the ads on top of the first post?

Have a look back through this thread. The same question was asked a while back and I posted the solution.

You just need to do a template change, no plugin is required.

TitanJeff 01-25-2006 11:26 AM

My thanks for taking the time to further explain. The changes worked perfectly.

UK Jimbo 01-25-2006 04:30 PM

Excellent!

lochie 01-27-2006 09:31 PM

I've installed this on a clean install of vbulletin 3.5.3 using iSkin form extremepixels at www.djstalk.com and it doesn't show up at all. :(

UK Jimbo 01-28-2006 01:54 AM

Quote:

Originally Posted by lochie
I've installed this on a clean install of vbulletin 3.5.3 using iSkin form extremepixels at www.djstalk.com and it doesn't show up at all. :(

Is the plugin definitely installed?

Which templates have you added the extra template code to and in which style?

Run me though the steps you took.

lochie 01-28-2006 06:41 PM

I accessed the admin area, clicked on the plugin section and browsed for your xml file, uploaded it and made sure it was enabled. I then opened up the postbit-legacy template and edited that to include the code you supplied with my google adsense code. I added your code to the very bottom just before the very last line of code.

XtremeOffroad 01-29-2006 08:54 PM

Fantastic, Works great and much appreciated.
Clicks Install

UK Jimbo 01-30-2006 06:12 AM

Quote:

Originally Posted by lochie
I accessed the admin area, clicked on the plugin section and browsed for your xml file, uploaded it and made sure it was enabled. I then opened up the postbit-legacy template and edited that to include the code you supplied with my google adsense code. I added your code to the very bottom just before the very last line of code.

OK

You're definitely using the legacy template not the postbit one on your forum?

You're definitely looking at the forum using that style or an inherited one?

lochie 01-30-2006 11:38 AM

I definitley am using the legacy template yes, and I am definitely using the correct skin. I've even tried using the other skin (the default one) and adding the code into the standard post bit.

www.djstalk.com - if you want to take a look yourself, I'm happy to let you.

UK Jimbo 01-30-2006 11:54 AM

Are the plugins definitely enabled and the templates edit: not overridden elsewhere?

I'm happy to take a further look if you want. If you setup an account with permissions to the admincp and PM the details you can then delete/change the permissions on the account or delete it after I'm done.

fluentdesigns 02-05-2006 08:50 PM

I got everything working but for some reason my ad keeps showing Gulf Hurrican Relief ad. Is there configuring that I need to do to get my ads more targeted?

UK Jimbo 02-05-2006 08:55 PM

Quote:

Originally Posted by fluentdesigns
I got everything working but for some reason my ad keeps showing Gulf Hurrican Relief ad. Is there configuring that I need to do to get my ads more targeted?

It sounds like Google hasn't yet indexed your pages or is unable to target any suitable ad to it. When this is the case it will use a public service ad in place of a paid one.

Have a look in the AdSense FAQ and this is explained there :)

fluentdesigns 02-05-2006 08:57 PM

Ok.. I just setup my account Early early this morning. Would that have a reason why?

UK Jimbo 02-05-2006 09:02 PM

As per my last post:

Quote:

Originally Posted by UK Jimbo
Have a look in the AdSense FAQ and this is explained there :)



All times are GMT. The time now is 07:00 PM.

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.01586 seconds
  • Memory Usage 1,847KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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