Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Sep 2012, 22:41
Seductor Seductor is offline
 
Join Date: May 2011
Registring a variable.

Hello:

I'm trying to register a variable. It will need to check whenever a visitor belong to the poster buddy list, so...



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

I did a plugin hooked to postbit_display_complete.

Now, I think I will do something like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Am I doing it right? How could I call to my $new_buddylist? Should it be my_buddylist or my_var?

Thanks.
Reply With Quote
  #2  
Old 07 Sep 2012, 22:46
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
The code you posted is both rendering the postbit_legacy template and preRegistering your variable to it. You don't need to do both. I think you probably just need the preRegister part, like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Then you'd use $my_buddylist in template postbit_legacy.
Reply With Quote
  #3  
Old 07 Sep 2012, 23:00
Seductor Seductor is offline
 
Join Date: May 2011
Thanks kh99. Then, I do:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

But it doesn't seem to work. The condition seems to be always false. How could I debug it?


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

returns: bool(false)

$new_buddylist is:
array(1) { [0]=> string(0) "" }
Why?
Reply With Quote
  #4  
Old 07 Sep 2012, 23:07
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Did you check $bbuserinfo['buddylist']? To be honest I can't remember if you can use $bbuserinfo in a plugin, you might have to use $vbulletin->userinfo instead.
Reply With Quote
  #5  
Old 07 Sep 2012, 23:13
Seductor Seductor is offline
 
Join Date: May 2011
Originally Posted by kh99 View Post
Did you check $bbuserinfo['buddylist']? To be honest I can't remember if you can use $bbuserinfo in a plugin, you might have to use $vbulletin->userinfo instead.
Of course, that was the problem. Thanks a lot, it works.

Last edited by Seductor; 07 Sep 2012 at 23:25.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:10.

Layout Options | Width: Wide Color: