View Full Version : Randomly positioned ad in between postbits in showthread
UK Jimbo
10 Oct 2005, 20:07
Inspired by this hack (http://www.vbulletin.org/forum/showthread.php?t=96249).
The ad is positioned randomly after one of the postbits. We use this for positioning adsense ads on visordown.com (http://www.visordown.com/forums/).
Install the attached plugin then add the following code to your postbit or postbit_legacy template:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Changelog
v1.01
Bug fix: The ad code shouldn't appear on PMs any more (template change)
Donations
Hopefully this plugin will earn you provide you with some good revenue. If you'd like to show your appreciation please donate as little or as much as you like.
https://www.paypal.com/en_US/i/btn/x-click-but04.gif (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=james%2epaypal%40jump%2daround%2ecom&item_name=vBulletin%2eorg%3a%20Random%20Google%20AdSense%20ads&no_shipping=0&no_note=1&tax=0¤cy_code=GBP&bn=PP%2dDonationsBF&charset=UTF%2d8)
Wachtmeister
10 Oct 2005, 21:44
I'll give this one a try, because the "Adsense after first post" did not work with Firefox at "Quick Reply". Thanks for releasing this one.
edit: works perfect.
dieselpowered
10 Oct 2005, 22:20
I had the same problem with the adsense code affecting the functionality of AJAX. Quick reply would work ONLY if you did not have to click to activate it. One thing you may want to test is to attempt to click quick reply in a post AFTER the display of the adsense and see if it works.
The code I have now will allow you to click quick reply in a post above the adsense, however, not in a post below it.
If this works I will be using it :)
DeeperImage
11 Oct 2005, 03:53
I've installed the plugging and the code and this is not working, What am I doing wrong? Thanks.
It just doesn't show up.
auz1111
11 Oct 2005, 04:28
nice one! just wish we could add/edit the ads without going into the template.
hbalagh1
11 Oct 2005, 05:35
can you select certain usergroups not to see this?
Keyser Söze
11 Oct 2005, 06:57
yea i got the same question, id prefer only guests see the ads, not logged in members, i get more guests than anything
GrendelKhan{TSU
11 Oct 2005, 07:01
mandatory "is there a screen shot?" request. ;) :p
Doc Great
11 Oct 2005, 10:38
To make only guest see the ads take this code and add it at the end of the postbit (_legacy) template.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
@UK Jimbo, do you allow me to translate/modify and post this modification @ www.vbhacks-germany.com (of course with your copyright)? :)
UK Jimbo
11 Oct 2005, 11:36
Thanks for posting the usergroup variation Doc Great. I've got no issues with you re-posting the code elsewhere as long as it's not being sold!
UK Jimbo
11 Oct 2005, 11:41
mandatory "is there a screen shot?" request. ;) :p
done
Doc Great
11 Oct 2005, 12:17
Thanks for posting the usergroup variation Doc Great. I've got no issues with you re-posting the code elsewhere as long as it's not being sold!
Thats for sure :) i hate making profit with "simple" php code :D Thanks for sharing.
dsotmoon
11 Oct 2005, 18:48
how do you add additional usergroups? to
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
like this?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
ect etc?
dieselpowered
11 Oct 2005, 18:49
This does appear to work with click for quick reply.
**clicks install**
UK Jimbo
11 Oct 2005, 19:07
To limit it just to certain user groups I'd recommend the following conditional rather than the in_array() solution posted above. This version ensures that secondary group assignments are checked too.
For a single user group (1 in this case)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
For multiple user groups (1, 2 & 3 in this case)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Andreas
11 Oct 2005, 19:30
What about:
Show Adsense in (or under, above) first unread Post of a Thread.
I think this is the place that would get the most user attention?
UK Jimbo
11 Oct 2005, 19:55
That's a nice idea and one I'll look into. I think it will be possible to use the $threadview variable but it'll require slightly more CPU and will have to deal with cases where the latest the newest post isn't displayed on the page.
dieselpowered
11 Oct 2005, 20:36
How can I get this to not show in the PM's???
For some reason it is screwing up the page formatting when viewing private messages.
hbalagh1
11 Oct 2005, 20:39
How can I get this to not show in the PM's???
For some reason it is screwing up the page formatting when viewing private messages.
same here, didn't even bother to check that till you said that...
dieselpowered
11 Oct 2005, 20:53
same here, didn't even bother to check that till you said that...
Ya I was surprised to see it there as well :surprised:
DeeperImage
11 Oct 2005, 21:23
How can I get this to not show in the PM's???
For some reason it is screwing up the page formatting when viewing private messages.
I've installed and no-one seems to care about my question, but nonetheless this hack only works in the PM's section with my site and nowhere else, and like you said it is messing up with the recipients name, it's adding an extra space and a ; to it.
UK Jimbo
11 Oct 2005, 21:24
How can I get this to not show in the PM's???
For some reason it is screwing up the page formatting when viewing private messages.
Sorry this is one I didn't see as only guests on visordown.com have the ads turned on.
This problem can be fixed with a simple template change. I've adjusted the code listed above to include the additional condition: $GLOBALS['adsense_position'] > 0
UK Jimbo
11 Oct 2005, 21:25
I've installed and no-one seems to care about my question
Awwwwww :(
Copy/paste the code you've put in your template and I'll try to help.
dieselpowered
11 Oct 2005, 21:28
I've installed and no-one seems to care about my question, but nonetheless this hack only works in the PM's section with my site and nowhere else, and like you said it is messing up with the recipients name, it's adding an extra space and a ; to it.
Just a shot in the dark, however, do you have the correct postbit template changed? Appears you are using the postbit_legacy so did you change that template?? The code goes at the very end.
DeeperImage
11 Oct 2005, 21:32
Just a shot in the dark, however, do you have the correct postbit template changed? Appears you are using the postbit_legacy so did you change that template?? The code goes at the very end.
I tried it both in Postbit and Postbit_legacy and it was all the same. It does not show up. I am using a test account I created and my normal admin account and the only place I see it is in PM's
dieselpowered
11 Oct 2005, 21:32
Sorry this is one I didn't see as only guests on visordown.com have the ads turned on.
This problem can be fixed with a simple template change. I've adjusted the code listed above to include the additional condition: $GLOBALS['adsense_position'] > 0
Hey man, sorry but that errors out...won't even let me save the template with the new code?
DeeperImage
11 Oct 2005, 21:33
Awwwwww :(
Copy/paste the code you've put in your template and I'll try to help.
I've placed it at the end right after
<!-- / post $post[postid] popup menu -->
<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
UK Jimbo
11 Oct 2005, 21:41
Hey man, sorry but that errors out...won't even let me save the template with the new code?
Are you using the full conditional as per the template mod at the top of the page?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
dieselpowered
11 Oct 2005, 21:41
I've placed it at the end right after
<!-- / post $post[postid] popup menu -->
<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I wonder if that threaded view above your forums is messing it up? Looking at the code nothing really stood out as wrong??
You already installed the plugin right? Is it active?
dieselpowered
11 Oct 2005, 21:44
Are you using the full conditional as per the template mod at the top of the page?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Hmmm ya I was...I reverted and replaced the code. All is good now :)
Appreciate it sir!
dieselpowered
11 Oct 2005, 21:46
Are you using the full conditional as per the template mod at the top of the page?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Sorry, quick question....can this code be placed above it so that specific usergroups do not see the ads?
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
UK Jimbo
11 Oct 2005, 21:47
I wonder if that threaded view above your forums is messing it up?
The ad will only ever appear in the "linear" display mode. In "hybrid" or "threaded" mode it's disabled.
UK Jimbo
11 Oct 2005, 21:50
Sorry, quick question....can this code be placed above it so that specific usergroups do not see the ads?
I'd recommend using is_member_of() in place of in_array()
You can either use:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
or put it in a separate outer conditional like:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
dieselpowered
11 Oct 2005, 21:57
I'd recommend using is_member_of() in place of in_array()
Sorry that is the conditional I meant to copy and paste :)
Thanks for the help!
DeeperImage
11 Oct 2005, 22:03
I wonder if that threaded view above your forums is messing it up? Looking at the code nothing really stood out as wrong??
You already installed the plugin right? Is it active?
I use linear as my default and it does not work. I think the threaded view is for the non registered only. I'll change it to be safe all around.
The plugging I installed and it is active. When I upload the pluging what do I select from the drop down? I put it under Ajax_start is that the correct mode?
dieselpowered
11 Oct 2005, 22:09
I use linear as my default and it does not work. I think the threaded view is for the non registered only. I'll change it to be safe all around.
The plugging I installed and it is active. When I upload the pluging what do I select from the drop down? I put it under Ajax_start is that the correct mode?
I guess I do not understand what you mean by mode. When you import a plugin all you do is browse to the .xml and select import...that is all.
**Edit**
I see what you are talking about...do not go to 'add new plugin' look at the bottom where it shows upload/download plugin and then import the .xml file.
DeeperImage
11 Oct 2005, 22:15
I guess I do not understand what you mean by mode. When you import a plugin all you do is browse to the .xml and select import...that is all.
**Edit**
I see what you are talking about...do not go to 'add new plugin' look at the bottom where it shows upload/download plugin and then import the .xml file.
Ahh I see . Let me try. This was my first pluging install. :ermm: I'll report back in a few.
dieselpowered
11 Oct 2005, 22:20
Ahh I see . Let me try. This was my first pluging install. :ermm: I'll report back in a few.
Roger that...standing by :)
dieselpowered
11 Oct 2005, 22:21
Ahh I see . Let me try. This was my first pluging install. :ermm: I'll report back in a few.
Hey it works!!!
DeeperImage
11 Oct 2005, 22:21
Roger that...standing by :)
That was exactly the problem..Thank you much. I manually added the pluging instead of importing into it with the automated system.. :nervous: :nervous: :nervous: :ermm: But all is well now. I hope the results are even better...Money wise.. :devious:
DeeperImage
11 Oct 2005, 22:22
Hey it works!!!
:banana: :banana:
dieselpowered
11 Oct 2005, 22:22
That was exactly the program..Thank you much. I manually added the pliging instead of importing into it with the automated system.. :nervous: :nervous: :nervous: :ermm: But all is well now. I hope the results are even better...Money wise.. :devious:
Did you use the updated code to fix it so that it does not show im the PM's?
DeeperImage
11 Oct 2005, 22:23
Did you use the updated code to fix it so that it does not show im the PM's?
No I will have to change it. I didn't realize they had updated the code.. this thread is moving to fast for me.. :devious:
dieselpowered
11 Oct 2005, 22:35
No I will have to change it. I didn't realize they had updated the code.. this thread is moving to fast for me.. :devious:
LOL NP, after you do that you should be all set...now if you want ads to only be viewed by guest or by certain usergroups, you will need to add a conditional:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
where 1,2,3 are the numbers of the usergroups you do not want to see the code.
Gottcha
12 Oct 2005, 00:22
ok...this is all new to me but i added the code and i see the bar that says sponsored ads but i dont see any ads???
www.fragtraders.com/forums
DeeperImage
12 Oct 2005, 00:31
ok...this is all new to me but i added the code and i see the bar that says sponsored ads but i dont see any ads???
www.fragtraders.com/forums
This may be a stupid question but did you replace the <!-- ad code goes here --> with your google adsense or Yahoo code?
Gottcha
12 Oct 2005, 00:34
good question and i did replace the code with my adsense code.
i also checked another forum from a member on here and didnt see the ads there either
this is the other site....again i see the bar but no ads under it
http://www.atvpros.net/forums/showthread.php?t=8
DeeperImage
12 Oct 2005, 00:37
good question and i did replace the code with my adsense code.
i also checked another forum from a member on here and didnt see the ads there either
Some things that I did wrong you want or may have already done.
- Make sure the forums threaded and Display options under VBULLETIN OPTIONS is turned off.
- Make sure you uploaded the pluging through the browse option and not manually.
- Place the code in Postbit at the bottom, or try the Postbit_legacy
- Try logging in with a test account set to normal user. Maybe because you are an admin or mod you can't see the ads.
- Double check your adsense code since the pluging seems to be working.
Whats a link to your site I'll look around see if I have any luck.
DeeperImage
12 Oct 2005, 00:38
good question and i did replace the code with my adsense code.
i also checked another forum from a member on here and didnt see the ads there either
this is the other site....again i see the bar but no ads under it
http://www.atvpros.net/forums/showthread.php?t=8
I am seeing the banners and bar so maybe you have some kind of AD blocker or remover.
EDIT: I just went to your site and I can see the ads just fine.
http://www.fragtraders.com/forums/showthread.php?p=3097#post3097
Gottcha
12 Oct 2005, 00:40
http://www.fragtraders.com/forums/showthread.php?t=44
this is my site
DeeperImage
12 Oct 2005, 00:44
http://www.fragtraders.com/forums/showthread.php?t=44
this is my site
I can see the ads. See my previous post..
Gottcha
12 Oct 2005, 00:56
just checked a friends computer and all is well...great hack.... now to find out why i cant see the ads
UK Jimbo
12 Oct 2005, 01:22
I don't think that it's the same problem but worth me mentioning it here.
When I tested this yesterday on visordown.com (http://www.visordown.com/forums/) I noticed on some pages that the adsense ad won't appear when there's already a Google ad on the page and they don't have sufficient information about the page that the ad's on. The issue is covered in the Google Adsense FAQ here (https://www.google.com/support/adsense/bin/answer.py?answer=10522&topic=159)
The multiple ad units system detects the number of ad units that are on your page, and automatically serves unique ads to each ad unit. The system is optimised for pages that have highly targeted ads available - as a result, you may sometimes see that only the first ad unit contains ads. As our ad inventory changes, or if your page content changes, you may start seeing more ads on your page.
When only one ad unit is displaying ads, any additional ad units will display as transparent boxes, or will display the alternate ad or colour that is defined in their ad code. Please note that each instance of ad code must have the alternate URL or colour specified in order to display alternate content.
I'd recommend that you put alternate ads or ad/collapsing in place in case no ad or PSAs get served.
On a totally different note the CTR has significantly increased since we moved from the old system of fixed position after the third ad to using this hack on.
Doc Great
12 Oct 2005, 08:19
I think you have a "&" too much in you first line :)
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
UK Jimbo
12 Oct 2005, 08:58
I think you have a "&" too much in you first line :)
I've got just the right amount of "&"s in my first line :)
&& is the same as writing AND and is a logical AND
& is a bitwise operator
http://uk.php.net/manual/en/language.operators.logical.php
http://uk.php.net/manual/en/language.operators.bitwise.php
Doc Great
12 Oct 2005, 09:49
Thats very strage, i get a parse error when i use your version, but with one it works perfectly....
UK Jimbo
12 Oct 2005, 09:59
Copy/paste your template code please.
Doc Great
12 Oct 2005, 10:19
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
UK Jimbo
12 Oct 2005, 10:42
Hi DG,
It might be a plan to remove the vBulletin code from that post above.
Copy/pasted that template from above and it works fine for me with the &&.
I don't why there should/would be an error, it's low level fundamental PHP.
You might be better off replacing the && with AND on your system.
James, puzzled
Doc Great
12 Oct 2005, 10:51
Hi Jimbo,
ok now i'm gettn crazy :D i tested AND --> works perfectly - then thought bout testing && again --> also works :confused: why ....
I'm shure i tested it before several times with getting parse errors.
UK Jimbo
12 Oct 2005, 11:04
Magic. PEBKAC (http://www.google.co.uk/search?hl=en&q=PEBKAC&btnG=Google+Search&meta=).
dsotmoon
12 Oct 2005, 19:23
install, thanks for this Jimbo, works perfectly
dsotmoon
13 Oct 2005, 03:05
one last question, i think, what would I add to the following to keep this from showing in certain forums...
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Doc Great
13 Oct 2005, 10:12
I did (it again :D) --> a little modification to show all guests Ad, but let the reg. users choose if they want to get ad-posts or not.
Install: new profile field (single choice) On/Off (parameters) - note the field numer (e.g. 6)
Ad the following code at the end of your postbit (_legacy)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Finished - have fun :)
lebstars.com
16 Oct 2005, 17:04
Could some1 tell me where to put the HTML code,
i installed the xml file through plug-in manager, but What Now?
UK Jimbo
16 Oct 2005, 18:43
Could some1 tell me where to put the HTML code,
i installed the xml file through plug-in manager, but What Now?
At the end of your postbit or postbit_legacy templates.
The vBulletin manual (http://www.vbulletin.com/docs/html/) explains how to edit styles/templates. :)
Xplorer4x4
21 Oct 2005, 07:20
What about:
Show Adsense in (or under, above) first unread Post of a Thread.
I think this is the place that would get the most user attention?
If this helps you guys i tried using the following IF condition to do this but vB said it was not alowed.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
It says:
With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression.
somedevil
21 Oct 2005, 21:13
OK, I added Doc's code....doesn't seem to be working. All members are seeing the ads with the default for members set to off.
Doc, where you have ad start and ad between twice in the code, am I right in thinking the adsense code should be inserted in both areas?
lsgworldl
04 Nov 2005, 11:37
<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"> <!--e-bannerx.com code begin-->
<SCRIPT language=JavaScript type=text/javascript>
<!--
var rnd = Math.round(Math.random() * 10000000);
document.writeln('<SCR'+'IPT language=JavaScript type=text/javascript src="http://www.e-bannerx.com:8888/adrevolver/banner?js&place=13471&cpy='+rnd+'">');
document.writeln('</SC'+'RIPT>');
//-->
</SCRIPT><NOSCRIPT>
<IFRAME src="http://www.e-bannerx.com:8888/adrevolver/banner?place=13471&cpy=1" width=468 height=60 scrolling=no allowtransparency=true frameborder=0 marginheight=0 marginwidth=0>
<A href="http://www.e-bannerx.com:8888/adrevolver/href?place=13471&rnd=1000" target="_blank">
<IMG src="http://www.e-bannerx.com:8888/adrevolver/banner?img&place=13471&rnd=1000" width=468 height=60 border=0 alt="e-bannerx.com" ismap></A></IFRAME></NOSCRIPT>
<!--e-bannerx.com code end--> </td> </tr> </table> </div> $spacer_close </if>
($hook = vBulletinHook::fetch_hook('postbit_imicons')) ? eval($hook) : false;
where in postbit do I add this, I have tried the end it dont work
UK Jimbo
04 Nov 2005, 11:46
where in postbit do I add this, I have tried the end it dont work
Are you using legacy postbits? If so add it to postbit_legacy.
I've no idea what you're doing with the code $hook = vBulletinHook::fetch_hook('postbit_imicons')) that shouldn't be in a template anywhere and isn't part of this hack.
lsgworldl
04 Nov 2005, 11:52
add it where, I dont know where to add it, and I copied and pasted from this thread
lsgworldl
04 Nov 2005, 11:52
<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">
<!-- ad code goes here -->
</td>
</tr>
</table>
</div>
$spacer_close
</if>
UK Jimbo
04 Nov 2005, 13:07
Install the plugin then at the end of the postbit or postbit_legacy template copy in the code as per the instructions at the top of this thread.
Info on how to edit templates and how to upload plugins is described in detail on the vBulletin site. http://www.vbulletin.com/
Brilliant! This is exactly the kind of ad placement that I was hoping to find. Tower and header/footer ads get ignored, and intrusive pop-over ads are just wrong. This is perfect!
Many Thanks!
lsgworldl
05 Nov 2005, 15:43
where in the end why isnt there a find this and add below it like most plugins?
Install the plugin then at the end of the postbit or postbit_legacy template copy in the code as per the instructions at the top of this thread.
Info on how to edit templates and how to upload plugins is described in detail on the vBulletin site. http://www.vbulletin.com/
ConqSoft
05 Nov 2005, 16:41
where in the end why isnt there a find this and add below it like most plugins?
At the very end. After everything else. Very simple.
lsgworldl
06 Nov 2005, 08:12
At the very end. After everything else. Very simple.
I did that and it didnt work, thats how simple it is
its only simple if you know what you are doing like anything is simple to ppl who know what they are doing, like I said why not have a find and put below that would make it simple
UK Jimbo
06 Nov 2005, 22:44
I did that and it didnt work, thats how simple it is
its only simple if you know what you are doing like anything is simple to ppl who know what they are doing, like I said why not have a find and put below that would make it simple
The instructions I gave are dead simple. I suggest that you:
Read the instructions
Read them again
Read the instructions a third time
Install it
If you still don't get anywhere then I don't think this hack is for you. Maybe get someone else to help you out.
:)
The Chief
08 Nov 2005, 07:07
great addition, I hope this helps me out :D
This hack is brilliant, installed in 30 seconds. nice work!
dieselpowered
07 Dec 2005, 17:25
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
15 Dec 2005, 18:28
This is perfect - works with the click for quick reply too! Just what I needed...
Yes this is very nice, I have a Advertiser that pays 100 bucks a month for that spot :)
UK Jimbo
15 Dec 2005, 23:28
Yes this is very nice, I have a Advertiser that pays 100 bucks a month for that spot :)
I'll take 10% please ;)
Is there any way to have this display after the 1st post?
Works Great! Thanks!!
*Installed*
UK Jimbo
19 Dec 2005, 00:59
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:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
mikepmm
19 Dec 2005, 02:07
best adsense mod !!!
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 Jan 2006, 11:11
Awesome thanks.
kommuni
01 Jan 2006, 14:17
Awesome thanks.
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
05 Jan 2006, 17:20
Brilliant… Absolutely Brilliant…
Cheers! (installed)
Here is my thank you… enjoy ;)
http://img313.imageshack.us/img313/6827/visordown392x727xa.jpg
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
06 Jan 2006, 14:16
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.
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
my code:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
i would really like some help
just want certain usergroups not to be able to see
TitanJeff
13 Jan 2006, 16:25
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
14 Jan 2006, 18:01
Is there a way to post the ads on top of the first post?
PolyMarauder
15 Jan 2006, 07:40
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
15 Jan 2006, 15:19
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
15 Jan 2006, 17:12
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
15 Jan 2006, 17:21
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
18 Jan 2006, 23:02
Bump for the cause.
bloggerMel
20 Jan 2006, 07:30
thanks for the hack, works well :)
Dreamchaser
21 Jan 2006, 22:36
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
25 Jan 2006, 04:21
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
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
use
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
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:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
No other changes to the template will be necessary
UK Jimbo
25 Jan 2006, 04:23
Update: I've changed the tested version info to v3.5.3 as it runs fine in this latest version.
UK Jimbo
25 Jan 2006, 04:25
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
25 Jan 2006, 13:26
My thanks for taking the time to further explain. The changes worked perfectly.
UK Jimbo
25 Jan 2006, 18:30
Excellent!
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
28 Jan 2006, 03:54
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.
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
29 Jan 2006, 22:54
Fantastic, Works great and much appreciated.
Clicks Install
UK Jimbo
30 Jan 2006, 08:12
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?
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
30 Jan 2006, 13:54
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
05 Feb 2006, 22:50
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
05 Feb 2006, 22:55
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
05 Feb 2006, 22:57
Ok.. I just setup my account Early early this morning. Would that have a reason why?
UK Jimbo
05 Feb 2006, 23:02
As per my last post:
Have a look in the AdSense FAQ and this is explained there :)
fluentdesigns
05 Feb 2006, 23:05
heheh im lookin im lookin... :)
hotrod1
21 Feb 2006, 16:07
Great hack, thanks a bunch!
hbalagh1
06 Mar 2006, 21:55
how can we not have this display on certain forums ;)
thanks
UK Jimbo
06 Mar 2006, 22:08
how can we not have this display on certain forums ;)
thanks
You should be able to test against $thread['forumid'] with something like:
don't display in forum id 22
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
don't display in forums id 21,22 or 23
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I haven't tested these - let me know how you get on.
hbalagh1
06 Mar 2006, 22:49
seems to work great :)
***INSTALL****
Works great and thank you for sharing. Much appreciated!
Gottcha
07 Mar 2006, 21:50
edited the templated....installed the xml and i see the sponsored link on the forums but i dont see the ads .... any ideas?
UK Jimbo
07 Mar 2006, 22:12
edited the templated....installed the xml and i see the sponsored link on the forums but i dont see the ads .... any ideas?
Did you put the Google AdSense code where the comment says: <!-- ad code goes here -->
?
Gottcha
07 Mar 2006, 23:36
yes i did .... replaced the whole line with the adsense code.
UK Jimbo
08 Mar 2006, 00:05
yes i did .... replaced the whole line with the adsense code.
can you PM me the contents of the template please?
tribedude
08 Mar 2006, 20:17
This was working great for us initially (so I thought) but I am now getting many users who are complaining of blank pages and threads that lead to http:///
It seems all of these users are on IE. I haven't been able to replicate this behaviour on IE or Firefox.
Here is my postbit legacy:
<!-- post #$post[postid] -->
<if condition="$show['spacer']">
$spacer_open
<div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px">
<if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if>
</if>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
<if condition="$show['announcement']">
<td class="thead" style="font-weight:normal" colspan="2">
<img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />
<phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
</td>
<else />
<td class="thead" style="font-weight:normal" $post[scrolltothis]>
<!-- status icon and date -->
<a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a>
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
$post[firstnewinsert]
<!-- / status icon and date -->
</td>
<td class="thead" style="font-weight:normal" align="$stylevar[right]">
<if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a></if>
<if condition="$show['inlinemod']">
<input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" />
</if>
</td>
</if>
</tr>
<tr valign="top">
<td class="alt2" width="175">
<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>
<script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script>
<else />
$post[musername]
</if>
</div>
<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
<if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
<if condition="$show['avatar']">
<div class="smallfont">
<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>
<div class="smallfont">
<br />
<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower]</if>$post[reputationdisplay]</div></if>
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
</td>
<if condition="$show['moderated']">
<td class="alt2" id="td_post_$post[postid]">
<else />
<td class="alt1" id="td_post_$post[postid]">
</if>
<if condition="$show['messageicon'] OR $post['title']">
<!-- icon and title -->
<div class="smallfont">
<if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
<if condition="$post['title']"><strong>$post[title]</strong></if>
</div>
<hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<!-- / icon and title -->
</if>
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->
<if condition="$show['attachments']">
<!-- attachments -->
<div style="padding:$stylevar[cellpadding]px">
<if condition="$show['thumbnailattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_thumbnails]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[thumbnailattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<div style="padding:$stylevar[formspacer]px">
$post[imageattachments]
</div>
</fieldset>
</if>
<if condition="$show['imageattachmentlink']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_images]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[imageattachmentlinks]
</table>
</fieldset>
</if>
<if condition="$show['otherattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attached_files]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[otherattachments]
</table>
</fieldset>
</if>
<if condition="$show['moderatedattachment']">
<fieldset class="fieldset">
<legend>$vbphrase[attachments_pending_approval]</legend>
<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
$post[moderatedattachments]
</table>
</fieldset>
</if>
</div>
<!-- / attachments -->
</if>
<if condition="$post['signature']">
<!-- sig -->
<div>
__________________<br />
$post[signature]
</div>
<!-- / sig -->
</if>
<if condition="$show['postedited']">
<!-- edit note -->
<div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
<em>
<phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
</em>
</div>
<!-- / edit note -->
</if>
</td>
</tr>
<tr>
<td class="alt2">
$post[onlinestatus]
<if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
<if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a></if>
$post[iplogged]
</td>
<if condition="$show['moderated']">
<td class="alt2" align="$stylevar[right]">
<else />
<td class="alt1" align="$stylevar[right]">
</if>
<!-- controls -->
<if condition="$post['editlink']">
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</if>
<if condition="$post['forwardlink']">
<a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a>
</if>
<if condition="$post['replylink']">
<a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>
<if condition="$show['quickreply'] AND !$show['threadedmode']">
<a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a>
</if>
<if condition="$show['moderated']">
<img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" />
</if>
<!-- / controls -->
</td>
</tr>
</table>
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
<table cellpadding="4" cellspacing="1" border="0">
<tr>
<td class="thead">$post[username]</td>
</tr>
<if condition="$show['profile']">
<tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
</if>
<if condition="$show['pmlink']">
<tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['emaillink']">
<tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
</if>
<if condition="$show['homepage']">
<tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
</if>
<if condition="$show['search']">
<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
</if>
<if condition="$post['userid'] AND $show['member']">
<tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
</if>
</table>
</div>
<!-- / post $post[postid] popup menu -->
<if condition="$show['spacer']">
</div>
$spacer_close
</if>
<!-- / post #$post[postid] -->
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && $thread['forumid'] != 13">
$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"><a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a></td>
</tr>
<tr>
<td class="alt1" align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxx";
google_alternate_ad_url = "http://";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="5418150519";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "22229C";
google_color_url = "000000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
</div>
$spacer_close
</if>
This was working great for us initially (so I thought) but I am now getting many users who are complaining of blank pages and threads that lead to http:///
It seems all of these users are on IE. I haven't been able to replicate this behaviour on IE or Firefox.
Here is my postbit legacy:
I dunno if it's a coincidence or what but, my Firefox users have reported quick replying sending them to a blank white page.... I dunno if it's this hack. I dunno what it is...
tribedude
08 Mar 2006, 20:46
I think it might be the google alternate ad going to http://
I just saw that and put a functioning URL in there and we will see what happens....
I think it might be the google alternate ad going to http://
I just saw that and put a functioning URL in there and we will see what happens....
Try this man....
http://www.vbulletin.com/forum/showthread.php?t=156807&page=2&highlight=firefox
http://www.vbulletin.com/forum/showthread.php?t=157022
Worked for me :D
Miguel
tribedude
09 Mar 2006, 03:46
Try this man....
http://www.vbulletin.com/forum/showthread.php?t=156807&page=2&highlight=firefox
http://www.vbulletin.com/forum/showthread.php?t=157022
Worked for me :D
Miguel
Thanks Miguel but installing this plugin solved the quick reply issue for me a long time ago, however I am still getting complaints from users who click on threads in IE and end up going to http:///
UK Jimbo
09 Mar 2006, 09:28
Thanks for the PMs Gottcha, I think that your problem is running multiple Google ads on the same page. Have a read here (https://www.google.com/support/adsense/bin/answer.py?answer=10522&ctx=en-uk:search&query=multiple&topic=0&type=f) and try doing a search for "multiple" in the Google AdSense search section.
mattyk72
21 Mar 2006, 04:28
clicking install :)
Hi UK Jimbo,
I´ve got my own custom Ads showing up above the first post and under the lastpost. Any chance that your plugin could show the Ads only under the firstpost and above the lastpost ? Otherwise sometimes there would be 2 Ads showing up and that´s not nice and clean..
Guess it could be done with another conditional in
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I need it that way, that ads delivered by this plugin only appear
under the first post
above the last post
if the whole thread has at least 3 posts (so the plugin-ads can show up between the first and second or second and third post)
Any ideas ?
I need it that way, that ads delivered by this plugin only appear
under the first post
above the last post
if the whole thread has at least 3 posts (so the plugin-ads can show up between the first and second or second and third post)
Jason,
even better would be a second one for registered users where Adsense only appears:
under the first post
above the last post
if the whole thread has at least 5 posts (so the plugin-ads can show up without overloading the thread with ads)
under the lastpost as Andreas mentioned before. The reason is clear - that´s the post most users read first and should lead to the best reveniews
Would turn this plug-in into a must-have for all AdSense and Yahoo publishers, which have already own custom ads or adservers running on their forums ;)
under the first post
above the last post ($perpage=10)
if the whole thread has at least 3 posts (so the plugin-ads can show up between the first and second or second and third post)
May be someone can help me out. I´ve tried to implement these 3 conditions that way_
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
But I hit and miss. Does anyone see, where I went wrong..? Guess I can´t see the wood because of all the trees... :confused:
UK Jimbo
30 Mar 2006, 15:47
@Marv
Try replacing the plugin code with this (untested)
edit: removed, that's not going to work. Have a meeting to go to now but will look at it a bit later
UK Jimbo
30 Mar 2006, 15:50
Took less time than I thought - give this a try:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
EyeCrave
31 Mar 2006, 01:59
I get this error with that code above:
Parse error: parse error, unexpected T_BOOLEAN_AND, expecting ')' in /pathto/showthread.php(1031) : eval()'d code on line 5
BTW - awesome plugin.
UK Jimbo
31 Mar 2006, 08:38
OOps - that's what happens when you do things in a hurry. Try this for size:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
EyeCrave
31 Mar 2006, 22:02
Works. Thank you!
OOps - that's what happens when you do things in a hurry.
Thx UK-Jimbo,
I´ll give it a try and report back to you asap.
The Chief
05 Apr 2006, 18:23
installed and works great!!
UK Jimbo
06 Apr 2006, 04:38
Thx UK-Jimbo,
I´ll give it a try and report back to you asap.
Any luck?
GrendelKhan{TSU
06 Apr 2006, 13:17
I don't know if cause I installed this wrong or the Googlebot just isn't doing its job (so to speak)...
but I'm having trouble actually getting relevant ads. I don't think the googlebot is actually "reading" the content of the page. I always get ads for "free forum software" and related.
ie: I think its basically only reading the footer. or something
any ideas as to what is blocking or causing the Gbot to not actually dig into the content?
UK Jimbo
06 Apr 2006, 17:09
Hi GrendelKhan
Are the pages publically visible or do you have to register to see them? If Googlebot can't get at the pages (and content) from the same URL that you're using to access it then it can't index it. Sometimes it might take a while for pages to get indexed. I'd give it a couple of days and see how it goes. Post back and let me know how you get on.
GrendelKhan{TSU
08 Apr 2006, 14:28
Hi GrendelKhan
Are the pages publically visible or do you have to register to see them? If Googlebot can't get at the pages (and content) from the same URL that you're using to access it then it can't index it. Sometimes it might take a while for pages to get indexed. I'd give it a couple of days and see how it goes. Post back and let me know how you get on.
Hey jimbo, thanks for the reply (sorry I've been out this week and didn't see it).
The threads are all public. (no registration necessary to read)
And its been like this for weeks. :/
(eg:
here's one with a ton of text about the superbowl and ward winning MVP...but again, the ads are still "free forum software etc."
http://www.naestar.net/forums/showthread.php?t=19196 )
UK Jimbo
09 Apr 2006, 10:37
(eg:
here's one with a ton of text about the superbowl and ward winning MVP...but again, the ads are still "free forum software etc."
http://www.naestar.net/forums/showthread.php?t=19196 )
Hotels in Seoul of Korea
Animaged images for £150
All Steelers games on DVD
were the ads I got. Looks like it's working.
GrendelKhan{TSU
09 Apr 2006, 11:11
Hotels in Seoul of Korea
Animaged images for £150
All Steelers games on DVD
were the ads I got. Looks like it's working.
really? :/
is some kinda of geo-location in effect? where are you located?
I get 4 forum software or other related ads. :( (ie: pretty useless)
(see image).
can you check some other threads and see if you get related ads? I'd appreciated it greatly. I want to see if its just feeding me those ads.
tamborinegal
10 Apr 2006, 03:44
Works very well. Thank you. :)
Clancy
Makaveli105
10 Apr 2006, 17:20
really? :/
is some kinda of geo-location in effect? where are you located?
I get 4 forum software or other related ads. :( (ie: pretty useless)
(see image).
can you check some other threads and see if you get related ads? I'd appreciated it greatly. I want to see if its just feeding me those ads.
I see relevant ads.
Steelers pendants
Pittsburg Steelers
Pittsburg Steelers
Seoul Hotels
---
Thanks UK Jimbo, I'll give it a go :D
arossphoto
12 Apr 2006, 02:29
Took less time than I thought - give this a try:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I've installed and it's working very well. Will the code above display the ads after the first post and before the last? Would you mind showing me what the whole code for the post bit would look like, and is it possible to show the ads to certain usergroups?
Cheers.
Any luck?
Sorry for the delay, Jimbo :)
I´ve installed your code and modified it, so that certain usergroups see/don´t see ads, and to create different ad-channels to have a better overview (targeting).
The code seemed to work fine, but in the last days I had to notice that ads also appeared under the last post. Dunno why, but that´s the situation by now.
UK Jimbo
12 Apr 2006, 14:10
Hi guys - I'm really tied up at the moment. Will take a look ASAP but that might be in a few days time.
James
Niall Fernie
13 Apr 2006, 17:04
I know this is a bit basic, but I missed it on about 20 ocassions during my installation on this plugin.
Make sure you have the plugin/hook system enabled on your board, I was doing a test install on my other vB setup (small site - new install) and could not get this to work at all, until I read the text that vB had been almost shouting at me since the start "the plugin/hook system is currently disabled..."
Enabled it and worked first time.
I know you've probably just wasted 30 seconds of your life reading this, but I've just read every post here before reading the error message so just hoping to save someone 10 minutes.
Great plugin, easy install (especially if you're not as dopy as me)
INSTALL
sandrodz
14 Apr 2006, 01:13
installed, works like charm... only concern is if I can set it to display at the end of the last post only? or after the first post only? cause I believe this kind of random placing isn't efficient in my case... thank you!
imported_infitech
14 Apr 2006, 07:36
This stretches my page
Niall Fernie
14 Apr 2006, 16:38
Now that I have this up and running, can anyone tell me how to modify the first line condition to check for user rank, ie I would also like my Junior members to be able to see the ads. I already have it checking for forums and usergroups. Junior members (less than 30 posts) dont contribute as much content to the site as more senior members so they may as well see the ads.
Thanks in advance for any help.
The Chief
16 Apr 2006, 07:33
Does this work on postbit template, doesn't seem to work on mine, it creates the first post normal, then every post after that just decreases in size, lol..
the last post is super small..??
AzzidReign
16 Apr 2006, 07:47
Sweet! I've been looking for this! Thanks a lot!
I had some troubles, but once I put the code in both postbit and legacy, then the ads started showing up! Brilliant mod! Thanks very much!
UK Jimbo
21 Apr 2006, 11:38
This stretches my page
Nice forum style - doesn't look very standard to me though.
You probably need to change the HTML accordingly :)
UK Jimbo
21 Apr 2006, 11:41
Does this work on postbit template, doesn't seem to work on mine, it creates the first post normal, then every post after that just decreases in size, lol..
the last post is super small..??
Is your postbit standard? Are you sure you pasted the code in correctly.
Without more info it's impossible to speculate what might be wrong.
UK Jimbo
21 Apr 2006, 11:57
I've installed and it's working very well. Will the code above display the ads after the first post and before the last? Would you mind showing me what the whole code for the post bit would look like, and is it possible to show the ads to certain usergroups?
Cheers.
The postbit code should remain the same.
If you look back through the thread you'll see information on how to restrict the ad to appear/hide for given user groups.
Shout if you get stuck.
UK Jimbo
21 Apr 2006, 12:03
installed, works like charm... only concern is if I can set it to display at the end of the last post only? or after the first post only? cause I believe this kind of random placing isn't efficient in my case... thank you!
Trawl back through the thread. Pretty sure this has been done too :)
imported_infitech
21 Apr 2006, 12:24
Thnks UK Jimbo. Already have.
UK Jimbo
21 Apr 2006, 13:43
Thnks UK Jimbo. Already have.
You should click install then ;)
arossphoto
15 May 2006, 00:12
To limit it just to certain user groups I'd recommend the following conditional rather than the in_array() solution posted above. This version ensures that secondary group assignments are checked too.
For a single user group (1 in this case)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
For multiple user groups (1, 2 & 3 in this case)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
I only have one usergroup that I don't want to see the ads. Instead of entering all the groups that should see them like the example above, is there a way to just enter the usergroup that should not see them?
I hope that makes sense.
Thanks.
UK Jimbo
15 May 2006, 00:59
I only have one usergroup that I don't want to see the ads. Instead of entering all the groups that should see them like the example above, is there a way to just enter the usergroup that should not see them?
I hope that makes sense.
Thanks.
I think it was done on this thread somewhere before you can negate it like this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
arossphoto
15 May 2006, 02:00
Thanks! Works perfectly. I did search here before I asked, but not much came up under "usergroup".
Awesome hack. I've donated $25, as it's made me at least $500 so far, what about you?
arossphoto
20 May 2006, 00:59
I did (it again :D) --> a little modification to show all guests Ad, but let the reg. users choose if they want to get ad-posts or not.
Is there any way to provide this option only to certain usergroups, like paying members?
UK Jimbo
21 May 2006, 22:42
Is there any way to provide this option only to certain usergroups, like paying members?
Yup - the question's been asked/answered a few times in this thread already :)
arossphoto
21 May 2006, 23:15
Yup - the question's been asked/answered a few times in this thread already :)
Sorry, I don't think I was being very clear in my question. Doc Great provided a solution (http://www.vbulletin.org/forum/showpost.php?p=794514&postcount=64) that would add an On/Off button to the user's control panel so they could choose to see ads or not. Maybe this isn't the right place to ask, but I'd only like to give this option to certain paying members.
With your help I have set it up already so one usergroup never sees the ads, but I would like to give them the option in the Control Panel to turn ads on or off. I think I read all the posts here and I didn't see this answered.
Cheers,
Andrew
UK Jimbo
21 May 2006, 23:34
If you could create the userfield and have it specific to only certain usergroups that would solve the problem. I'm not sure if vBulletin will do that out of the box (the docs will do though!), if not I think it's probably a question for the mod requests forum on here.
Post back to let me/others know how you got on. Thanks!
Great plugin, thanks. Now if only there was one to put an ad randomly between threads on the thread list. ;)
durapuma
23 May 2006, 18:51
Hello,
is it possible, that this mod does not work in vB 3.5.4 ? I have just changed the postbit template, I have add the following at the bottom :
<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">Sponsoren</td>
</tr>
<tr>
<td class="alt1" align="center">
<!-- Werbung Start -->
<script type="text/javascript"><!--
google_ad_client = "pub-4639893886504387";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- Werbung Ende -->
</td>
</tr>
</table>
</div>
$spacer_close
</if>
after that, I import the Plugin. But nothing happens :(
What is the problem ? What do you need to help me ?
Best Regards from Germany
durapuma
UK Jimbo
23 May 2006, 19:06
If you're running in "legacy postbit" mode (user info goes at the left hand side of posts) then you need to edit the template postbit_legacy instead of postbit.
You also haven't clicked install for this mod :)
durapuma
23 May 2006, 21:22
Hello again,
i have just restore the "postbit" template and have add the code to the postbit_lecacy template. But it don't run :(
Whats the problem :( :( ?
I will click on install, if it runs ;)
Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little :)
One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.
Here are my default usergroups and their Usergroup I.D.s:
(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3
Now here are my Usergroup Titles/Minimum Posts/I.D. #
New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4
How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?
Thanks!
Great hack & works fine.
Thanks Jimbo
Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little :)
One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.
Here are my default usergroups and their Usergroup I.D.s:
(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3
Now here are my Usergroup Titles/Minimum Posts/I.D. #
New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4
How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?
Thanks!
I believe this would be done by adding a new usergroup and having users automatically promoted to it after 50 posts, then using the "if" by usergroup as explained earlier in the thread. Unless an "if" can be done by postcount, I am not sure. ;)
Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.
Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.
Try this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Thanks T.S.!
The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?
Thanks T.S.!
The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?
Correct.
Thanks again..I'll give it a go tomorrow after I get home from my real job :)
durapuma
24 May 2006, 06:41
Hello again,
i have just restore the "postbit" template and have add the code to the postbit_lecacy template. But it don't run :(
Whats the problem :( :( ?
I will click on install, if it runs ;)
Please remember my question - i need to install the hack quickly!!
Thanks
Doesn't work. Thanks anyways...
Try this
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Doesn't work. Thanks anyways...
I just noticed that I placed the < the wrong way. I turned it around and tried it on my own forum, but still couldn't get it working. I am still learning.
Hi, so is the ad displayed right after the 1st post on the page? I would like it to do the following.. is this possible:
a page has 2 posts the ad appears after post one, the page has 4 posts the ad appears after post2, page with 10 posts on it the ad appears after post5. This way the ad is always kept in the center of the postings. Thanks for any info!
Hi, so is the ad displayed right after the 1st post on the page?
This plugin displays the ad in a different random position with each page load.
UK Jimbo
31 May 2006, 12:04
Hi, so is the ad displayed right after the 1st post on the page? I would like it to do the following.. is this possible:
a page has 2 posts the ad appears after post one, the page has 4 posts the ad appears after post2, page with 10 posts on it the ad appears after post5. This way the ad is always kept in the center of the postings. Thanks for any info!
I could write this for you. Drop me a PM with an idea of how much you're willing to spend on it.
Netdesignz
09 Jun 2006, 10:47
Sorry to sound dumb and ask this question but after reading through this whole thread im still confused.
This is the first mod ive installed so please bear with me.
Ive manged uploading the xml :)
But this edit the postbit is baffling me as i cant find the file i need to edit. Ive looked through all the files i have there and there is no file called that..Can someone explain in noob terms plz :(
UK Jimbo
09 Jun 2006, 11:05
"postbit" and "postbit_legacy" are the name of "templates". Sets of "templates" are stored in "styles".
Check out the "styles & templates" section in the vB documentation here (http://www.vbulletin.com/docs/html/)
Shout if you have any problems.
Any 3.6 update coming out? This version works for me on 3.6 but doesn't quite look right. :banana:
UK Jimbo
19 Jun 2006, 13:33
Any 3.6 update coming out? This version works for me on 3.6 but doesn't quite look right. :banana:
Sorry - I won't have a chance to till v3.6 is stable and I've installed it on visordown.com
Hemanth
26 Jul 2006, 13:03
Good one. Installed.
Bulent Tekcan
04 Aug 2006, 23:58
Any news for 3.6.0 ?
Hope this can work with 3.6, really looked great pre-3.6..
Works for me in 3.6. The only thing I had to change was to remove the $spacer_open and ...close as otherwise it would not go 100% in width in my case.
Christoph
brvheart
08 Aug 2006, 17:06
great hack, I saw earlier in the thread about making the ads show up after the first unread post...has this been done yet?
*clicks install*
almukmin
09 Aug 2006, 10:21
Works for me in 3.6. The only thing I had to change was to remove the $spacer_open and ...close as otherwise it would not go 100% in width in my case.
Christoph
Hi, do you know how to make the space above and below the box equal to the normal space between posts? I've been trying with no success.
almukmin
09 Aug 2006, 10:36
I got the fix, change it to
<div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
and remove the spacer open and spacer close
This is for 3.6.0
Hi,
after we remove the spacer code from the top and bottom, where does the div style code go..at the very top? Thanks.
I got the fix, change it to
<div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
and remove the spacer open and spacer close
This is for 3.6.0
mano1.com
09 Aug 2006, 16:12
interesting, i'll give this one a shot later today. thanks!
just re-installed under 3.6, using the tips from above..good work. click *install*
Is it possible to have the ads displayed when viewing the forum index, or when viewing the thread topics within a group as opposed to having the ads displayed when one views the messages within a thread as this does now?
Would also like to know if I could have two rows of ads appear instead of one..
webgroup
18 Aug 2006, 04:42
Sorry - I won't have a chance to till v3.6 is stable and I've installed it on visordown.com
Any new of the new version?
works in 3.6.0 but the table with the ads is not squeared with the post tables anymore.
Smoothie
18 Aug 2006, 06:32
Any new of the new version?
works in 3.6.0 but the table with the ads is not squeared with the post tables anymore.
Works with 3.6, you just need to remove the space_open and spacer_closed.
Use this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
webgroup
18 Aug 2006, 06:41
Works with 3.6, you just need to remove the space_open and spacer_closed.
Use this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
thanks.
should I add that code or replace the spacer_closed and space_open with the code?
Smoothie
19 Aug 2006, 07:50
thanks.
should I add that code or replace the spacer_closed and space_open with the code?
Here's what I use:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
almukmin
20 Aug 2006, 18:31
Please read my previous post a page ago.
jklimczak
05 Oct 2006, 13:10
can some one help me fix my code I keep geting No post after i add this
if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
<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">
<!-- BEGIN ADVERTPRO CODE BLOCK -->
<SCRIPT language="JavaScript" type="text/javascript">
document.write('<SCR'+'IPT src="http://216.27.135.253:8080/advertpro/servlet/view/banner/javascript/zone?zid=7&pid=4&random='+Math.floor(89999999*Math.random()+10000000)+'&millis='+new Date().getTime()+'" language="JavaScript" type="text/javascript"></SCR'+'IPT>');
</SCRIPT>
<NOSCRIPT>
<A href="http://216.27.135.253:8080/advertpro/servlet/click/zone?zid=7&pid=4&lookup=true&position=1" target="_top">
<IMG src="http://216.27.135.253:8080/advertpro/servlet/view/banner/image/zone?zid=7&pid=4&position=1" height="60" width="468" hspace="0" vspace="0" border="0" alt="Click Here!">
</A>
</NOSCRIPT>
<!-- END ADVERTPRO CODE BLOCK -->
</td>
</tr>
</table>
</div>
</if>
curriertech
05 Oct 2006, 15:49
Installed and working on 3.6.2! I made one small change, being that it only shows the random ads for guests. :)
andewy3k
15 Oct 2006, 09:03
works great, thanks
just had to remove the spacer stuff for 3.6 and add the new div tag.
thanks again...
*installed*
Domenico
31 Oct 2006, 22:47
Removing spacer_closed and space_open and changing the div to <div style="padding:$stylevar[cellpadding]px 0px 0px 0px"> or <div style="padding:6px 0px 0px 0px"> doesn't work for me.
See -> http://www.webhostingtalk.nl/webhosting-forum/106302-directe-links-en-google-spiders-bots.html
Any ideas?
ThorstenA
05 Dec 2006, 23:51
What about:
Show Adsense in (or under, above) first unread Post of a Thread.
I think this is the place that would get the most user attention?
That's a nice idea. I also tried to find a solution for that. For what variable should I search for?
UK Jimbo
16 Jan 2007, 19:36
That's a nice idea. I also tried to find a solution for that. For what variable should I search for?
We tried this but after a week of research putting it there and a week of placing it randomly between the postbits we found that we got a better CTR from the randomly positioned one.
I'd urge you to do some similar research on your site to see if the same's true.
Putting the adsense after the first post would just require a template change.
Thanks, for this. Install was a snap
Installed.
ThorstenA
17 Jan 2007, 10:56
We tried this but after a week of research putting it there and a week of placing it randomly between the postbits we found that we got a better CTR from the randomly positioned one.
I'd urge you to do some similar research on your site to see if the same's true.
Putting the adsense after the first post would just require a template change.
I'd think that your research would be very interesting for so much people here, I would be glad to hear more about what you tried and what you think is more successfull. Do you also put adsense for registered users on showthread? How do your link units work out? I was f.e. never sure, if my link units hurt my forum more than they earn money.
Installed.
ThorstenA
19 Jan 2007, 18:26
After playing some days, for me placement after #1 posts works better for me than random placements.
azn_romeo_4u
19 Jan 2007, 23:38
I might be doing this wrong but it doesn't work for my 3.64 version
ThorstenA
20 Jan 2007, 10:08
I might be doing this wrong but it doesn't work for my 3.64 version
Place code after postbit or postbit_legacy tamplate.
Stoneyreef
22 Jan 2007, 04:22
This is my code, not only do you get a google ad in there, but you can also direct your users to sign up for a paid subscription!
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
it works fine randomly, it works fine to display after the first post, but if i wanted it display after the first unread post what do i need to change? thanks!
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.