Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array Condition on MyBB Forums (PHP Enabled)
#1
Hi,

I want to add a condition to a content in the header of MyBB.

I have enabled the PHP and templates conditionals and I need to add the code manyally, here is the code:

PHP Code:
<if condition="!in_array($GLOBALS[forumid],array(2))">
Here is the content.
</if> 

What I want to do is enable the code with the exception of the array code in this case 2.

Thanks.
Reply
#2
I did not used that too much, so I'm not sure about the solution...

I googled a bit, and I think this will help you...
http://community.mybboard.net/thread-31860.html
Reply
#3
Thanks, Im using these plugin, but I need to use the code that I posted to make an excemption on some forums.

Thanks.
Reply
#4
Well as far as I understand the plugin, you would do something like this...
But note that I can't test it and I'm not sure...
You will get better answers from the creator of the plugin....

PHP Code:
# you would first need to declare a variable
$condition in_array($GLOBALS[forumid],array(2));
<if 
$condition then>
2
<else />0
</if> 
Reply
#5
Mmm, I have tested without luck.

BTW, Thanks for response Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 777 07-27-2020, 11:26 PM
Last Post: tk-hassan
  What is array and the the use of it?can someone explain to me? Advertise4you 2 967 10-30-2011, 02:13 PM
Last Post: ★Cooldude★
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,270 10-10-2011, 01:00 PM
Last Post: Greyersting
  Put the data from a MySQL column in an array RPicard 3 862 06-01-2010, 01:51 PM
Last Post: RPicard
  $_POST array is empty RPicard 3 1,212 05-31-2010, 03:35 PM
Last Post: RPicard

Forum Jump:


Users browsing this thread: 1 Guest(s)