The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
explode usergroup
I've done this before it and worked fine for another plugin.
However, I'm having issues, here is my code. Code:
global $vbulletin; $ugs = explode(',',$vbulletin->options['nr_fid']) if ( in_array(THIS_SCRIPT, array('forumdisplay', 'showthread')) && !in_array( $forumid, array($ugs) ) ) |
#2
|
||||
|
||||
Why are you creating an array of $ugs, when it is already an array?
|
#3
|
||||
|
||||
well I took out $ugs and put in this:
Code:
global $vbulletin; if ( in_array(THIS_SCRIPT, array('forumdisplay', 'showthread')) && !in_array( $forumid, array($vbulletin->options['nr_fid']) ) ) The 6 works fine, but it seems like the comma and 5 etc.. don't work. Am I missing something here? |
#4
|
|||
|
|||
I think means with this bit:
Code:
array($ugs) |
#5
|
||||
|
||||
If I place this code.. it works fine.
Code:
global $vbulletin; if ( in_array(THIS_SCRIPT, array('forumdisplay', 'showthread')) && !in_array( $forumid, array(5, 6) ) ) But if I put that code in directly "$vbulletin->options['nr_fid']" into the 5,6 it doesn't work. So should I explode it and get it out? I would assume the array command would be able to take it out from $vbulletin->options['nr_fid'] |
#6
|
||||
|
||||
There is a difference between:
PHP Code:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|