Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to get different special pages/links for different user roles

rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one"NY ✭✭✭

We're considering using multiple categories with permissions set by the categories to manage multiple forums. Most of the users will be in one category or another with few of them in multiple categories ("forums"). Vanilla seems to support this out of the box, and together with some plugins (e.g. hide categories) it looks like a workable solution.

Most of the look and feel would be similar but we'd like to have some of the menu options dependent on the categories. Since the user roles permissions define which categories they have access to, I'd think that the menu options will be based on the user roles (most will only have access to one category). This way, we're thinking that using one of the several plugins that offer "extra pages" we can have different privacy pages, about pages, and so forth on a per category/forum basis.

Any suggestions as to whether any plugins already do that or are so close to what we need that someone can offer a suggestion on how to get there?

Other advice on managing multiple forums through category "isolation" would be welcome.

Best Answer

Answers

  • peregrineperegrine MVP
    edited March 2014

    You could do it multiple ways. I assume you are basing your groups of users based on role and assigning custom category permissions based on that role.

    1) You could have one view in your about page (or privacy) and conditionally display portion of about page based on user role.

    2) or you could have multiple about pages - link dependent on category. same with privacy.

    I lean towards option 1.

    adding menu links can be dependent on role or any permission desired.

    BasicPages app is the newest app for ONE or MULTIPLE extrapages.
    http://vanillaforums.org/addon/basicpages-application

    extrapage plugin is a simple plugin for ONE extrapage (although it could be modified for multiple).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • hgtonighthgtonight ∞ · New Moderator
    edited March 2014

    I can't think of any solutions for this out of the box.

    You are trying to have something like a forum network (Stack Exchange style) or a multi-site installation (WordPress style)? What is the motivation for this rather than separate installations?

    EDIT: Cross-posted with @peregrine. In addition to those plugins (both very useful) I would probably suggest Custom Pages by @Mark and include the permissions checking/swapping for each forum in the header there.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    First to @peregrine: Your assumptions are correct.
    Leaning towards option #2 because we may have more than just an "about" page so placing different links based on roles seems reasonable there. Link needs to be dependent on the user, not category because some users will have access rights to more than one category.
    Thanks for the pointer to basic pages. I may come up with some questions once I get there.

    To @hgtonight: Each forum is expected to have a limited number of users, but the number of forums may grow, so in the aggregate there is hope for a larger audience. The members of each have limited technical experience and unlikely to have forum experience, so Vanilla's simple clean UI is a positive. No desire to go to WP and no idea what Stack Exchange is.

    Managing multiple installations seems like an administration overkill, so we hope that one installation of Vanilla and plugins would ease the management effort. Again, we actually like the clean Vanilla look and feel and think it would work for all of our "mini-forums".

    Don't know if this is a no-no in this forum, but I'd like to hold before declaring the question answered -- first to let others have a shot at it, and secondly to have time to research the suggestions.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Continuing on my previous feedback to @peregrine and @hgtonight:

    So I installed the Basic Pages application and noticed that it is different than a plugin. There must be some significance to that that eludes others as well because many refer to it as plugin in the discussions page for the application...

    Be that as it may, I preempted the forum gurus who are certain to push me into "learn and do it" by looking at some of the installed files and learn php despite the sad fact that I am not a programmer, merely a mortal. Eventually I found this "class.hooks.php" file in the settings folder and within its mysterious code I noticed a comment that says " Add pages in the config value array by ID to header site menu." Seems like the right place for @peregrine's suggestion to add some tests as to the user's roles and permissions to determine which menu pages to add to the menu.

    But how to do that magic is really beyond me. Anyone with some specific magic lines of code to put in there (or perhaps elsewhere if I found the wrong php to change)...

  • hgtonighthgtonight ∞ · New Moderator

    There are four different types of addons: themes, plugins, locales, and applications. Themes change the way your applications look, locales change what language applications speak, and plugins change the way applications work. Applications are self contained functionality (although they can hook into each other like plugins too). Some plugins blur the line between plugin and application. Custom Pages is one such plugin.

    Basic pages provides completely new functionality to a base Vanilla install, so it is an application.

    Vanilla Forums is actually a suite of three different applications built on the Garden framework. Vanilla is a forum that has discussions, comments, and categories. Dashboard is a management application that has user management, add on management, activity wall, notifications, and other 'meta' functions. Conversations is a messaging application that handles your inbox and private message functions.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • peregrineperegrine MVP
    edited March 2014

    @rbrahmson said:
    Continuing on my previous feedback to peregrine and hgtonight:

    So I installed the Basic Pages application and noticed that it is different than a plugin. There must be some significance to that that eludes others as well because many refer to it as plugin in the discussions page for the application...

    Be that as it may, I preempted the forum gurus who are certain to push me into "learn and do it" by looking at some of the installed files and learn php despite the sad fact that I am not a programmer, merely a mortal. Eventually I found this "class.hooks.php" file in the settings folder and within its mysterious code I noticed a comment that says " Add pages in the config value array by ID to header site menu." Seems like the right place for peregrine's suggestion to add some tests as to the user's roles and permissions to determine which menu pages to add to the menu.

    But how to do that magic is really beyond me. Anyone with some specific magic lines of code to put in there (or perhaps elsewhere if I found the wrong php to change)...

    well, if it were me and I were learning the ropes and I had a question about roles and permissions. I would look at some plugins that have the word role in them. And then I would spend a few weeks working toward that end.

    e.g. the rolebadges plugin.

    class.RoleBadges.plugin.php attachbadge method is one such example.

    then once you know role you could do if statements or case statements or design it 100's of different ways.

    if ($certainrole) {
    addlink........
    }

    peruse the vanilla code relating to roles as well. you won't learn it overnight. it is a gradual process. if you need something very complicated quickly, and it is beyond you, get your team to write it for you, or perhaps send someone a donation for a mod (e.g. shadowdare for a mod to basicpages to do what you want) and they might write it for you, or hire a contractor. Opensource is opensource, which doesn't mean modifications are provided free, and you already know that. Providing modfications to plugins or apps may be out of the kindness of some people, but it is not a requirement. If you have questions about certain plugins or apps, it is best to post your question under that app or plugin - so it benefits others as well as you - for easier location of related questions.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    OK, this looks like much more in depth modifications than I could possibly do. Will indeed need professional help so I think this will have to be deferred until the higher ups agree on this. All well intentioned suggestions on getting me to learn the ropes in the Garden of Eden do not bring me any closer to paradise.

  • @‌rbrahmson

    see

    http://vanillaforums.org/discussion/comment/204315/#Comment_204315

    if you can wrap your head around it and understand it, its not too difficult.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Thanks @Shadowdare! Will certainly look into that.

Sign In or Register to comment.