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

Listener in XenForo_ControllerPublic_Misc->actionContact()

Discussion in 'XenForo Development Discussions' started by ragtek, Oct 7, 2010.

  1. ragtek

    ragtek Guest

    Hi.

    I'd like to create an thread, when somebody sends the contact formular instead of sending the mail.

    So i think i have to create my own method/ override the existing actionContact in the ControllerPublic_Misc Class.

    How can i do this with the new eventListeners?
     
  2. Shadab

    Shadab Well-Known Member

  3. ragtek

    ragtek Guest

    thx, that's what i tried allready, but i'm getting an error "Please enter a valid callback method."
    Here's my file:
    PHP:
    class Ragtek_ContactThread_EventListener_createThread
    {
        public static function 
    listen($class, array &$extend)
        {
            if (
    $class == 'XenForo_ControllerPublic_Misc')
            {
                
    $extend[] = 'Ragtek_ContactThrad_ControllerPublic_Misc';
            }
        }
    }
     
  4. ragtek

    ragtek Guest

    Oh:(

    Nevermind, there are some nameproblems, i think they are the problem:D
     
  5. Kier

    Kier XenForo Developer Staff Member

    And there was me coming into this thread expecting to find an SQL injection flaw. Silly me ;)
     
  6. Digital Doctor

    Digital Doctor Well-Known Member

    Google too.
    especially when you put the word SQL in a post in the thread with the word injection.
    :)
     
  7. Vladislav Rastrusny

    Vladislav Rastrusny Active Member

    Shouldn't this post get renamed? I came here scared to death ;)
     
  8. Kier

    Kier XenForo Developer Staff Member

    Renamed.
     
    Vladislav Rastrusny likes this.

Share This Page