The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
[RESOLVED] php forumid array
Hiya, I need some help please.
I am trying to set a condition so that if a forumid is not equal to 34 or 54. I have tried this: PHP Code:
Can anyone help me out here please. |
#2
|
||||
|
||||
Where are you putting that condition - what hook location? did you look up the hook and verify you are using the correct variable names?
|
#3
|
||||
|
||||
Quote:
it's in a plugin, the hook is postbit_display_complete, I have no idea how I look up the hook to verify if I am using the correct names. I have made it ignore a single forum with this: PHP Code:
|
#4
|
||||
|
||||
You lookup the hook by just doing a search in your vbulletin file directory for "postbit_display_complete" and then the file should come up. (I use BBEdit, my text editor, to do this.)
Anyway, that variable isn't available there. Use $this->thread['forumid'] |
#5
|
||||
|
||||
Quote:
thanks for the information, I tried this but it isn't working, I am guessing I haven't used it correctly, would you correct it for me please: PHP Code:
|
#6
|
||||
|
||||
Use $this->thread['forumid'] instead of $forumid
|
#7
|
||||
|
||||
Hiya Lynne,
thank you so much for your help with this, I apologise for taking so long in getting back to this, so many tasks to perform so little time. I must be totally retarded or something because this is now turning off the image resizer in all forums not just 34 and 54, would please be so kind as to look at the code I have used and tell me where I have gone wrong please. PHP Code:
Sorry to be proving a burden here and thank you very kindly for your help. |
#8
|
||||
|
||||
Try:
PHP Code:
php in_array function - http://php.net/manual/en/function.in-array.php |
#9
|
||||
|
||||
Success, we just needed the not (!) in array:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|