The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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:
|
#2
|
||||
|
||||
![]()
Make sure all variables exist
![]() |
#3
|
|||
|
|||
![]()
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).
|
#4
|
|||
|
|||
![]()
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. |
#5
|
|||
|
|||
![]() Quote:
That reminds me, I was going to move those to an array(). |
#6
|
|||
|
|||
![]()
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. |
#7
|
|||
|
|||
![]()
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... |
#8
|
|||
|
|||
![]()
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
![]() |
#9
|
||||
|
||||
![]()
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. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|