How to make visible the profile field's under avatar, in the left side of posting?
Profile field's
Collapse
X
-
THIS article shows you how to do that in vB5.MARK.B
vBulletin Support
------------
My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
My Unofficial vBulletin Cloud Demo: https://www.adminammo.com -
You don't need to worry about the code fix part of the post.....it's obsolete.
These are the bits you need to worry about:
First make sure your hook system is active (it is turned off by default). Go to Admincp > Settings > Products/Hook System > Enable/Disable Hook System > Yes.
Now, go to Admincp > Products & Hooks > Manage Hooks and click the link that says "[Add New Hook]". In that new hook, set the following:Hook is Active: Yes
Hook Location: conversation_userstats
Title: Show Profile Fields in Postbit
Template Name: conversation_fields
Hook Arguments: conversation=conversation
SAVE
Now go to Admincp > Styles & Templates > Style Manager > Add New Template and on that page, set the following:Title: conversation_fields
Template:
Code:{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
For each field you want shown, you will need to add this code under that line:Code:<vb:if condition="$userInfo['fieldX']"><li><label>{vb:phrase fieldX_title}:</label> <span>{vb:raw userInfo.customFields.default.fieldX_title.val}</span></li></vb:if>
Replace the X in "FieldX" (three times) with the fieldid and, if your field is in a Category other than Uncategoried, then replace "default" with "categoryY_title" where Y is the category id.
So, for instance, say I have the following I want to add:Name Category
field5 (uncategoried)
field7 New Cat(id 1)
Then my template would look like this:Code:{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}} <vb:if condition="$userInfo['field5']"><li><label>{vb:phrase field5_title}:</label> <span>{vb:raw userInfo.customFields.default.field5_title.val}</span></li></vb:if> <vb:if condition="$userInfo['field7']"><li><label>{vb:phrase field7_title}:</label> <span>{vb:raw userInfo.customFields.category1_title.field7_title.val}</span}</li></vb:if>
That's it!MARK.B
vBulletin Support
------------
My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
My Unofficial vBulletin Cloud Demo: https://www.adminammo.comComment
-
The details are all in the instructions. There's two parts to it: adding a hook, and adding a new template.
The new template is called conversation_fields, and you put the code in that it states in the instructions.
You need to replace x in the code with the id of your profile field, which you can find by looking in the profile field manager.
The original link I posted has some screenshots about finding the id number.
There is an example bit of code in the instructions too.MARK.B
vBulletin Support
------------
My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
My Unofficial vBulletin Cloud Demo: https://www.adminammo.comComment
-
I've got new template 'conversation_fields' completely like default template, concerning of the content. Which subtitle in new template I should choose to write there the code.
Here is a part of my code:
{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
<vb:if condition="$userInfo['field4']"><li><label>{vbhrase field4_Beruf}:</label> <span>{vb:raw userInfo.customFields.default.field4_Beruf.val}</span></li></vb:if>
<vb:if condition="$userInfo['field7']"><li><label>{vbhrase field7_Weltanschauung}:</label> <span>{vb:raw userInfo.customFields.default.field7_Weltanschauung.val}</span></li></vb:if>
<vb:if condition="$userInfo['field8']"><li><label>{vbhrase field8_Politische Ansichten}:</label> <span>{vb:raw userInfo.customFields.default.field8_Politische Ansichten.val}</span></li></vb:if>
Comment
-
I assume it was my mod If so, I'm glad it helped you. For those who wants the same, you can go to vb org at
Show Thread Enhancements - [vBMods.rocks] Add Custom Profile Fields in Postbit - vBulletin.org ForumShow Thread Enhancements - [vBMods.rocks] Add Custom Profile Fields in Postbit vBulletin 5.x Products & Extensions
and also in my site
By default, vBulletin 5 only displays the Join Date and Post count in the postbit area (avatar and username section) in the thread view of a topic. There may be other tutorials out there to add custom fields in postbit but some require you to edit the existing postbit template. Editing existing templates is not good for
The mod does not require editing existing templates. You just have to upload the XML file and configure what custom fields to show and you're done.
Comment
Related Topics
Collapse
-
by klongdesignsSo I'm trying to add the user's location (field2) into the conversation_userinfo template. I'm using a hook to hook into this and have the following code in the new template:
Code:{vb:data userInfo,
-
Channel: Support Issues & Questions
-
-
by GuestI like the idea of having the breadcrumbs on the top of the page, but I would also like to have them at the bottom of the page.
With vB5 it is very simple to do. I love the way hooks work....-
Channel: vBulletin 5 Tutorials
-
-
by TheBishI followed the instructions here to modify my postbit with custom user profile fields... https://www.vbulletin.com/forum/blog...-to-s/3971574-[vb5]-user-profile-fields-in-the-postbit-templates...1 Photo
-
Channel: Support Issues & Questions
-
-
by unixmanQuick templating question. In the template markup below, I create a new array called "testArr", and attempt to populate it by calling array_merge. The first debug statement shows a properly...
-
Channel: Support Issues & Questions
-
-
by sergiomcHello, i create a new custom profile field, but no get code..
This is my code:
{vb:data userInfo, user, fetchProfileInfo, {vb:raw conversation.userid}}
<vb:if...-
Channel: Support Issues & Questions
-
Comment