![]() |
if condition problem
Ok, i want to show some information in forum x y z and in the other forums i want to hide it.
Which conditions you think i should use? By the way i'm editing the template forumhome_forumbit_level1_post. I'm want that forum 9,10,11 will show hey and the other forums will show nothing By the way it is all an examples. |
If you look at the template, you'll see the variables used in it and one of them is $forum[forumid]. So, use that in your condition:
HTML Code:
<if condition="in_array($forum['forumid'], array(x, y, z))"> |
Its not working.
I'm trying to do this <if condition="in_array($forum['forumid'], array(9, 132, 95, 72, 13, 288, 113, 124, 11, 12, 100, 62, 16, 421, 14, 10))"> My costume code. </if> and it is not change, i still staying the same as the main code |
You ONLY put the forum IDs of the forums you WANT it to show in.
|
This is what i did, i put the id of the categories i want to show it there.
Maybi i need another condition to hide some COSTUME TEMPLATE in this forums |
So your saying your custom code is still showing everywhere on the forum?
|
My costume code isn't showing any where, But i think i need another code that make the opposite of this code.
I want to hide some information in a few forums that i choose |
Did you test the code first to make sure it was showing at all, by itself?
|
of course, i tried to replace it with the original code and it worked good.
but the problem was that i want to show it only in categories and not in the all forums. And the code Lynne gave me above doesn't work |
You can try the opposite:
HTML Code:
<if condition="!in_array($forum['forumid'], array(x, y, z))"> |
its still now working
this is my code in forumhome_forumbit_level1_post Code:
<if condition="!in_array($forum['forumid'], array(9, 132, 95, 72, 13, 288, 113, 124, 11, 12, 100, 62, 16, 421, 14, 10))"> and the second condition is what i want to show in those categories. |
I did it a bit differently but mine works fine for me.
Code:
<if condition="in_array($forumid, array(41,0))"> That is what someone told me once.....I tried it and it worked. |
:(
Doesn't work for me. And i'm editing the template forumhome_forumbit_level1_post |
Maybe the problem is we're misunderstanding what it is you're trying to do. What are you trying to do with your custom code?
|
Instead of doing an two if conditions, one for if true, the other for if not true, combine them into one - if true or else.
Also, are you positive you are editing the correct template for the page? |
I think so.
Any way what i'm trying to do is this. http://www.tgt.co.il/forumdisplay.php?f=9 - link to my category. http://www.tgt.co.il/forumdisplay.php?f=17 - link to forum that have inside sub forums. what i'm trying to do is to change the view in the category and NOT to change the view in the sub forum table. Hope you'll understand now. And maybe i used a wrong template. edit : Now i'm trying to do this in the HARD way, it seems like to be working. TNX for you help every body. Those codes really helped me. |
All times are GMT. The time now is 05:23 PM. |
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:
|