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

Put User custom field information in post footer

Discussion in 'XenForo Questions and Support' started by the100yen, Mar 22, 2013.

  1. the100yen

    the100yen Member

    I have been checking out the YTTalk forum and they have some nice functions,
    How can I do something similar?


    [​IMG]

    Basically I would like to add social icons like these and also in the red box, it is the channel link to youtube.

    Anyone can help me with this?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    There are already social buttons if you click the #1 at the bottom of the post.

    Youtube channel links can be created manually with BB code. Or to get custom styling in there you may wish to create a custom BB code:

    Admin CP -> Home -> BB Code Media Sites
     
  3. the100yen

    the100yen Member

    Thanks for the reply, however that is not what I am wanting to get

    These icons contains link to that user's social site. so if you are to click the twitter button, it will take you to that user's twitter account.
    Also for the youtube as well. All these settings can be modified from persona detail page.
     
  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Custom user fields? You can edit this template to display custom field values inside of posts:

    Admin CP -> Appearance -> Templates -> message

    Use this variable:

    Code:
    {$message.customFields.field_id}
    
    You must specify the field_id of the custom field.

    Or for the author box of a post it's this template:

    Admin CP -> Appearance -> Templates -> message_user_info

    Code:
    {$user.customFields.field_id}
    
    This obviously gets into the HTML code.
     
  5. the100yen

    the100yen Member

    How can I show those information under each post user make?
    Have you seen YTTalk forum before? They have the setup I want.

    Pretty much what I want is have user type in the youtube channel name in settings, and have that information show up in each post user make just as what is shown in attachment above!

    (By the way, thank you for taking your time for support)
     
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yeah that requires editing the templates as I indicated in my previous post.
     
  7. the100yen

    the100yen Member

    Sorry, can you explain this little bit more for new user...I have no idea what it means...:oops:
     
  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Edit this template:

    Admin CP -> Appearance -> Templates -> message

    Add this code:

    Code:
    {$message.customFields.field_id}
    
    You must specify the field_id of the custom field. Then it will show the value for that custom field for each post when you a view a thread.
     
  9. the100yen

    the100yen Member

    Thanks, but where does user type in their youtube information?
     
  10. ArnyVee

    ArnyVee Well-Known Member

  11. the100yen

    the100yen Member

    Cool, that is helpful. Does anyone know how the youtube custom field should setup? I have no idea what the expression should be...
     
  12. the100yen

    the100yen Member

    Anyone?
     
  13. Tracy Perry

    Tracy Perry Well-Known Member

    Try this (no guarantee it will work)
    Code:
    <a href="http://www.youtube.com/profile.php?id={$valueUrl}" target="_blank"><img src="images/youtube.png" alt="YouTube Profile"/></a>
    The img src= points to an image in my root /images folder on the site (it goes without saying you need to find an image to place somewhere on your system and point it at that).
     
    Jake Bunce likes this.
  14. the100yen

    the100yen Member

    Thanks for the reply!

    I assume this goes under Regular Expresion?
     
  15. Tracy Perry

    Tracy Perry Well-Known Member

    Nope. General Options -> Value Display HTML
     
    Jake Bunce likes this.
  16. the100yen

    the100yen Member

    Man, I got it working! Thank you so much, I had to change one area, but it is fully working!
    You are savior man!;)
     
  17. Tracy Perry

    Tracy Perry Well-Known Member

    Nope... just a newbie that has had to figure that one out before. Trial and Error (and heavy on the Error) is my nickname.:p
     
  18. the100yen

    the100yen Member

    How would I achieve this, I would like to show the user custom field information in every post user make..in the footer...items will be like facebook icon, Youtube icon. etc...
     
  19. Brogan

    Brogan XenForo Moderator Staff Member

  20. the100yen

    the100yen Member

    Yea, sorry about that....can you please delete this thread?
     

Share This Page