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

XF 1.2 Adding custom fields to signatures

Discussion in 'Styling and Customization Questions' started by WhoIsDo, Apr 25, 2014.

  1. WhoIsDo

    WhoIsDo Active Member

    I'm rather familiar with adding custom fields into the Message User Info section, but is it possible to add them into a user's signature instead?
  2. Sheldon

    Sheldon Well-Known Member

    Can't you just add it to the template for signatures manually?
  3. WhoIsDo

    WhoIsDo Active Member

    I'm probably just asking incorrectly, so my apologies for that.

    Essentially, I'm just looking to have it so that when a user fills out X, Y, & Z fields in their profile... I can add code (like I do manually now) into a template for the signature. I think it'll be fairly easy, but I'm just not sure what template to use. Any advice?
  4. Sheldon

    Sheldon Well-Known Member

    Isn't it the message template? I haven't messed with any lately, so not certain.
  5. WhoIsDo

    WhoIsDo Active Member

    I'll try messing around with that today and tomorrow. If you happen to find out if it's that section specifically or another, please let me know. Thanks either way, Sheldon!
  6. Sheldon

    Sheldon Well-Known Member

    It's towards the bottom:

            <xen:if is="{$visitor.content_show_signature} && {$message.signature}">
                <div class="baseHtml signature messageText ugc{xen:if $message.isIgnored, ' ignored'}"><aside>{xen:raw $message.signatureHtml}</aside></div>
            {xen:raw $messageAfterTemplate}
    I assume that is the area you are looking for.
    WhoIsDo likes this.
  7. Jeremy

    Jeremy Well-Known Member

    @Douglas Veney (and I guess @Sheldon), came across this thread while helping someone else out and thought I'd provide the quick and dirty solution (no styling):
    {xen:helper userFieldTitle, 'your_id'}: {xen:helper userFieldValue, {$userFieldsInfo.your_id},  $message, {$message.customFields.your_id}}
    Replace your_id with the id of the profile field (all 3 are the same).

    note: this only works in the message template.
    CaptainMorgan likes this.

Share This Page