Login     Sign up
STATUS MESSAGE
Andrew Devyat (@vertuozz)
Join date: Jan 23rd 2011
Community posts: 6
View Profile
Send Message

[quote=falcone]

[code]
'.decode_bbb.

[/code] [/quote]

It works fine, thanks, falcone, but the "hide" button drops down too. How to fix it?

159 months ago
gaspar esquerdo lopez (@facenight)
Join date: Sep 30th 2011
Community posts: 3
View Profile
Send Message

hello friends I've tried but fails to run the bbcode function this is my stream function display:

[code]function stream_display($row = array(),$type = '',$hide_form=0,$target_id = 0) {
global $client, $config;
if ($type == 'mobile') {
$mu = 'mobile/';
}
else {
$mu = '';
}
if (!$row['username']) return '';
if (!$row['avatar'] || !$row['fullname']) {
$res = sql_query("select id,avatar,fullname,lastlogin from ".tb()."accounts where username='{$row['username']}'");
$row2 = sql_fetch_array($res);
$row['fullname'] = $row2['fullname'];
$row['lastlogin'] = $row2['lastlogin'];
if (!$row2['avatar'])
$row['avatar'] = 'undefined.jpg';
else
$row['avatar'] = $row2['avatar'];
};
if (!$row['wall_uid']) {
$res = sql_query("select uid from ".tb()."pages where id='{$row['wall_id']}'");
$row3 = sql_fetch_array($res);
$row['wall_uid'] = $row3['uid'];
}
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'])&& (isset($attachment['thumb'])) && (!is_array($attachment['thumb']))) {
    $att .= '<div class="att_name">'.url($attachment['uri'],h($attachment['name'])).'</div><a href="'.uhome().'/'.$attachment['uri'].'" ><img src="'.uhome().'/'.$attachment['thumb'].'" /></a>';
    }
                    else {
                            $att .= '<div class="att_name">'.url($attachment['uri'],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' && $type != 'mobile') {
        foreach ($attachment['thumb'] as $thumb) {
            if ($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($mu.'u/'.$row['username'].'/status/'.$row['id'], t('View status'));
}
if ($client['id'] && $type != 'simple' && $type != 'mobile' && !$hide_form && !$no_comment) {
    $comment_form = comment_form($row['id']);
}
else {
    $comment_form = comment_form($row['id'],'');
}
if (!$hide_form && $type != 'simple' && $type != 'mobile' && !$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"><span style="float: right;">'.t('Delete').'</span></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);
}
$comment_get = likes_get($row).$comment_get;
$icon = '<img src="'.uhome().$icon.'.png" />';
if ($row['app'] == 'photo') {
    $icon = '';
}
if ($row['wall_id'] != $row['uid'] && $row['wall_id'] != $target_id) {
    if ($row['wall_uid'] != $row['uid']) {
        $res = sql_query("select p.*,u.avatar,u.fullname from ".tb()."pages as p left join ".tb()."accounts as u on u.id=p.uid where p.id='{$row['wall_id']}'");
        $page = sql_fetch_array($res);
        if ($page['type'] == 'u') {
            $hdh = url($mu.'u/'.$page['uri'],t("{1}'s wall",'<strong>'.h($page['fullname']).'</strong>'));
        }
        else {
            $hdh = url('page/'.$page['uri'],'<strong>'.h($page['name']).'</strong>');
        }
        $row['message'] = t('Post on').' '.$hdh.'<br />'.$row['message'];
    }
}
if ($row['lastlogin'] > (time()-300)){

$row['user_online'] = '<img src="'.uhome().'/files/icons/online.gif" />';
}else{
$row['user_online'] = '<img src="'.uhome().'/files/icons/offline.gif" />';
}

if ($type == 'mobile') {
    return '
    <div class="user_post_1">
        '.url($mu.'u/'.$row['username'], $row['fullname']).'
         '.$row['message'].
            $att.'
        <div class="att_bottom"> '.get_date($row['created']).$likes.'</div>
        '.$comment_form.$comment_get.
            '
    </div>
        ';
}
else {
    return '

<script src="js/jquery.tools.min.js"></script><script>
$(document).ready(function() {
$(".tooltip_now").tooltip({ effect: \'slide\'});
});</script>
<div class="user_post_1">
<table width="100%">
<tr>
<td class="user_post_left" width="'.$avatar_box_size.'" valign="top"><div align="center"><div class="tooltip_now" >'.avatar($row,$avatar_size).'</div>
<div class="tooltip">
<table style="margin:0">
<tr>
<td class="label"><strong>'.$row['username'].'</strong>'.avatar($row,65).''.$row['user_online'].'</td>
<td><ul><li><a style="color:yellow" '.url('message/compose/u'.$row2['id'].'', 'Enviar Mensaje').'</a></li><li><a style="color:yellow" '.url('u/'.$row['username'].'', 'Ver Perfil').'</a></li><li><a style="color:yellow" href="'.url('friends/add/'.$row2['id']).'">'.t('Add friend').'</a></li></ul></td>
</tr>

</table>

</div></div>'.$row['user_online'].'</td>
<td class="user_post_right" valign="top">
<strong>'.url($mu.'u/'.$row['username'], $row['fullname']).'</strong>
'.$row['message'].
$att.'
<div class="att_bottom">'.$icon.' <abbr class="timeago" title="'.date("c",$row['created']).'"></abbr>
</div>
'.$comment_form.$comment_get.
'</td>
</tr>
</table>
</div>
';
}
}[/code]

helpe please

my site its [url]www.facesnights.es[/url]

152 months ago
Prev 1 2