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

XF 1.2 How to use user details in the templates

Discussion in 'Styling and Customization Questions' started by Enguerran A, Jan 24, 2014.

  1. Enguerran A

    Enguerran A Well-Known Member

    Hello there,

    I would like to use some personnal details in my custom templates, for example add the Youtube Channel, the Twitter account (why not th las tweets of everyone) etc... but I don't know which code I have to enter :/ I know how to add options but not how to use it and it's quite frustrating.

    Is there a special syntax to add for this kind of usage?
     
  2. katsulynx

    katsulynx Well-Known Member

    CSS is a stylesheet language. I can't possibly imagine how to use a YouTube-Channel or Twitter account information in there.
     
  3. Enguerran A

    Enguerran A Well-Known Member

    nah, my bad, I wanted to say in the templates ^^' I'm a little tired at the moment :'( too much work and not enough cafeine
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Perhaps if you post a mockup of what it is you are trying to do, we may be able to help.

    It's not clear at the moment.
     
  5. Enguerran A

    Enguerran A Well-Known Member

    The point is that I'm on a mac at the moment and I'm not accustomed to it ^^' I don't even know how to find something to modify an image but changing my title will make the deal (I hope)

    [​IMG]
    I want to include some details in this header, add something social to the forum :)
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    Edit the Twitter custom user field, mark it as "viewable in message info" and then edit your Message Property style properties to show custom fields.
     
  7. Enguerran A

    Enguerran A Well-Known Member

    I'll try this way but I was thinking of something giving more control to where I want this twitter account to be. Is there a way to create something like that <xen:twitteruser user="$user" twitter="twitter" />.
     
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    xen:twitteruser doesn't exist.

    It is stored within $user.customFields.twitter or $visitor.customFields.twitter.
     

Share This Page