Log in

View Full Version : Putting Real Name in Postbit?


Joe Gronlund
08-18-2005, 04:51 PM
How do i go about putting the real name field in postbit?
Also is there a way to search for posts, just with images in them?

Thanks for any help you can provide..

Joe

Chris_D
08-18-2005, 05:02 PM
Wrong forum mate...

I'm pretty sure there's a hack you can download for this anyway, I'll have a look.

Joe Gronlund
08-18-2005, 05:22 PM
Wrong forum mate...

I'm pretty sure there's a hack you can download for this anyway, I'll have a look.

Hmm, i searched for real name hack, got alot of results, but no hack.. :ermm:

Chris_D
08-18-2005, 05:29 PM
This forum uses it.

Looks like there's a field in the profile where a user can specify their real name. It can also be prompted on registration. I guess if you look at the postbit template, and try and work out from there how people's locations get shown then you could turn it into a Real Name hack yourself.

If I spent 3 hours on it a novice like myself might be able to work it out :p If I get time I'll have a look.

Joe Gronlund
08-18-2005, 05:38 PM
Ok thanks,, appreciate it :)

Joe

Chris_D
08-18-2005, 05:49 PM
Actually, that's so easy it's unbelievable. I just did it :)

I don't know if it can be done with hooks or plugins or whatever (I don't know how to make them) but it can be done with a template edit.

1) Go to AdminCP > User Profile Manager > Add New User Profile Field > Single Line Text Box and Set the options as follows:

Title: Real Name
Description: Enter your Real Name here
(might as well leave all the other options default)

2) Click on Save and when you get taken to the User Profile Manager, make a note of what name it's been given (field5, field6, field7 etc.)

3) Go to Languages & Phrases > Phrase Manager > Add New Phrase > Set this up as follows:

Phrase Type: Global
Product: vBulletin
Varname: real_name
Test: Real Name

Click on Save

4) Go to Styles & Templates > Style Manager > Select Edit Templates from the All Style Options drop-down box > Find the postbit template > Look for:

<if condition="$post['field2']">
<div>$vbphrase[location_perm]: $post[field2]</div>
</if>

Below this add the following:

<if condition="$post['fieldX']">
<div>$vbphrase[real_name]: $post[fieldX]</div>
</if>
Where X is whatever number in the Profile Field Manager (e.g. field5 or field6 etc.

Then all you need to do is save!

Job's a good-un.

EDIT: You might also want to do the same for postbit_legacy template as well.

Joe Gronlund
08-18-2005, 07:20 PM
Looks good,, thanks :)

I will do it later tonight..

Chris_D
08-22-2005, 08:05 PM
Did you get this working Joe?

Boofo
08-22-2005, 08:26 PM
It works. It's the same thing I used on 3.0, too. ;)

amykhar
08-22-2005, 08:30 PM
Yep. Vbulletin.org has been using it here since I suggested it ages ago :D

Chris_D
08-22-2005, 09:07 PM
Ahh, glad it works :E

I was surprised how easy it was to do. I only know basic HTML and know little about PHP etc. so yeah, surprised I haven't screwed something up ;)

Joe Gronlund
08-23-2005, 05:44 PM
Did you get this working Joe?

Yes, got it working :)

Thanks

Joe

rnmcd
12-29-2005, 05:50 PM
Does this display the 'real name' instead of the username or along with the username?

Also, does it replace the username everwhere in vBulletin or just in the postbit?

If any can post a shot of their postbit using this method, I'd appreciate it.

Thanks.

rnmcd
01-02-2006, 12:49 AM
<bump>

Peace_Hope
03-11-2006, 01:08 AM
Look at amykhar's post (it is reply #10 in this thread) and look at the postbit and you will see the hack in action ;)