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

Adding HTML below the signature.

mjda

Active member
#1
I've been looking, unsuccessfully, for a way to add some HTML below the signature on all posts. I need to put it after the signature, but before the 'messageMeta'.

If anyone could help me figure this out, it'd be greatly appreciated.
 

Chris D

XenForo developer
Staff member
#2
Quick and easy way:

Admin CP > Appearance > Templates

Title: message

In that template you will see:

Code:
		<xen:if is="{$visitor.content_show_signature} && {$message.signature}">
			<div class="baseHtml signature ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
		</xen:if>
Directly below you can add your HTML.
 

mjda

Active member
#3
Sorry, I should have been more clear. I'm looking for a way to do it like an addon because the HTML will change for every member. I have the template for it built, which I have to pass additional parameters to, but haven't been able to figure out how to add it yet. I tried making a event code listener at the 'message_content' hook and changing the value of '$message.signatureHtml', but it doesn't then carry on to the signature part of the 'message' template.

I know it's working, because if I set the script to simply echo the altered '$hookParams['message']['signatureHtml']' to me it looks right. However, what is echoed to me isn't what is showed in the actual signature area of the posts.
 

mjda

Active member
#5
I'll give it a look, but I think that addon adds the ad under the 'messageMeta'. Thanks, though. The more I look at this, the more I think I'll probably just have to edit the message template, which I really don't want to have to do. :confused: