PDA

View Full Version : "Real Name" does not appear in user fields


BULLDOG
02-05-2014, 07:33 AM
Hi!

I'm the Admin on the Pipesmoker Unlimited forum, currently running vBulletin 4.2.1

In the ACP, in the User Profile Manager, I have added a new user profile field:

"Real Name"

I want the "Real Name" to appear under the user names on forum level (under the avatar).

"Location" IS displayed but not "Real Name".

How do I make "Real Name" appear??

Note: I have read this thread: click (https://vborg.vbsupport.ru/showthread.php?t=297041)

But what puzzles me is that "Location" is present in the user fields, but not present when you check the templates. What I need is to have both "Location" and "Real name" in the user fields together with their post count etc.

kh99
02-05-2014, 01:22 PM
You are looking at a vb5 article. Try this one instead: https://vborg.vbsupport.ru/showthread.php?t=250418

BULLDOG
02-05-2014, 01:48 PM
Thanks.

I will have a look.

kh99
02-05-2014, 01:56 PM
You want to go to Styles & Templates > Style Manager, then in the dropdown menu for the style you want to edit ("default" if you have only one style), choose "Edit Templates". Then in the template list find "Postbit Templates" and double click it to expand the list. Then double click postbit_legacy" to edit it.

BULLDOG
02-05-2014, 07:41 PM
Okay, found what you pointed to.

But I am still at a loss! Where exactly do I put the following in the article:

<vb:if condition="$post['fieldx']"><dt>My FieldX</dt> <dd>{vb:raw post.fieldx}</dd></vb:if>

Where I of course change "fieldx" to the actual field name and the green field to whatever I want.

I want the "Real name" to stand AFTER "Location" and BEFORE "Posts"... also, I need a : after "Real name"

I did try to insert the code but the "Real name" didn't appear in the user field (I have my real name on my profile page).

kh99
02-06-2014, 11:27 AM
Like the article says under "Method 1", find this:
<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>


and after it, put something like this:
<vb:if condition="$post['fieldx']"><dt>My FieldX</dt> <dd>{vb:raw post.fieldx}</dd></vb:if>


that puts it after the post count. If you want it to appear somewhere else, it should be easy enough to look at the template code around that same place and find where to move it.

BULLDOG
02-06-2014, 12:06 PM
Okay, makes sense... I'll give it a try.

TheLastSuperman
02-06-2014, 12:11 PM
Yeah, problem is that I did that but it doesn't work.

Could you possible edit it for me (the script above) so that i can copy/paste it in?

BTW.: "After" it, does that mean "under" it (a new line), or straight after it??

Yes he meant under it, this is how it would look then:

<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>
<vb:if condition="$post['fieldx']"><dt>My FieldX</dt> <dd>{vb:raw post.fieldx}</dd></vb:if>

I simply pasted it directly below the code kh99 referenced as seen above ^ ;). *Of course you know to replace fieldX the red X with the actual field ID# for your matching field and then type in what you want it to say for the link name where it says "My FieldX".

kh99
02-06-2014, 01:15 PM
Yeah, problem is that I did that but it doesn't work.

Could you possible edit it for me (the script above) so that i can copy/paste it in?

BTW.: "After" it, does that mean "under" it (a new line), or straight after it??


Like Mike said. It actually doesn't matter if it's right after or on the next line, but it's easier to read if you put it on it's own line.

I think you might actually be less likely to mess up the template if you add that line than if you try to copy the entire thing. Also, although I usually choose to just answer people's question rather than telling them to search or to figure it out, in this case it should be easy enough that I think you'd benefit by taking a minute and finding where it goes. If you mess up the template you can always select it and choose "revert" (assuming there haven't been any other changes made to it, of course).

BULLDOG
02-07-2014, 12:03 PM
Thanks guys! It worked!

"Case closed"

BULLDOG
02-27-2014, 08:04 AM
Sorry... it's me again.

Now I want the field "Pipe smoker since" AFTER "Real Name" and BEFORE "Posts":

<vb:if condition="$post['field5']"><dt>Real Name</dt> <dd>{vb:raw post.field5}</dd></vb:if>
<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>

{vb:raw template_hook.postbit_userinfo_right_after_posts}

"Pipe smoker since" has field number 6.

So the code should be:

<vb:if condition="$post['field6']"><dt>Pipe smoker since</dt> <dd>{vb:raw post.field6}</dd></vb:if>

Then I tried inserting it after this code:

{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
<dt>{vb:rawphrase posts}</dt> <dd>

BUT it does not work!

Please WHERE exactly do I insert the code so that it works?

ozzy47
02-27-2014, 10:39 AM
Insert the code after this line:
<vb:if condition="$post['field5']"><dt>Real Name</dt> <dd>{vb:raw post.field5}</dd></vb:if>

BULLDOG
02-27-2014, 10:55 AM
I did try that, Chris.

And now it looks like this, but STILL the "Pipe smoker since" does NOT appear in the user fields (checked with refreshing the boards):

<vb:if condition="$post['field5']"><dt>Real Name</dt> <dd>{vb:raw post.field5}</dd></vb:if>
<vb:if condition="$post['field6']"><dt>Pipe smoker since</dt> <dd>{vb:raw post.field6}</dd></vb:if>

ozzy47
02-27-2014, 10:58 AM
When you say, "does NOT appear in the user fields" are you referring to the postbit, or in the usercp for the members to enter the info into?

BULLDOG
02-27-2014, 11:02 AM
The "Pipesmoker since" appears when clicking on a profile and choosing "About Me".

However, the "Pipesmoker since" does not appear together with "Join Date", "Location", "Real Name" and "Posts" texts under the usernames where the avatars also are.

ozzy47
02-27-2014, 11:12 AM
I see this, "Pipe smoker since 1986" in the postbit for the user ARMY MOUNT on your site.

BULLDOG
02-27-2014, 11:22 AM
Yes, if you click on my PROFILE, it does...

But what I would like is to have the text "Pipe smoker since" appear in the "user fields", too... that is in threads, like for instance this one:

http://pipesmokerunlimited.com/showthread.php?4478-New-PSU-Team-Members

As you can see, for instance under the avatar of the Mod called "MarkW4mms", you see the "Real Name" that I added with success with your help.

I would LOVE to have "Pipesmoker since" added in that field, too, though

ozzy47
02-27-2014, 11:26 AM
If he did not add the info in his usercp, it will not show up.

As I see this post, http://pipesmokerunlimited.com/showthread.php?4485-My-Wife-Says-I-Suffer-From-OCD-%28Obsessive-Compulsive-Disorder%29&p=73733#post73733 it is showing up.

BULLDOG
02-27-2014, 11:27 AM
Okay, thanks!

That explains it!

Many, many thanks for your help! Much appreciated! :-)

ozzy47
02-27-2014, 11:49 AM
Not a problem, glad to help. :)

noahvale
02-07-2015, 06:16 PM
Can anyone tell me how to add the user's Real Name in the Active Subscriptions block in payments.php?

Thanks.

ozzy47
02-07-2015, 06:34 PM
In the ACP?

noahvale
02-07-2015, 08:03 PM
No, in the output of payments.php, just below the BCKFC Member in the Active Subscriptions block. See the attached image.

We have a lot of members. They need a way to prove their membership for sponsor discounts at local retailers.

Thanks much.