A little help to hide some categories in forum_list [Conditional inside]

rafass

Member
Applications Owner
TMDb Threads Owner
Statistics Owner
OSB Display Owner
TV Threads Owner
Social Groups Owner
Hello Friends!
I need a little help to hide certain categories depends of the language selected using this nice conditional:
Code:
You must validate your XenForo license to see code
In forum_list
Anyone can give me a hand / idea to do this? I've been trying several hours without success.
Appreciate some help. Even I'm willing to pay, if is a little difficult.
Many thanks!​
 
I think you want to do that in these templates..

node_category_level_1
node_category_level_2
node_category_level_n

And I do believe you'll need to add a condition for the node too...
Code:
You must validate your XenForo license to see code
 
Hello Snog! that sound good.
Code:
You must validate your XenForo license to see code
Code:
You must validate your XenForo license to see code
Code:
You must validate your XenForo license to see code

You must validate your XenForo license to see quoted content
That conditional looks really cool! anyway I've working with this with easy and small elements / templates (and works like a charm)
But I'm lost with the templates above.
I have ready my ACP with the categories / languages. if you want to make tests there with this templates. (if you can give me a hand on it)
Appreciate so much your help Snog!
 
You would want to put the if statement before the <li ... and the /xen:if after the </li>

Code:
You must validate your XenForo license to see code

You can also change the category part to a list of categories by doing this..
Code:
You must validate your XenForo license to see code

But I am at a loss as to why you would want to hide categories based on language. I think that's an unwise thing to do. What will unregistered users see? Nothing?
 
Why don't you just use the built in promotion system and add people to a different user group based on their language? Then set the permissions for the forums based on that.
 
Awesome! This is almost done!!
The language #1 (English) are showing only the category #1 (English Zone) that's perfect! :)
Now, how to add the other conditional to the language #2 (Spanish) to show only the category #2 (Spanish Zone) ?
I guess I have to use xen:elseif ? I have this now:
Code:
You must validate your XenForo license to see code
how to include the second conditional there?
Code:
You must validate your XenForo license to see code
--
Regarding the questions:
You must validate your XenForo license to see quoted content
Because each category will contain forums in a specific language.

English Zone [Category]
---English 1 [Forum]
---English 2 [Forum]
Spanish Zone [Category]
---Spanish 1 [Forum]
---Spanish 2 [Forum]

So, depending of the language selected you will see only the that specific language. if you know other languages and you want to take a look at these categories, just have to switch the language. :)

You must validate your XenForo license to see quoted content
The system of user promotions has been discarded for various reasons many days ago.

This new way is absolutely fantastic! I'll show you the result and you will see ;)
 
Don't use the else, I think an OR (||) will work.

Code:
You must validate your XenForo license to see code
 
Snog, YOU ROCK!
It works absolutely perfect! clapclap.gif
Donation sent!
Screen Shot 2015-06-09 at 6.20.45 AM.png
Thank you sooooooo much for your help! clapclap.gif
 
Hello Snog! Your conditional works like a charm, I'm very happy with the result. :D

Now I'm using only 2 languages:
#1 English
#2 Spanish

With 2 categories
#1 English Category
#2 Spanish Category

Rich (BB code):
You must validate your XenForo license to see code
This is absolutely perfect ↑↑ :)

--

But If in the future I want to include the languages:
#3 French
#4 Italian
#5 German

And the categories
#3 French Category
#4 Italian Category
#5 German Category

I can do this?

Rich (BB code):
You must validate your XenForo license to see code

Or I have to replace (||) and use another instead?

Many Thanks again!
 
The way you have it should work. You should be able to expand it out to as many languages as you want.
 
Hello Snog, I would like to do the same on resource_choose_category XenForo Resource Manager
Depends of the language selected, show certain categories on yoursite/resources/add/
This is the template:
You must validate your XenForo license to see quoted content
As you can see, the categories on the option are controlled by the red code. (maybe?)
anyway, I've been trying to edit the template on many ways with the conditional we use above. but still can not find the way to make this work.
If you can give me a hand I'll appreciate it so much.
 
Here you go...

Rich (BB code):
You must validate your XenForo license to see code


Expand the if statement just like the other template for each language and category ID.
 
Very nice! ^ . ^ thank you so much! my mistake: I was not using $categoryId :D
To my own references, and maybe can help someone, here my resource_choose_category
Rich (BB code):
You must validate your XenForo license to see code
Works absolutely perfect! ;)
 
Back
Top