Need this for vbCloud.
Announcement
Collapse
No announcement yet.
Add Custom Profile Fields in Postbit
Collapse
X
-
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
-
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
-
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:
Code:<li class="b-userinfo__additional-info"><label>{vb:phrase posts}:</label> <span>{vb:raw userInfo.posts}</span></li>
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
-
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
-
Originally 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
-
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
-
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
-
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.
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
Users Viewing This Page
Collapse
There is 1 user viewing this forum topic.
- Guest
Latest Posts
Collapse
-
by matoseHi guys,
Just migrated to vB Cloud and found your forum searching for some customizations.
Nice to meet you!
m...Yesterday, 01:25 AM -
Reply to Quick Topic Moderationby glennrocksvbCheck core/vb/api/node.php and find the closeNode function. If you are using the compressed PHAR version of the vB5 package, you will not see the api...Yesterday, 12:00 PM
Comment