The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Display User Profile Fields Info in Thread Post
I have 6 user profile fields setup. All 6 show up in the "Edit User Profile" area for each member to fill in if they wish.
I would like at least one of these user profile fields to be displayed along with a members avatar, reputation, post count stats each time they post a reply in a thread. This information used to be displayed...and now has somehow disappeared. I can't seem to find the Admin control panel setting to allow this user profile info to be displayed each time they post a reply to a thread. Can someone please point me where this setting is located? Thank You |
#2
|
|||
|
|||
Add this to your postbit or postbit_legacy template
<vb:if condition="$post['fieldX']"><dt>XXXXXXXXX</dt> <dd>{vb:raw post.fieldX}</dd></vb:if> Get X from the custom userfield. |
#3
|
|||
|
|||
Quote:
Do I just add that line of code anywhere in the postbit_legacy template...at the end for example? And this will allow me to be able to display some extra user profile info below a members avatar, reputation, and post counts stats? Thanks again. |
#4
|
|||
|
|||
Add it after the post count in postbit_legacy template.
Or instead of modifying templates, simply create a new plugin at hook location postbit_display_complete and add the following: Code:
if ($post['fieldX']) { $template_hook['postbit_userinfo_right_after_posts'] .= "<dt>PHRASE TO DISPLAY</dt> <dd>" . $post['fieldX'] . "</dd>"; } |
#5
|
|||
|
|||
I wanted to be 100% sure I described what I want to do.
Here's screenshot of the info I want to show up with each thread post a member makes: I want both the red arrow & purple arrow item's in the screenshot above to be displayed here below the "normal" info that is displayed with each members thread post (purple arrow, 2nd screenshot below): Thank you. --------------- Added [DATE]1534527978[/DATE] at [TIME]1534527978[/TIME] --------------- Quote:
- "Your Mac's Specs" (red arrow) - And the info the user enters into the field (purple arrow) Does the line of code you mentioned to add to the postbit_legacy template still do the trick? Thanks --------------- Added [DATE]1534528134[/DATE] at [TIME]1534528134[/TIME] --------------- Quote:
- "Your Mac's Specs" (red arrow) - And the info the user enters into the field (purple arrow) Does the code you mentioned for creating a new plugin still do the trick? Thanks |
#6
|
|||
|
|||
Yes, the plugin does exactly that. Just change the X in fieldX to whatever field number you have in user profile fields manager https://www.yourdomain.com/admincp/p....php?do=modify
|
#7
|
|||
|
|||
Quote:
So just to make sure I understand 100%. If I take the line of code you mentioned earlier to create a new plug-in with: if ($post['fieldX']) {$template_hook['postbit_userinfo_right_after_posts'] .= "<dt>PHRASE TO DISPLAY</dt> <dd>" . $post['fieldX'] . "</dd>";} * I need to enter the proper user profile field where the 'fieldX' statement is located? * What do I enter in the PHRASE TO DISPLAY part of the code? In the 1st screenshot I posted above...would this be the phrase "Your Mac's Specs"? Thanks again. |
#8
|
|||
|
|||
Yes, for both the questions.
|
#9
|
|||
|
|||
Awesome! Will give this a try shortly. Haven't created a plug-in before. Will post how it goes.
Thanks --------------- Added [DATE]1534562837[/DATE] at [TIME]1534562837[/TIME] --------------- Hey iA1. I believe I did everything correctly...but the user profile info I would like to display is not displaying. Here's a screenshot of the plugin I created. As you can see it is "active". Only input area I wasn't sure about was the "Execution Order". For some reason it came up with a default setting of "5"...so I didn't change it. If that wouldn't have caused any issue's...what else might I try? Thanks |
#10
|
|||
|
|||
Clear cache and check again. Which vB version are you using?
If it doesn't work, then edit the template and use the code given by snakes1100. Search for postbit_userinfo_right_after_posts in postbit_legacy template and add the code just above or below that line. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|