The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
In your code snippet you were already using $vbulletin->userinfo['userid']
Or you mean that instead of that I should use $vbulletin['userid']? |
#12
|
|||
|
|||
Any ideas please?
|
#13
|
||||
|
||||
Whoops, I misread my code - the variable name is incorrect. But, I don't think the parenthesis are correct which I stated before. Please check them before trying that code.
|
#14
|
|||
|
|||
What variable name is incorrect? $vbulletin['userid'] or $vbulletin->userinfo['userid']?
Or even better, this is the code that you posted: PHP Code:
I have been playing with the parenthesis for hours with no luck. Maybe because I'm not a programmer. Could you please take a look? |
#15
|
||||
|
||||
I meant my variable name was correct (argh, I guess I didn't have enough coffee before I posted).
I see 5 left parenthesis and 4 right parenthesis. That isn't going to work. HTML Code:
if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) AND (!in_array($vbulletin->userinfo['userid'],array(1,2)))) |
#16
|
|||
|
|||
Not working
Tried with these variations, still no luck: Code:
if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) AND !in_array($vbulletin->userinfo['userid'],array(1,2))) Code:
if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'] & in_array($vbulletin->userinfo['userid'],array(1,2)))) |
#17
|
||||
|
||||
if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel']) OR in_array($vbulletin->userinfo['userid'],array(1,2)))
Try OR and forget the not... I have the in_array part right, but wasn't looking at the logic. This is why I do things on my test site - so I can try them out and keep modifying them until they work! I love logic problems, but always hated doing logic in code - go figure! |
Благодарность от: | ||
chefy |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|