1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can Error msg get customized?

Discussion in 'XenForo Questions and Support' started by Core Freedom, Dec 10, 2011.

  1. Core Freedom

    Core Freedom Well-Known Member

    I'm creating some tabs that are for specific membership levels and right now when a 'wrong' level tries accessing that tab they get a message saying:


    You do not have permission to view this page or perform this action.
    I'd like to customize this sentence some and tell them 'why' and 'how' they can get access. Where do I do that?
    thank you !
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's a phrase: do_not_have_permission

    Edit it to suit.
     
    Core Freedom likes this.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is the generic error message so it may not be appropriate to change it for a specific section.

    Consider creating a notice instead. Notices can be restricted to specific forums and groups, so you can display only when a nonprivileged user (as specified by their group) is viewing a particular forum.
     
    Core Freedom likes this.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    You could also consider using conditional statements to only show the tabs to those with the correct permissions.
     
    Core Freedom likes this.
  5. Core Freedom

    Core Freedom Well-Known Member

    Since I want the tab to display to non-privileged users in the hopes they'll become premium members creating a notice might be great. But how do I do that?
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Home -> List Notices -> Create New Notice

    You will see criteria for groups and forums.
     
    Core Freedom likes this.
  7. Floris

    Floris Guest

    Instead of that, why not point non-premium users to a page introducing them to the premium membership instead?
    On XenFans.com I have 1 forum "as a link" to a premium introduction page. (And they don't see the premium forums)
    Which premium members don't see.
     
    Core Freedom likes this.
  8. Core Freedom

    Core Freedom Well-Known Member

    hadn't played with this. It's great! If I could just get it to work. :(
     
  9. Core Freedom

    Core Freedom Well-Known Member

    I'm not quite sure I follow this. You mean remove the premium tab completely from the view of non premium members? But then how will they know exactly that it exists? Where to I post that message that leads them to that page?
     
  10. Floris

    Floris Guest

    Show the tab to non-premium users.
    But instead of when they click on it saying 'no permission', link it to a page introducing them to a premium membershp. A page that's visible to all guests and above.
     
    Core Freedom likes this.
  11. Core Freedom

    Core Freedom Well-Known Member

    I totally get what you're saying in theory but I'm trying to think through the practical steps. How do I exactly link the page to the premium-member-only forum?

    Do you have such a link to your site that I can see?
     
  12. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You are using this addon, right?

    http://xenforo.com/community/threads/nodes-as-tabs-with-tab-selection.23295/

    It builds tabs from nodes. There isn't a clean way to work a conditional in there to change the link for non-privileged users. One option is to create two node tabs, one for privileged and the other for non-privileged, where permissions are such that one or the other shows up when appropriate.

    IMO this is needlessly complicating matters. Just create a notice with appropriate criteria to inform your non-privileged users. Simple. Effective. Doesn't require any conditionals or extra pages. This is what the error page looks like with a notice:

    Screen shot 2011-12-10 at 7.32.55 AM.png
     
    Core Freedom likes this.
  13. Core Freedom

    Core Freedom Well-Known Member

    that's what it is set to now but I had wanted to customize the notice as it leaves the client hanging. So I created a separate notice for this particular 'category' but it's not working for some reason. I'm sure it's a minor thing, but no matter what I do it won't show my custom notice. :(
     
  14. James

    James Well-Known Member

    Notices have a criteria for the controller and action don't they? Maybe you can create the notice to be triggered on the required controller/action, that should handle it.
     
    Core Freedom likes this.
  15. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Then you aren't meeting the criteria of the notice. For the purpose of testing you will probably want to login as a non-privileged user since you are setting the criteria to match those users.
     
    Core Freedom likes this.
  16. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It's only necessary to set a forum and usergroup for the notice in this case.
     
  17. Core Freedom

    Core Freedom Well-Known Member

    I did the changes in FF and logged in as that level on IE. I know it's something I'm overlooking. It's like playing 'master mind' sometimes. Here are a couple of screen shots. Maybe you see what I don't see. :)

    notices.png
    notices1.png
     
  18. Brogan

    Brogan XenForo Moderator Staff Member

    If you're targeting guests, which are visitors not logged in, then don't select any user group criteria.
    However, I understood you wanted to target registered members who aren't members of a premium group?
    If so, you need to select "User is logged in" and the user group they are currently a member of, or not a member of, depending on how many user groups don't have access.

    For the page criteria you have a node and navigation tab selected.
    Just use the node criteria.
     
  19. Core Freedom

    Core Freedom Well-Known Member

    Did as you said, it's still not working. :-(
     
  20. Andrej

    Andrej Well-Known Member

    Send me your forum password in Conversations, and I take a look. Can't promise anything, but I have a guess on what problem you do have. :)
     
    Core Freedom likes this.

Share This Page