![]() |
Wrong Datatype in bbcode_class file
Okay, so I'm trying to work the usergroup smilies hack to be more secure by replacing the smilies with text instead of the image if the smilie is in a particular category (102) and the user is not in the secondary usergroup (44).
I've tried the below, and I'm getting an error for "wrong data type in second argument" Any ideas? :( Code:
// ##### START HACK - Usergroup Smilies ##### Thanks so much for any help :) |
You don't point us to the line where you are getting this error, so i am just guessing here. I think (not checked) that $this->registry->userinfo['membergroupids'] is not an array, but a comma seperated list. Also $this will only work inside classes.
|
membergroupids is indeed just a comma seperated list. Use is_member_of :) (thats whats causing the message too, as Marco pointed out)
|
Sorry :)
It's in the class_bbcode.php file. So $this should work. I'm adding this on line around 452. So I tried a strpos Code:
// ##### START HACK - Usergroup Smilies ##### The one I'm testing it with is smilie id 867, the smilie it shows is 866 LOL :) Any clues where else I might need to look? Thanks tons for help with the array problem :) W00t! Got it working with this code Code:
// ##### START HACK - Usergroup Smilies ##### |
You should use the function is_member_of.
|
Can I use is_member_of in a php file? I thought it was a template conditional only.
|
All times are GMT. The time now is 07:50 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|