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

can u upload the needed file n make it as modx?. Then people may be able to download it n use without any problem. It's may cause of bbcode problem from this forum.. I'm not sure about this..

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

ya me to agree with you...

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

complete function comment_display

[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]

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

complete function stream_display

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

if (count($row['attachment']) > 1) {
    $attachment = $row['attachment'];
    if ($attachment['cwall_id'] == 'none') {
        $no_comment = 1;
    }
    $att = '<div class="att_box">';
    if (strlen($attachment['name'])) {
        if (strlen($attachment['uri'])) {
            $att .= '<div class="att_name">'.url($attachment['uri'],h($attachment['name'])).'</div>';
        }
        else {
            $att .= '<div class="att_name">'.h($attachment['name']).'</div>';
        }
    }
    if (strlen($attachment['title'])) {
        $att .= '<div class="att_title">'.url($attachment['uri'],h($attachment['title']) ).'</div>';
    }
    if (is_array($attachment['thumb']) && $type != 'simple') {
        foreach ($attachment['thumb'] as $thumb) {
            $thumbs .= url($attachment['uri'],'<img src="'.uhome().'/'.$thumb.'"  />');
        }
    }
    if (strlen($attachment['des']) || strlen($thumbs)) {
        $att .= '<div class="att_des">'.$thumbs.h($attachment['des']).'</div>';
    }
    $att .= '</div>';
}

if ($row['app']) {
    $row['cwall_id'] = $row['app'].$row['aid'];
    $icon = '/modules/'.$row['app'].'/icon';
    if ($row['app'] == 'pcomment') {
        $icon = '/files/appicons/pcomment';
    }
}
else {
    $row['cwall_id'] = $row['id'];
    $icon = '/files/appicons/status';
    $row['message'] = $row['message'].' '.url('u/'.$row['username'].'/status/'.$row['id'], t('View status'));
}
if ($client['id'] && $type != 'simple' && !$hide_form && !$no_comment) {
    $comment_form = comment_form($row['id']);
}
if (!$hide_form && $type != 'simple' && !$no_comment) {
    if (!$config['stream_delete_form_displayed']) {
        $config['stream_delete_form_displayed'] = 1;
        c('<script>
        $(document).ready( function(){
            $("a[class=stream_delete]").click( function () {
                var parentdd = $(this).parents(".user_post_1");
                var sid = $(this).prev()[0].value;
                $(this).after("<img src=\''.uhome().'/files/loading.gif\' /> hiding..");
                $(this).hide();
                $.get(\''.uhome().'/index.php?p=jquery/stream_delete/\'+sid, function(data) {
                    parentdd.hide("slow");
                });
                return false;
            });
        });
        </script>');
    }
    if ($row['uid'] == $client['id'] || in_array('3',$client['roles']) ) {
        $row['message'] = $row['message'].' | 
        <input type="hidden" name="streamid" value="'.$row['id'].'" /><a href="#" class="stream_delete">'.t('Hide').'</a>';
    }
}
if ($type == 'simple' && !$no_comment) {
    $avatar_size = 50;
    $avatar_box_size = 60;
    $comment_get = '';
}
else {
    $avatar_size = 50;
    $avatar_box_size = 60;
    $comment_get = comment_get($row['id'],5);
}
if ($row['likes'] > 0) {
    $likes = ' ('.t('{1} people like this','<strong>'.$row['likes'].'</strong>').')';
}
$icon = '<img src="'.uhome().$icon.'.png" />';
if ($row['app'] == 'photo') {
    $icon = '';
}
return '
    <div class="user_post_1">
        <table width="100%">
        <tr>
        <td class="user_post_left" width="'.$avatar_box_size.'" valign="top">'.avatar($row,$avatar_size).'</td>
        <td class="user_post_right" valign="top">
        <strong>'.url('u/'.$row['username'],$row['fullname']).'</strong>
         '.$row['message'].
            $att.'
        <div class="att_bottom">'.$icon.'  '.get_date($row['created']).$likes.'</div>
        '.$comment_form.$comment_get.
            '</td>
        </tr>
        </table>
    </div>
        ';

}
[/code]

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

THESE CODES WORKS GREAT...!!

And the last thing...
username to fullname
in chat box

But thanks man...!!

167 months ago
kamuaku dot com (@kamuaku)
Join date: Oct 20th 2010
Community posts: 12
View Profile
Send Message

im kinda newbie, where can i find the file and edit it? how many file to edit?

thanks in advance

166 months ago
Prev 1 2 3