Show first/last name under Avatar

Is it possible and where would I edit this to displays users first/last name under their Avatar instead of their username?

Quote · 12 Feb 2010

Okweb did a mod to do this for D6.1, but I don't think anyone has tried it for D7 yet.  It would be cool, but the font would have to be very tiny since the Avatars are smaller, and some people have long names.

Quote · 12 Feb 2010

Okweb did a mod to do this for D6.1, but I don't think anyone has tried it for D7 yet.  It would be cool, but the font would have to be very tiny since the Avatars are smaller, and some people have long names.

I agree

Quote · 13 Feb 2010

Can someone try this...It showing me a blank...

edit file templates/base/scripts/BxBaseFunctions.php, string like:


$sNick = getNickname($iId);

change it to:
$aInfo = getProfileInfo($iId);
$sNick = $aInfo['RealNameField'];

Quote · 15 Feb 2010

Solution:

edit file templates/base/scripts/BxBaseFunctions.php

Find:
$sNick = getNickname($iId);

Change it to:

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

The reason I am using the <br> is to put first name on one line and last name on a 2nd line. You dont have to use the <br> you can just put an empty space there so the first/lastname is spaced out. Since the Avatar are so small the <br> is much better in my opinion.

Quote · 17 Feb 2010

Nice! But when i Login through facebook, yahoo or others my profile and avatar only shows my first name. What do i have to do to get both names?

And how do i alow more then one of the same username (now i get my name_FB if the name is already created)? I basicly want everyone to use their real name.

please help :)

Quote · 17 Feb 2010

Nice! But when i Login through facebook, yahoo or others my profile and avatar only shows my first name. What do i have to do to get both names?

And how do i alow more then one of the same username (now i get my name_FB if the name is already created)? I basicly want everyone to use their real name.

please help :)

When you edit your member profile, is your first/last name fields both filled out? If your last name is blank, you have to put in your lastname and save your profile.

If your already have your first/last name already there, I am not sure then bud...This mod is only for regular login, I don't use the facebook login.

Quote · 17 Feb 2010

Not bad Romeonyc, but I didn't use the "first name" , "last name" construct because it causes other problems.  Instead, I defined a field "full_ name".   Using your approach, will unfortunately probably not work for me because that one line will be to long to fit under the tiny profile field.  Could you possibly tell me how to make it "wrap" when it finds that first space- i.e. "John Smith" is one field, but the space would put it on two lines.

Also, Could you tell me how/where to select a smaller font if that is possible - and maybe make a recommendation for a good, readable small font.

Thanks for doing this, and sharing.

Rob

Quote · 18 Feb 2010

Not bad Romeonyc, but I didn't use the "first name" , "last name" construct because it causes other problems.  Instead, I defined a field "full_ name".   Using your approach, will unfortunately probably not work for me because that one line will be to long to fit under the tiny profile field.  Could you possibly tell me how to make it "wrap" when it finds that first space- i.e. "John Smith" is one field, but the space would put it on two lines.

Also, Could you tell me how/where to select a smaller font if that is possible - and maybe make a recommendation for a good, readable small font.

Thanks for doing this, and sharing.

Rob

That is the reason that I put in the <br> if you remove the <br> it will be a 1 liner...but I still have no figured out how I can incoporate a <font> command so i can specify a smaller font type so instead of breaking it up into 2 lines, it will be a single...Another possible solution can be to increase the size of the avatar pics...i think this can be set from the /admin section...I have not looked yet

Quote · 18 Feb 2010

Right - I understand, but again I did not use "first name" "last name" rather I defined a field called "full name".   Do you know if there is a way to take the first space in full name, and wrap it to the second line.

Also, do you have a link where I could see it?  PM me if you don't want to post it.

Rob

Quote · 18 Feb 2010

Right - I understand, but again I did not use "first name" "last name" rather I defined a field called "full name".   Do you know if there is a way to take the first space in full name, and wrap it to the second line.

Also, do you have a link where I could see it?  PM me if you don't want to post it.

Rob

FirstName and LastName those are the default values in the Database. Why would you rename to Full name? Take a look at my site kartingconnectdotcom

Quote · 19 Feb 2010

Because it has been my experience that many people's name do not fall neatly into the "First Name", "Last Name" structure.  "John H. Jones, Phd", "Reverend Charles Smith" etc - more examples from foreign cultures.   I was actually one of the ones who pushed for "real name support" during the development of D7, and if you look back on the Trac on this you will see it references my post.  I have found that the "Full Name" structure gives me more flexibility since I am building sites with members from many different countries.  I tried to communicate to Dolphin the importance of also supporting a "Full Name" structure, but the message never got heard.

That's why.

Quote · 19 Feb 2010

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

...only the first name shows up on this 7.0.6 installation, unfortunately. Any ideas?

Quote · 15 Apr 2011

 I added this code instead but I don't see any change.

Can someone post an update on this issue?

 

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

...only the first name shows up on this 7.0.6 installation, unfortunately. Any ideas?

 

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 30 Jun 2011

HELLLOOOOOOOO!!????????//

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 3 Jul 2011

 

 I added this code instead but I don't see any change.

Can someone post an update on this issue?

 

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

...only the first name shows up on this 7.0.6 installation, unfortunately. Any ideas?

 

 sorry for the late reply ..

anyways this only works over the search .. and yeah it only shows the first name only because of the <br > tag

 

i'll try to solve this once and for all but after my exams ..

note: also dont try to replace the <br> with any thing cuz i tried and it didnt work.. it shows the two names but the last name is cut ..

good luck

nazzal

if i did help you .. it wont hurt to go to my profile and add a recommendation for me ;)
Quote · 4 Jul 2011

I added the code and noticed only the first name is visible because there is not enough space under the profile picture to allow the second name to appear.

 

I'm not a programmer, but I believe the answer is in allowing a larger space below each of the profile pictures.

 I added this code instead but I don't see any change.

Can someone post an update on this issue?

 

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

...only the first name shows up on this 7.0.6 installation, unfortunately. Any ideas?

 

 

Quote · 4 Jul 2011

 

I added the code and noticed only the first name is visible because there is not enough space under the profile picture to allow the second name to appear.

 

I'm not a programmer, but I believe the answer is in allowing a larger space below each of the profile pictures.

 I added this code instead but I don't see any change.

Can someone post an update on this issue?

 

$aInfo = getProfileInfo($iId);
$sNick = $aInfo['FirstName'].'<br>'.$aInfo['LastName'];

...only the first name shows up on this 7.0.6 installation, unfortunately. Any ideas?

 

 

 true ..

if i did help you .. it wont hurt to go to my profile and add a recommendation for me ;)
Quote · 4 Jul 2011

What about increasing the size of the profile pic, would this work by creating a bit more space for the full name?

Sometimes communicating your problem and putting it out there is enough to solve it
Quote · 6 Jul 2011

guys it can be done by doing 2 modifcations to your css file. Look for search.css file 

templates/base/css/search.css

and edit the class 

div.searchrow_block_simple {

margin:0px;

padding-right:4px;

}

here change the statement

padding-right:4px;

to 

padding: 19px;

now add a class below

 

.thumb_username

{

overflow:visible;

}

that's it.  The last name should appear now.
Thanks,
Abhishek.
Quote · 1 Oct 2011

Here you go. I did a full write up on it.

http://www.boonex.com/forums/?action=live_tracker#topic/Show-First-Last-Name-under-Avatar-SOLUTION-.htm

Quote · 16 Feb 2012
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.