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

Add extra stuff to Message Elements

Brogan

XenForo moderator
Staff member
#2
You will need an add-on to do that.

The only supported elements are available in Style Properties -> Message Elements
 
#3
Can I do manually in message_user_info template?

In this template I can see the variable $user.identities, thats appears to be an array with this info (Facebook, twitter, MSN, etc), am I right?

I also can see this code:

PHP:
<xen:foreach loop="{$user.identities}" key="$service" value="$account">
   <dl class="pairsInline">
      <dt>{$service}</dt>
      <dd>{$account}</dd>
   </dl>
</xen:foreach>
Why don't work? I removed the <xen:comment> above and the </xen:comment> below...
 

Brogan

XenForo moderator
Staff member
#4
I haven't tested that myself but it's possible that data isn't exposed correctly to work in the message_user_info template.
 
#5
I tested it and $user.identities appears to be a string (a serialized string, it seems) when print it:
Code:
a:3:{s:8:"facebook";s:9:"60X4X8X18";s:3:"msn";s:23:"kXmXkaXe0XX@hotmail.com";s:8:"XboxLive";s:6:"x7iBiT";}
The problem is that the code I put in the post above processes this variable as an array. Perhaps it might work if previously unserialize $user.identities, but I don't know where make it, beacause templates don't accept PHP code...

PD: Sorry for my "apache" english ;)
 

Cezz

Well-known member
#6
I tested it and $user.identities appears to be a string (a serialized string, it seems) when print it:
Code:
a:3:{s:8:"facebook";s:9:"60X4X8X18";s:3:"msn";s:23:"kXmXkaXe0XX@hotmail.com";s:8:"XboxLive";s:6:"x7iBiT";}
The problem is that the code I put in the post above processes this variable as an array. Perhaps it might work if previously unserialize $user.identities, but I don't know where make it, beacause templates don't accept PHP code...

PD: Sorry for my "apache" english ;)
The code is currently commented out in the template, I think it is planned future feature but like you said the identities is currently serialised and you would either need to have an add-on that unsterilises the data or wait until the feature is added.