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

How do I make a custom error

Discussion in 'XenForo Development Discussions' started by Matthew Hawley, Dec 14, 2013.

  1. Matthew Hawley

    Matthew Hawley Well-Known Member

    So I made this addon that makes a user check a box before he can edit the thread title. (demonstration here)

    If a user doesn't check the box and clicks create thread they will get this:

    [​IMG]

    But I want them to get this:

    [​IMG]

    Any suggestions? :)
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Look at how $errorPhraseKey is used.
     
  3. Matthew Hawley

    Matthew Hawley Well-Known Member

    Umm....maybe more details? :)

    @Chris Deeming could you help?
     
    Last edited: Dec 14, 2013
  4. Matthew Hawley

    Matthew Hawley Well-Known Member

    I'm sorry but I don't know what to do. Where is $errorPhraseKey? Can you give me a tut or something?
     
  5. Wuebit

    Wuebit Well-Known Member

    Would you really want to force people to tick this box everytime they made a post? I know if I was a member on a forum with this it would discourage me posting.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Search for it in your IDE.
     
  7. Matthew Hawley

    Matthew Hawley Well-Known Member

    Its for a coding forum. Sometimes people post questions in the wrong forum.
     
  8. Matthew Hawley

    Matthew Hawley Well-Known Member

    Can someone give me a tutorial?
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    Code:
    public function something(array $thing, &$errorPhraseKey = '')
    {
    .
    .
    .
    $errorPhraseKey = 'error_phrase';
    }
     
  10. Matthew Hawley

    Matthew Hawley Well-Known Member

    I'm sorry if I am bothering you but could you tell me where to put that?
     
  11. Brogan

    Brogan XenForo Moderator Staff Member

    In your function.
     

Share This Page