Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • max power Friend
    #160302

    Regarding this thread…

    http://www.joomlart.com/forums/topic/fullname-is-displayed-in-posts-not-username/

    Usernames are now displayed, but when quoting someone it reverts back to the real name.

    nghiatd Friend
    #377125

    Hello,
    Please edit this code in file com_jacommentcontrollerscomments.php(default in line 2115):
    [PHP] function show_quote(){
    $object = array ();
    $k = 0;
    $id = JRequest::getInt(“id”,0);
    $model = & $this->getModel (‘comments’);
    $helper = new JACommentHelpers();
    $item = $model->getItem($id);
    //textCounter(‘newcomment’, ‘jaCountText’);

    $object [$k] = new stdClass ( );
    $object [$k]->id = ‘#newcomment’;
    $object [$k]->type = ‘appendAfter’;
    $object [$k]->status = ‘ok’;
    if(strpos($item->comment, “

    /iUs”, “”, $item->comment);
    }

    $object [$k]->content = ‘[QUOTE=’.$item->name.’:’. $item->id .’]’.trim($item->comment).'</blockquote>’;

    echo $helper->parse_JSON_new ( $object );
    exit ();
    }[/PHP]
    [PHP]function show_quote(){
    $object = array ();
    $k = 0;
    $id = JRequest::getInt(“id”,0);
    $model = & $this->getModel (‘comments’);
    $helper = new JACommentHelpers();
    $item = $model->getItem($id);
    //textCounter(‘newcomment’, ‘jaCountText’);

    $object [$k] = new stdClass ( );
    $object [$k]->id = ‘#newcomment’;
    $object [$k]->type = ‘appendAfter’;
    $object [$k]->status = ‘ok’;
    if(strpos($item->comment, “[QUOTE”) !== false && strpos($item->comment, “[/QUOTE”) !== false){
    $item->comment = preg_replace(“/[QUOTE(.*)

    /iUs”, “”, $item->comment);
    }
    $user = JFactory::getUser($item->userid);

    $object [$k]->content = ‘

    ’.trim($item->comment).'</blockquote>’;

    echo $helper->parse_JSON_new ( $object );
    exit ();
    }[/PHP]

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  nghiatd 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum