PDA

View Full Version : Displaying Profile Fields


TheSupportForum
09-30-2012, 09:44 AM
Does anyone know how to display Profile Fields in threads, below Join Date & Posts ?

http://img141.imageshack.us/img141/8922/a3402f2e27e14cf9b19baad.png

nhawk
09-30-2012, 12:19 PM
There are currently no hooks to add info where you want to in Beta 10 or 11.

ForumsMods
09-30-2012, 02:56 PM
A new template hook was added for next release.
For the moment, you can edit the template manually or modify the template cache.

TheSupportForum
09-30-2012, 04:09 PM
A new template hook was added for next release.
For the moment, you can edit the template manually or modify the template cache.

thx for that but it still doesnt answer my question

whats the code for it

{vb:raw userinfo.field8}
{vbrawphrase customerfield.field8}

which is what i am asking, as i have looked through the code and can't find a solution for manual entry

BirdOPrey5
09-30-2012, 09:06 PM
Well the template is: conversation_userinfo

And in that template current posts are:
{vb:raw conversation['userinfo']['posts']}

Current join date is:
{vb:raw conversation['userinfo']['joindate']}

So my guess is...

{vb:raw conversation['userinfo']['field8']}

But not tested

ForumsMods
09-30-2012, 09:27 PM
I tought the same, but... the fields are not included in conversation variable.

BirdOPrey5
09-30-2012, 09:49 PM
I tought the same, but... the fields are not included in conversation variable.

I'm half tempted to call it a bug and JIRA it... being in past VB versions everything about the user was accessible via $post... i'd expect the same out of $conversation.

ForumsMods
09-30-2012, 10:07 PM
I agree, fields are part of user's information (userinfo).
Currently only user table is included, I think they forgot to join userfield table.

I hope it is not by design.

BirdOPrey5
10-01-2012, 12:15 AM
<a href="http://tracker.vbulletin.com/browse/VBV-5021" target="_blank">http://tracker.vbulletin.com/browse/VBV-5021</a>

TheSupportForum
10-01-2012, 06:32 AM
http://tracker.vbulletin.com/browse/VBV-5021

thxs lets hope they sort this out in next release

TheSupportForum
10-10-2012, 02:41 PM
and info on how to add custom profile fields to conversation_userinfo yet ?

in the hooks and manual entry if possibe please

this is going back to the previous convo here
https://vborg.vbsupport.ru/showpost.php?p=2369846&postcount=5

BirdOPrey5
10-12-2012, 10:57 AM
You can check up on the bug report: http://tracker.vbulletin.com/browse/VBV-5021

There won't be a fix until the "Fix Version" on that page is listed as a released version number (Alpha 14 for example.)

On the plus side it was recently revised up in priority but no estimate when it will happen.

Also, there are no "hooks" in VB5 so there will never be a "hooks" way of doing things anymore.

There will only be template edits or file extensions.

nhawk
10-12-2012, 08:02 PM
Since they added a template hook to the conversation_userstats template this is possible in Beta 13.

In this example, the 'Location' field will be displayed.

1) Create a new template. In this example I'll use the name TestTemplate.
Product: vBulletin (or your product)
Style: Default (or your style)
Title: TestTemplate
Template:
{vb:data posterinfo, user, fetchUserinfo, {vb:raw posterid}}
{vb:raw posterinfo.field2}


2) Go to ACP->Products & Hooks->Manage Hooks and click 'Add New Hook'.
Product: vBulletin (or your product)
Hook Location: conversation_userstats
Title: Test Hook
Execution Order: 10
Template Name: TestTemplate
Hook Arguments:
posterid=conversation.userid


Click Save

Refresh a thread in your forum and you'll see the Location being displayed for each poster.

There IS a drawback with this method. A database query is added for EVERY POST in a thread. That is not good, and I would wait for the JIRA report mentioned above to be fixed.

TheSupportForum
10-13-2012, 10:49 AM
Since they added a template hook to the conversation_userstats template this is possible in Beta 13.

In this example, the 'Location' field will be displayed.

1) Create a new template. In this example I'll use the name TestTemplate.
Product: vBulletin (or your product)
Style: Default (or your style)
Title: TestTemplate
Template:
{vb:data posterinfo, user, fetchUserinfo, {vb:raw posterid}}
{vb:raw posterinfo.field2}
2) Go to ACP->Products & Hooks->Manage Hooks and click 'Add New Hook'.
Product: vBulletin (or your product)
Hook Location: conversation_userstats
Title: Test Hook
Execution Order: 10
Template Name: TestTemplate
Hook Arguments:
posterid=conversation.userid
Click Save

Refresh a thread in your forum and you'll see the Location being displayed for each poster.

There IS a drawback with this method. A database query is added for EVERY POST in a thread. That is not good, and I would wait for the JIRA report mentioned above to be fixed.



thank you, this was the info i needed, i will do some tests today