Announcement

Collapse
No announcement yet.

Making a catagory invisible on front page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Making a catagory invisible on front page

    I have an idea for my forum, but i need your help. Here it is, you have 10 catagorys:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    1 is the main catagory with news and information, which will be displayed on the index to everyone. However, the other 9 wont be displayed on the forum index (set as inactive, but they can access it though a direct url link in a menu). So, i have my one catagory on the front with the news and info, and the other 9 can be acccessed through the menu on the top.

    However, this is where i need a little of your IQ please. What i want to do is have usergroups that the members joins, like im a gamer, which then means the gaming catagory (for example, number 6) is now visible on the index, so this guy now sees catagory 1 and 6 on the index, but can still select the other catagorys from a menu.

    I hope i have explained myself, please tell me how i can do this. If it cant be done on a default board, is there a mod i can get to do this? If the answer to both is no, would anyone be interested in a paying job to do it?

    James

  • #2
    Hi James,

    That's doable using public usergroups and a bit of template conditional magic.

    First off, you'll have to edit all those categories and set 'Forum is Active' to Yes. We'll hide them differently.

    Then, add 9 usergroups and set 'Public (Joinable) Custom Usergroups' to Yes for each. Also make sure the default usergroup (Registered Users) has 'Allow Users to have Member Groups' set to Yes.

    Next, edit your forumhome_forumbit_level1_nopost (I'm assuming these are actual categories with 'Act as Forum' set to No) template.
    Add this to the beginning:
    Code:
    <if condition="($forum[forumid] == X AND is_member_of($bbuserinfo, Y)) OR ($forum[forumid] == X AND is_member_of($bbuserinfo, Y))">
    Where X is the forumid and Y is the usergroupid of the usergroup corresponding with that forum.
    You can duplicate this nine times, as I duplicated it twice, using an OR and adjusting the variables X and Y.

    Add this to the end of the template:
    Code:
    </if>
    Voilą, done.
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Colin can i have your babies?

      Seriously though, thank you so, so, much. I really appreciate it!

      Comment


      • #4
        Just another problem i have realised. I want the users to have a default index.php depending on which group they are in, which you have sorted out for me.

        However, what about the menu at the top which allows users to select which forums / catagorys to view that arnt already visibile on the index by making them inactive and having the menu link to the direct url, that wont work with the current setup will it?

        Comment


        • #5
          Glad to help
          Best Regards
          Colin Frei

          Please don't contact me per PM.

          Comment


          • #6
            Posted too fast...

            You can do that in a similiar way, using template conditionals in your menu.
            With code like this, decide if he can see the forum already, or if it should show up in the menu:
            Code:
            <if condition="!is_member_of($bbuserinfo, Y)">
            // is not member of usergroup Y, so doesn't see forum -> show link
            </if>
            Duplicate that code for each forum/usergroup.
            Best Regards
            Colin Frei

            Please don't contact me per PM.

            Comment


            • #7
              Wow Colin F i cant fault you. Thanks again for your help, ill get on with modding my board right away.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X