Announcement

Collapse
No announcement yet.

Add Custom Profile Fields in Postbit

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by zoran_dj View Post

    We can tell the system to change only location color, and we can do that like this, first you need to edit your user profile field location template like this:

    Code:
    {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
    
    <vb:if condition="$userInfo['field2']"><li class="b-userinfo__additional-info" data-field-label="{vb:phrase field2_title}"><label>{vb:phrase field2_title}:</label> <span>{vb:raw userInfo.customFields.default.field2_title.val}</span></li></vb:if>
    With this change we have added the data field label which will be called Location if your user profile field for location is field2, then we can color it like this:

    Code:
    .b-userinfo__additional-info[data-field-label="Location"] span {
    font-weight: bold;
    color: red;
    }
    It is working for English language. If I change the language it is without color.
    I try to add a code containing the "Location" in Romanian: "Locație" . But without success.

    Thank you

    Comment


      If the code under doesn't work, then you have done something wrong because it must work if this CSS class is the only CSS class in your css_additional.css template:

      Code:
      .b-userinfo__additional-info[data-field-label="Locație"] span {
      font-weight: bold;
      color: red;
      }

      Comment


        For some reason the special character "ț" is creating problems.
        I had to change the translation from Locație to Locatie to make it works.


        The special character ț will become & # 5 3 9 ; after saving CSS Additional and it will not be recognised.

        Without the special character it is working as expected.

        Comment


          Try changing that letter with a CSS code if you want to use Locație:

          Code:
          https://unicode-table.com/en/021B/
          https://www.w3.org/International/questions/qa-escapes

          Comment


            Originally posted by zoran_dj View Post
            Try changing that letter with a CSS code if you want to use Locație:
            Thank you again. Solved.

            Comment

            Working...
            X