Login     Sign up
I want This Feature!
Options (Maximum selection: 1)Votes
Yes
6
No
0
Closed in Sep 16th 2010 (6 people voted)

Full Name as main Title rather than Username
Syafiq Zainal (@syafiqzainal)
Join date: Sep 3rd 2010
Community posts: 25
View Profile
Send Message

This is my only request right now. I have done several modx to this script but i got pain to make Full Name as main Title for the user, So people can keep knowing who the heck is the profile owner. Like facebook, and another social network.

"Full Name as main Title rather than Username"..

Jcow is great. Hopefully you can consider this in the next release. Or someone can help me how to fix this?

-Syafiq-

167 months ago
jade (@jadem)
Join date: Sep 1st 2010
Community posts: 14
View Profile
Send Message

great idea

167 months ago
Dum Dum Gratis (@domgratis)
Join date: Aug 4th 2010
Community posts: 82
View Profile
Send Message

Yep I Like it...

167 months ago
Syafiq Zainal (@syafiqzainal)
Join date: Sep 3rd 2010
Community posts: 25
View Profile
Send Message

5 people want this and counting.....

167 months ago
AL (@switch48)
Join date: Sep 1st 2010
Community posts: 450
View Profile
Send Message

I'm in

167 months ago
Jason Ward (@totalomega)
Join date: Sep 17th 2010
Community posts: 14
View Profile
Send Message

meee 2

167 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

go to module u u.php

function settabmenu

change line

[code]set_title($profile['username']."'s profile");[/code]

into

[code]
if ($profile['fullname'] && !empty($profile['fullname'])) {
set_title($profile['fullname']."'s profile");
}
else {
set_title($profile['username']."'s profile");
}
[/code]

change line

[code]app_header('<table border="0"><tr><td>'.avatar($profile,25).'</td><td valign="middle"><span style="font-size:1.5em">'.t("{1}'s profile",$profile['username']).' '.$editbutton.' '.$custombutton.'</span></td></tr></table>');
[/code]

into

[code]
if ($profile['fullname'] && !empty($profile['fullname'])) {
app_header('<table border="0"><tr><td>'.avatar($profile,25).'</td><td valign="middle"><span style="font-size:1.5em">'.t("{1}'s profile",$profile['fullname']).' '.$editbutton.' '.$custombutton.'</span></td></tr></table>');
}
else {
app_header('<table border="0"><tr><td>'.avatar($profile,25).'</td><td valign="middle"><span style="font-size:1.5em">'.t("{1}'s profile",$profile['username']).' '.$editbutton.' '.$custombutton.'</span></td></tr></table>');
}
[/code]

That's all folks

166 months ago
Syafiq Zainal (@syafiqzainal)
Join date: Sep 3rd 2010
Community posts: 25
View Profile
Send Message

it's only change the title but not in the live feed/news feed and in the "find friends"/"browse friends" module.

BTW, this is great n thanks :)

166 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

in feed:

file ss.inc.php in include/libs

function comment_display

i added this

before the return

[code]
if (!$row['fullname']) {
$res = sql_query("select fullname from ".tb()."accounts where id='{$row['uid']}'");
$row2 = sql_fetch_array($res);
if (!$row2['fullname'])
$row['fullname'] = $row['username'];
else
$row['fullname'] = $row2['fullname'];
};
[/code]

166 months ago
Syafiq Zainal (@syafiqzainal)
Join date: Sep 3rd 2010
Community posts: 25
View Profile
Send Message

[quote=falcone]in feed:

file ss.inc.php in include/libs

function comment_display

i added this

before the return

[code]
if (!$row['fullname']) {
$res = sql_query("select fullname from ".tb()."accounts where id='{$row['uid']}'");
$row2 = sql_fetch_array($res);
if (!$row2['fullname'])
$row['fullname'] = $row['username'];
else
$row['fullname'] = $row2['fullname'];
};
[/code] [/quote]

Have you test it on your server and it's working?
Because i change n follow your guide but nothing change. BTW Thanks again.. Waiting for your reply.. :)

166 months ago
Abhimanyu (@abhimanyusharma003)
Join date: Aug 12th 2010
Community posts: 124
View Profile
Send Message

ya me too try all this..
but the wall post and feed still display username rather than fullname..
but thanks for try..

166 months ago
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

[quote=syafiqzainal]

Have you test it on your server and it's working?
Because i change n follow your guide but nothing change. BTW Thanks again.. Waiting for your reply.. :) [/quote]

something went wrong with the copy/paste here

[code]
function comment_display($row = array()) {
if (!$row['avatar']) {
$res = sql_query("select avatar from ".tb()."accounts where id='{$row['uid']}'");
$row2 = sql_fetch_array($res);
if (!$row2['avatar'])
$row['avatar'] = 'undefined.jpg';
else
$row['avatar'] = $row2['avatar'];
};

if (!$row['fullname']) {
    $res = sql_query("select fullname from ".tb()."accounts where id='{$row['uid']}'");
    $row2 = sql_fetch_array($res);
    if (!$row2['fullname'])
        $row['fullname'] = $row['username'];
    else
        $row['fullname'] = $row2['fullname'];
};

return '
    <div class="user_comment">
        <table width="100%">
        <tr>
        <td class="user_post_left" width="40" valign="top">'.avatar($row,25).'</td>
        <td class="user_post_right" valign="top">
        <strong>'.url('u/'.$row['username'], $row['fullname']).'</strong>
         '.h($row['message']).'
        <div class="att_bottom">'.get_date($row['created']).'</div></td>
        </tr>
        </table>
    </div>
        ';

}
[/code]

for me it is working;

166 months ago
1 2 3 Next