lasertits
Active member
Well I've run into another bump in the road, can't get this to work.
Here's what I have going on. I've got a plague_message_bar template, containing:
	
	
	
		
This is added to the message_content hook with the following listener:
	
	
	
		
What I'm basically trying to do, is pull the username of the message author and slap it in my custom plague_message_bar template, rather than having it inside message_user_info.
The group_tags hook is for another listener which adds content AFTER (or to the right of) the username, this will be my next area to tackle once I can get the usernames going, also I should note the group_tags listener is disabled so it shouldn't be affecting my attempts to get the usernames to work.
Here's the error I get on thread / conversation views when it loads my plague_message_bar template:
	
	
	
		
I'm pretty stumped. Where's my mistake(s) in all this?
Thanks
				
			Here's what I have going on. I've got a plague_message_bar template, containing:
		Code:
	
	<xen:require css="plague_message_bar.css" />
<div class="plagueMessageBarContainer">
    <xen:hook name="group_tags" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
        <div class="plagueMessageBarUsername">
            <xen:username user="$user" itemprop="name" rich="true" />
        </div>
    </xen:hook>
</div>This is added to the message_content hook with the following listener:
		Code:
	
	            case 'message_content';
            {
                $mergedParams = array_merge($template->getParams(), $hookParams);
                $pos = strpos($contents, '<div class="messageContent">');
                $contents = substr($contents, 0, $pos) . $template->create('plague_message_bar', $mergedParams) . substr($contents, $pos);
                break;
            }What I'm basically trying to do, is pull the username of the message author and slap it in my custom plague_message_bar template, rather than having it inside message_user_info.
The group_tags hook is for another listener which adds content AFTER (or to the right of) the username, this will be my next area to tackle once I can get the usernames going, also I should note the group_tags listener is disabled so it shouldn't be affecting my attempts to get the usernames to work.
Here's the error I get on thread / conversation views when it loads my plague_message_bar template:
		Code:
	
	Template Errors: plague_message_bar
    Argument 1 passed to XenForo_Template_Helper_Core::helperUserNameHtml() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 1488
    Argument 1 passed to XenForo_Template_Helper_Core::helperRichUserName() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 878
    Argument 1 passed to XenForo_Template_Helper_Core::getUserHref() must be an array, null given, called in /*removed*/library/XenForo/Template/Helper/Core.php on line 1500 and defined in /*removed*/library/XenForo/Template/Helper/Core.php, line 1389
Template Errors: plague_message_bar
    Argument 1 passed to XenForo_Template_Helper_Core::helperUserNameHtml() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 1488
    Argument 1 passed to XenForo_Template_Helper_Core::helperRichUserName() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 878
    Argument 1 passed to XenForo_Template_Helper_Core::getUserHref() must be an array, null given, called in /*removed*/library/XenForo/Template/Helper/Core.php on line 1500 and defined in /*removed*/library/XenForo/Template/Helper/Core.php, line 1389
Template Errors: plague_message_bar
    Argument 1 passed to XenForo_Template_Helper_Core::helperUserNameHtml() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 1488
    Argument 1 passed to XenForo_Template_Helper_Core::helperRichUserName() must be an array, null given in /*removed*/library/XenForo/Template/Helper/Core.php, line 878
    Argument 1 passed to XenForo_Template_Helper_Core::getUserHref() must be an array, null given, called in /*removed*/library/XenForo/Template/Helper/Core.php on line 1500 and defined in /*removed*/library/XenForo/Template/Helper/Core.php, line 1389I'm pretty stumped. Where's my mistake(s) in all this?

Thanks
 
 
		 
 
		

 
 
		 
 
		 
 
		 
 
		 
 
		
 
 
		 
 
		 
 
		 
 
		