The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Conditional to hide specific forums on forumhome
Hi,
I have the main English forums, then I have some other language forums. I have setup a user profile field with some selectable options to show all, show none, or show a specific language only (plus English, as those are our main ones). I haven't yet managed to get any of it working. Editing in forumhome_forumbit_level1_post Code:
<vb:if condition="$bbuserinfo[field26] == 'Show English only'"> <vb:if condition="!in_array($forumid, array(19,28,34,144))">hides foreign?</vb:if> <vb:else /> shows normal forums </vb:if> Thanks, Tim. |
#2
|
|||
|
|||
You can only use $forumid if it's registered to the template you're putting that code in. If that's the problem, you could try using $GLOBALS[forumid].
Edit: oh, I see now you said which template you're editing. You could also try using $forum[forumid]. |
Благодарность от: | ||
tbworld |
#3
|
||||
|
||||
Thank you. I made a profile field with options to show english only, and show all of them (to show the foreign languages).
Then I used: Code:
<vb:if condition="$bbuserinfo[field26] == 'Show English only'"> <vb:if condition="!in_array($forum[forumid], array(19,28,34,144))"> forum code <vb:else /> -this is the blank bit- </vb:if> <vb:else /> forum code </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|