PDA

View Full Version : get $user[''] info within postbit?


ThorstenA
10-21-2007, 02:23 PM
I'd like to show an ad for all users having less than 50 posts. There is a quick tip for do that here:

http://www.vbulletin.com/forum/showthread.php?t=198875

But how do I find out about getting user information? $user, $bbuserinfo, $userinfo are not working. Is there a way to do that with $vbulletin-> ... ? Thanks in advance!!!

Opserty
10-21-2007, 02:33 PM
Change:

<if condition="$post[postcount] == 1">
To:
<if condition="($post[postcount] == 1) AND ($bbuserinfo[posts] < 50)">

ThorstenA
10-21-2007, 02:43 PM
Thanks very much, it works within postbit template. I want to get the user[posts] information within plugin on postbit_display_complete. But there I do not get $user, $bbuserinfo, $userinfo. Can I get the user information via $this->registry-> or something like that? Thanks in advance!

Opserty
10-21-2007, 03:28 PM
Try: $vbulletin->userinfo['posts']
Or: $this->registry->userinfo['posts']

ThorstenA
10-28-2007, 12:44 PM
$this->registry->userinfo['posts'] works great :D