The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Using custom fields on member.php
Hi to everyone, i'm trying to use custom fields variables in member.php, what hook can i use? And what should be the name of each variable?
I mean in postbit you can use $post['fieldx'] To show the field of the user that is viewing you can use $vbulletin->userinfo['fieldx'] What can i use to show the custom field of the user that i'm viewing on member.php? --------------- Added [DATE]1347303571[/DATE] at [TIME]1347303571[/TIME] --------------- No one? |
#2
|
||||
|
||||
Bump
|
#3
|
|||
|
|||
I didn't use a hook but edited the template directly. Don't know if that is any help for you.
Bare with me as I am not a Pro in coding but here is some code I used to show 2 custom fields in the "About Me" tab under "statistics". I had to edit the "memberinfo_block_statistics" template and used this code: Code:
<h5 class="subblocksubhead subsubsectionhead">Last 2 Meetings attended:</h5> <dl class="blockrow stats"> <dt>Meeting 1</dt> <dd>{vb:raw userinfo.field16}</dd> </dl> <dl class="blockrow stats"> <dt>Meeting 2</dt> <dd>{vb:raw userinfo.field19}</dd> </dl> |
#4
|
||||
|
||||
Thanks very much for your reply qpurser , actually i'm not sure if this can can really help me since i need to see my code (in another computer), just a little question, doesn't {vb:raw userinfo.fielex} supposed to show the field of the user that is viewing the page instead of the field of the user's profile that you're viewing?, are you sure it works? Thank you again
|
#5
|
|||
|
|||
Quote:
Not sure if I understood you well but let me explain what I did to verify: Info from the adminCP: Test User: Meeting 1 = 2012-09-02 and Meeting 2 = 2011-07-01 Test Member: Meeting 1 = 06-18-2012 and Meeting 2 = 05-19-2010 When I am logged in as "test user": Looking at my own profile the info from those 2 fields is 2012-09-02 and 2011-07-01 Looking at the profile from Test Member the info is 06-18-2012 and 05-19-2010 Looking at the profile from another user who had nothing in those fields nothing shows up in his profile. Hope that was the info you were looking for |
#6
|
||||
|
||||
Yes that was, thank you i wi'l try if i can comes up with something using $vbulletin->userinfo['fieldx'] (equivalent of {vb:raw bbuserinfo.fieldx}) as soon as i can
--------------- Added [DATE]1347495350[/DATE] at [TIME]1347495350[/TIME] --------------- Good news! I figure this out! Thanks anyway for your help i don't know why but it motivates me Hook: userprofile_create Variable: $this->userinfo['fieldX'] (and $this->registry->options['ur_option'] to use an option) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|