[Xenforo] How to add icons under User Block

Discussion in 'Xenforo' started by Klaudius, Mar 21, 2012.

  1. Sporty

    Klaudius Member

    Likes Received:
    8
    Software You Use:
    XenForo
    snap0186.png

    - Add this in HTML Value of the custom field and edit it with the appropriate values

    Code:
    <a href="http://www.youtube.com/user/{$valueUrl}" target="_blank"><img src="http://i.imgur.com/0lawG.png" alt="Il mio canale Youtube"/></a>

    You must repeat this step for every field that u want be displayed.

    Remember tu check/uncheck "Display in message"


    - In message_user_info find this code and remove it

    Code:
    {xen:helper userFieldTitle, $fieldId}:



    - Add this in EXTRA.css

    Code:
    .messageUserBlock .userField_facebook, .userField_twitter, .userField_Youtube, .userField_Steam, .userField_xbl, .userField_PSN
     
    {
     
    float: left;
     
    margin-top: 12px !important;
     
    margin-right: -1px !important;
     
    }
    change the .userField_ID with the ID of your field



    the end ;)

    Attached Files:

    • Like Like x 6
  2. Angelic

    Azhria Lilu Barry & Brad Bodyswapping?

    Likes Received:
    1,054
    Software You Use:
    IPB, XenForo
    Thanks for sharing!
  3. Sporty

    Klaudius Member

    Likes Received:
    8
    Software You Use:
    XenForo
    it's a pleasure, this is one of few things that I could do alone :p
  4. DBLDeathDealer New Member

    Likes Received:
    0
    Software You Use:
    IPB, XenForo, myBB
    Minor issue. This is an amazing guide, by the way.

    1) I know the code should work, but for some reason, it is not outputting the images like it should. Is there something else I could have done wrong with the code?
  5. Sporty

    Klaudius Member

    Likes Received:
    8
    Software You Use:
    XenForo
    sorry but I don't understand, what's your problem?
    can u post a screenshot?
  6. DBLDeathDealer New Member

    Likes Received:
    0
    Software You Use:
    IPB, XenForo, myBB
    I fixed it by adding the float: left; inside of the userBlock.css instead of the Extra.css file.

    For some reason, the images on the page where not aligning one after another. They were aligning one after another from top to bottom.

    You can see the fix here now: http://www.thevideogameforum.com
  7. Boner

    Steve M Coder Formerly Known As..

    Likes Received:
    15
    Very nice, I am going to use this but extend on it to benefit my mods I sell.
  8. Adex Fan

    Jluis Member

    Likes Received:
    2
    Software You Use:
    vBulletin, XenForo, myBB
    Thanks for this resource Klaudius
  9. Sporty

    Klaudius Member

    Likes Received:
    8
    Software You Use:
    XenForo
    oh, there's only need to add "!Important" at the float command :p
    thanks for report

    ps
    someone edit the first post please, I can't :confused:
  10. Amused

    Miner Forum Theme designer

    Likes Received:
    8
    Software You Use:
    IPB, vBulletin, XenForo, myBB, phpBB
    Good resource! thanks.:)

Share This Page