Need this for vbCloud.
Announcement
Collapse
No announcement yet.
Add Custom Profile Fields in Postbit
Collapse
X
-
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!Originally posted by glennrocksvb View PostFYI. 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!
- Top
- Translate
- Bottom
- Likes 1
Comment
-
Sorry, but how to do that please?Originally posted by glennrocksvb View PostIt'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.
Done, sorry.
Didn't know that it was in styles .
nice
- Top
- Translate
- Bottom
Comment
-
Originally posted by glennrocksvb View PostYou 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
- Top
- Translate
- Bottom
Comment
-
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.Originally posted by tenis View PostHello, 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.
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:
And paste this code right underneath it:Code:<li class="b-userinfo__additional-info"><label>{vb:phrase posts}:</label> <span>{vb:raw userInfo.posts}</span></li>
Please note that this if conditional is the only conditional here which will actually work and makes sense.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>
User Settings > Date of Birth > Display Age
- Top
- Translate
- Bottom
- Likes 2
Comment
-
Nope, it can't, I have edited the above post to explain to you how to show the age of a user.Originally posted by tenis View PostHello and thank you very much. It worked.
Can this be done also by CSS additional?
CSS edits are meant for styling purposes only and not for something else.
- Top
- Translate
- Bottom
- Likes 1
Comment
-
Hello, I added also the AGE in Postbit, thanks a lot @zoran_djOriginally posted by glennrocksvb View PostOk, try adding this custom CSS:
Code:.b-userinfo__additional-info:nth-child(3) > span { font-weight: bold; color: red; }
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.
- Top
- Translate
- Bottom
Comment
-
You need to change the ID in your css for both. Just add twice the css for both, ages and locations.Originally posted by tenis View Post
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.
- Top
- Translate
- Bottom
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.
- Top
- Translate
- Bottom
Comment
-
You need to check the field Id , and to be the same on css code.Originally posted by tenis View PostI 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.
- Top
- Translate
- Bottom
Comment
-
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:Originally posted by tenis View PostI 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.
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:{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>
Code:.b-userinfo__additional-info[data-field-label="Location"] span { font-weight: bold; color: red; }
- Top
- Translate
- Bottom
- Likes 1
Comment
Latest Posts
Collapse
-
Reply to some ideas for new modsin Chit Chatby desmomax
I finally created a mod that allows you to add an icon to each post with options for sharing on other platforms. I honestly thought it was absurd that...
Today, 03:59 AM -
Get Affordable and Fast VPS for vBulletin -
by flohseHi Glenn, what do you think about adding "Like Counts" similar to "Like Counts on Postbit and Profile" (when this mod is in use) in...Yesterday, 11:28 PM
-
Reply to push notification prompt?by desmomaxhy glenn
have you thought about this?Yesterday, 05:44 AM

Comment