I WILL learn LOL - listener help?

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:

PHP:
<?php
class blahblah_Listener_blahblah
{
public static function listen($name,&$contents, $params,XenForo_Template_Abstract $template)
	{
		if($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
 
Check out the value of the $params parameter.

PHP:
$contents .= print_r($params);

(In a test install, naturally
wink.png
)
 
always a test place :) ... Thankyou for your help

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