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

I WILL learn LOL - listener help?

Discussion in 'XenForo Development Discussions' started by Marc, Mar 5, 2011.

  1. Marc

    Marc Well-Known Member

    Hi Guys,
    Got it into my head tonight I am going to develop for xenforo if it takes me all week to learn how to add hello world (dont worry Im not that bad lol).

    I have created by addon and I want to add something underneith the users avatar on each message. So I have added a Listener to template_hook and created my file in the relevant places. so I have the following:

    class blahblah_Listener_blahblah
    public static function 
    listen($name,&$contents$params,XenForo_Template_Abstract $template)
    $name == "message_user_info_avatar")
    $contents.="Very ugly looking text under the avatar" ;

    What I want to know is based on the above, I now want to add the username under the avatar (yeah I know its there, I just wanna get my head around where Im looking for things). Please could someone give me an idea where I would get this? I have never coded anything online before, however have been learning PHP and I do develop vb.net applications but eclipse is far from my shiny visual studio LOL .... Learnin curve for both xenforo & web programming & php & being shinyIDEless but hell I might as well hit em all with the same bat :D
  2. Arik

    Arik Well-Known Member

    Check out the value of the $params parameter.

    $contents .= print_r($params);
    (In a test install, naturally [​IMG])
  3. Marc

    Marc Well-Known Member

    always a test place :) ... Thankyou for your help

    EDIT:- You are a bloody STAR .... cheers :)

Share This Page