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

    #91
    Need this for vbCloud.

    Comment


      #92
      Originally posted by glennrocksvb View Post
      FYI. I've also added the Country custom profile field in the postbit on this site and it displays the corresponding flag image icon. Please feel free to update your Country in the User Settings if you want. I will release an upgrade to this mod once I know everything is working fine. Thanks!
      glennrocksvb
      Founder/Coder
      glennrocksvb Did you ever have time to build an upgrade to this mod that allows icons in the postbit? I like the way you have the layout here. Cheers mate!

      Comment


        #93
        This is a great modification. Is there any way to have them in bold? I mean the 'join date', 'occupation' etc? I found a code somewhere else, but it makes everything bold in the postbit. I am just looking for the main words to be in bold. Is that all possible?

        Comment


          #94
          Originally posted by glennrocksvb View Post
          It's hardcoded in the template. You can edit hook_profile_fields_postbit template to change it. This was one of the very first few mods I created when I started doing this. I didn't make it to use the phrase system yet.
          Sorry, but how to do that please?

          Done, sorry.
          Didn't know that it was in styles .
          nice

          Comment


            #95
            Originally posted by glennrocksvb View Post
            You can edit the template used in this mod (not recommended to edit existing vB templates) to accomodate the display of country custom field value as flag images.

            Could you please write more about this (how to do it). Or if there is a paid mod somewhere then link to this.

            Thanks in advance

            Comment


              #96
              Hello, how can I add the "age" in the Postbit.
              I want to create a new "User Profil Field", age, but I don't know how.

              Comment


                #97
                Originally posted by tenis View Post
                Hello, how can I add the "age" in the Postbit.
                I want to create a new "User Profil Field", age, but I don't know how.
                There is an option for that which doesn't work in the latest version anymore because the code in the template is erased for some reason.

                Settings > Options > Topic Display Options > Post Elements > Display Age

                Your only chance is to add this manually to your conversation_userinfo template like this, first find this code:

                Code:
                                <li class="b-userinfo__additional-info"><label>{vb:phrase posts}:</label> <span>{vb:raw userInfo.posts}</span></li>
                And paste this code right underneath it:

                Code:
                                {vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
                                <vb:if condition="$userInfo['showbirthday'] == 1">
                                <li class="b-userinfo__additional-info"><label>{vb:phrase age}:</label> <span>{vb:raw userInfo.age}</span></li>
                                </vb:if>
                Please note that this if conditional is the only conditional here which will actually work and makes sense.

                User Settings > Date of Birth > Display Age

                Comment


                  #98
                  Hello and thank you very much. It worked.
                  Can this be done also by CSS additional?

                  Comment


                    #99
                    Originally posted by tenis View Post
                    Hello and thank you very much. It worked.
                    Can this be done also by CSS additional?
                    Nope, it can't, I have edited the above post to explain to you how to show the age of a user.

                    CSS edits are meant for styling purposes only and not for something else.

                    Comment


                      Many thanks. It worked well with this code:

                      Code:
                       <vb:if condition="$userInfo['showbirthday'] == 2" OR "$userInfo['showbirthday'] == 4" >
                                      <li class="b-userinfo__additional-info"><label>{vb:phrase age}:</label> <span>{vb:raw userInfo.age}</span></li>
                                      </vb:if>

                      Comment


                        Click image for larger version

Name:	age.jpg
Views:	280
Size:	109.9 KB
ID:	21559
                        Originally posted by glennrocksvb View Post
                        Ok, try adding this custom CSS:
                        Code:
                        .b-userinfo__additional-info:nth-child(3) > span {
                        font-weight: bold;
                        color: red;
                        }
                        Hello, I added also the AGE in Postbit, thanks a lot @zoran_dj
                        The location supposed to be colored by the above CODE, but now the Location is no longer 3rd field anymore. Sometimes is the 4th field, if the user has choose to display Age.

                        So now I have for some profiles the Location colored and for other is the Age colored.
                        Can I fix this somehow? Thank you.

                        Comment


                          Originally posted by tenis View Post
                          Click image for larger version

Name:	age.jpg
Views:	280
Size:	109.9 KB
ID:	21559

                          Hello, I added also the AGE in Postbit, thanks a lot @zoran_dj
                          The location supposed to be colored by the above CODE, but now the Location is no longer 3rd field anymore. Sometimes is the 4th field, if the user has choose to display Age.

                          So now I have for some profiles the Location colored and for other is the Age colored.
                          Can I fix this somehow? Thank you.
                          You need to change the ID in your css for both. Just add twice the css for both, ages and locations.

                          Comment


                            I added the custom fields (location and ocupation) with this extension. But I added AGE with template modification.
                            With the code above I colored the 3th field which supposed to be Location.
                            But when a user has set the "Age" to be shown, then Location will be 4th and Age will be colored by the CSS code.

                            Comment


                              Originally posted by tenis View Post
                              I added the custom fields (location and ocupation) with this extension. But I added AGE with template modification.
                              With the code above I colored the 3th field which supposed to be Location.
                              But when a user has set the "Age" to be shown, then Location will be 4th and Age will be colored by the CSS code.
                              You need to check the field Id , and to be the same on css code.

                              Comment


                                Originally posted by tenis View Post
                                I added the custom fields (location and ocupation) with this extension. But I added AGE with template modification.
                                With the code above I colored the 3th field which supposed to be Location.
                                But when a user has set the "Age" to be shown, then Location will be 4th and Age will be colored by the CSS code.
                                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" [COLOR=#FF0000]data-field-label="{vb:phrase field2_title}"[/COLOR]><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;
                                }

                                Comment

                                Latest Topics

                                Collapse

                                Working...
                                X