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

XF 1.2 Add custom user field to message user bit

Discussion in 'XenForo Questions and Support' started by Neil E., Oct 8, 2013.

  1. Neil E.

    Neil E. Active Member

    Users>Custom User Fields: Create custom user field.......done
    Basic Information tab: set display location to "preferences".......done
    General Options tab: set viewable in "message user info".......done
    Style Properties: Message Elements: set to "show user custom fields"......done

    The custom field does not show up in the user bit. I can't find any CSS height restriction (the user bit expands to hold the content).

    Has something changed in 1.2x? (worked perfectly in 1.1x)
  2. Brogan

    Brogan XenForo Moderator Staff Member

    They still work fine for me in 1.2.

    Check your style has been updated and is compatible with 1.2 and there are no outdated templates.
  3. Neil E.

    Neil E. Active Member

    Reverted message_user_info just in case a previous edit was at fault, no change.
    Checked for outdated templates, none listed (at time of upgrade to 1.2 several templates had to be manually merged, no problems).
    Checked EXTRA for an errant display: none or anything else to do with the userbit, nothing unusual found.
    Ran a file health check, found two "unexpected contents".
    1) js/xenforo/xenforo.js (small edit to change timing on dropdown)
    2) library/XenForo/ControllerPublic/Forum.php (no idea what is changed)

    Can someone post the contents for the forum.php file from 1.2.2? I'd like to do a diff compare.
  4. Martok

    Martok Well-Known Member

    You can get the original file yourself by re-downloading 1.2.2 from the customer area. :)
  5. Neil E.

    Neil E. Active Member

    Thanks Martok, very good suggestion. I still had the download on hand so it was easy to investigate.

    'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum, false),

    'nodeBreadCrumbs' => $ftpHelper->getNodeBreadCrumbs($forum),

    I remember now that this was an edit Jake pointed out when I wanted a full path in the breadcrumb.
    I doubt it could have any effect on the display of custom user fields.

    More suggestions as to tracking down the problem are welcomed.

    [Perhaps one day I'll learn enough to figure out how I manage to come up with so many unexplained little bits of weird functionality.]
  6. Martok

    Martok Well-Known Member

    For any code changes I make, I always add a comment so that in the future I know what it does. I also have a comment at the start of the code change and one at the end (beginning with the words Start and End) so I know what's been edited. If the edit changes or deletes any original code I will include the original code in the comment too in case I want to revert back at a later stage.
  7. Neil E.

    Neil E. Active Member

    Agreed, I do something similar. I add a comment at the end of each bit of code change describing what it does. Now that I've switched to direct template editing (from the old TMS addon), these comments are more important. As to reverting individual edits, I cut and paste back from the View Custom Changes window (that contains the master code). For completely new templates (that have no master code to highlight changes) keeping documentation is more critical.

    One huge advantage of the old TMS addon was the ability to quickly turn on and off edits to look for issues. Very handy and fast for problem solving.

Share This Page