![]() |
Bitfield permissions in plugin
I cannot seem to get a plugin to work properly with bitfield permissions, how can I do this? My PHP file (irc.php) seems to run just fine with the same code.
Here's my plugin: PHP Code:
|
Make sure all variables exist ;).
|
They should exist. I created them and tested it with the PHP file itself and it worked, but now I'm trying to get it for the navbar (since it has auto-template features).
|
Are you sure the $permissions variable exists? (Run var_dump() on it if you need to)
Also, array keys should be enclosed in single quotes when writing PHP Code. |
Quote:
That reminds me, I was going to move those to an array(). |
Thought so ;)
You'll need to pull the permissions from the usergroup (if they are not set in the $vbulletin->userinfo array). var_dump() $vbulletin->userinfo and see if there is anything about permissions. Else you will have to use $vbulletin->usergroupcache & $vbulletin->userinfo to get the correct permissions for the usergroup. |
Could it possibly be because it was in global_start? I just moved it to global_setup_complete and it works as it should..and the var_dump worked.
I feel dumb again. Lol. Especially when the obvious is right in front of you... |
I find that global_start always seems to act a bit odd when it comes to debugging, must be due to the output buffering or something. Glad you got it working though ;)
|
global_start, as it's name suggests, is run before (basically) anything runs. So not much "advanced" variables exist there.
And yes, Opserty, global_start is in an output buffer. |
All times are GMT. The time now is 11:22 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|