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
Jcow Master (@falcone)
Join date: Sep 2nd 2010
Community posts: 917
View Profile
Send Message

ok, i already know what is the problem. I made some changes elsewhere, i have to find it.

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

i forgot this:

function stream_display in includes/libs/common.inc.php

[code]
function stream_display($row = array(),$type = '',$hide_form=0) {
global $client, $config;

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'];
};

[/code]

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

This my complete code:
[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'];
};
//Start Edit
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'];
};
//End Edit
return '
<div class="user_comment">
[/code]

Where your provided code as "//Start & End Edit"..

SOmething wrong with this code?
Thanks once again...

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

oh... Got it.. let me try...

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

for the browse part:

file: browse.php in modules/browse

function index, somewhere down below you find:

[code]
section_content('<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');*/
[/code]

change into:

[code]
if ($member["fullname"] && !empty($member["fullname")) {
section_content('<li><span>'.url('u/'.$member['username'],$member['fullname']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');
}
else {
section_content['<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');
}
[/code]

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

Still same. Nothing change.. :D

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

[quote=falcone]for the browse part:

file: browse.php in modules/browse

function index, somewhere down below you find:

[code]
section_content('<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');*/
[/code]

change into:

[code]
if ($member["fullname"] && !empty($member["fullname")) {
section_content('<li><span>'.url('u/'.$member['username'],$member['fullname']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');
}
else {
section_content['<li><span>'.url('u/'.$member['username'],$member['username']).'</span><br />
'.avatar($member).'<br />'
.$gender
.$age.'</li>');
}
[/code] [/quote]

This working great. But the feed still the same. BTW.. Thanks for the help n give your time help me n others.. Really appreciate :)

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

did you make the changes in the function stream_display ?

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

[quote=falcone]did you make the changes in the function stream_display ? [/quote]

yes.. but username still won't change

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

what username ? admin or another username ?

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

[quote=falcone]what username ? admin or another username ? [/quote]

No.. i mean... Nothing change yet. I know the admin default username. But all user feed still only to appear username, not full name.

In easy word: Nothing Change :)

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

strange, i copied the code from my script and it is working here.

only the part in the feed: member1 became friend of member2

member2 is still the username. It's somewhere else where the code need some changes.

167 months ago
Prev 1 2 3 Next