vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Displaying Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=288491)

TheSupportForum 09-30-2012 09:44 AM

Displaying Profile Fields
 
Does anyone know how to display Profile Fields in threads, below Join Date & Posts ?

http://img141.imageshack.us/img141/8...cf9b19baad.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

Quote:

Originally Posted by ForumsMods (Post 2369757)
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:
Code:

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

{vb:raw conversation['userinfo']['joindate']}
So my guess is...

Code:

{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

Quote:

Originally Posted by ForumsMods (Post 2369854)
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

Quote:

Originally Posted by BirdOPrey5 (Post 2369887)

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....46&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:
Code:

{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:
Code:

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

Quote:

Originally Posted by nhawk (Post 2372589)
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:
Code:

{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:
Code:

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


All times are GMT. The time now is 07:22 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01506 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (14)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete