![]() |
Convert template conditional into plugin code
Hi
I have the following template conditional, variants upon which I use quite a lot: Code:
<if condition="!in_array($foruminfo['forumid'], array(1,2,3,4))"> How would I format the above conditional to make it apply to a block of plugin code? (Assuming it's at a hook where $foruminfo is available). |
Actually, that one if pretty much the same in php:
Code:
if (!in_array($foruminfo['forumid'], array(1,2,3,4))) |
Thanks Lynne....I needed that as previously I was using something like
Code:
if ($forum['forumid'] != 1 AND $forum['forumid'] != 2 AND $forum['forumid'] != 3 AND $forum['forumid'] != 4) It was working but I felt it was ridiculously long winded, and I had read somewhere it used marginally more resources doing it that way. |
Quote:
|
All times are GMT. The time now is 10:26 AM. |
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:
|