ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 如何才能在評論里拿到name呢用戶昵稱 1 0
迅睿CMS版本:1.2.0
插件名稱 評論 V2.43
插件作者 迅睿官方團隊
最近更新 2024-11-28 09:14:48
支持php83環境

請問 如何才能在評論里拿到name呢 用戶昵稱和評論回復里的@賬號 能否換成用戶昵稱 求大佬們幫幫忙 謝謝


image


image

public function output_comment($data) {

$rt = [];

// 這里根據項目的$data輸出格式來定義PHP的數據寫法,

// 每個接口的寫法幾乎不一樣,下面是測試例子

if ($data['list']) {

foreach ($data['list'] as $t) {

$c = [

'avatar'=> dr_avatar($t['uid']),//用戶頭像

'author' => $t['author'], // 賬號

'title' => $t['title'], // 昵稱

'comments' => $t['comments'],//評論總數

'support' => $t['support'],//點贊總數

'id' => $t['id'], // 評論id號

'content' => dr_replace_emotion($t['content']), // 評論內容

'inputtime' => dr_date($t['inputtime'], 'Y-m-d H:i:s'), // 時間轉換

];

//回復評論

if ($t['rlist']) {

$r['rlist'] = [];

foreach ($t['rlist'] as $tt) {

$c['rlist'][] = [

'avatar'=> dr_avatar($tt['uid']),//用戶頭像

'author' => $tt['author'], // 賬號

'title' => $tt['title'], // 昵稱

'comments' => $tt['comments'],//評論總數

'support' => $tt['support'],//點贊總數

'id' => $tt['id'], // 評論id號

'content' => dr_replace_emotion($tt['content']), // 評論內容

'inputtime' => dr_date($tt['inputtime'], 'Y-m-d H:i:s'), // 時間轉換

];

}

}

$rt[] = $c;

}

}

return $rt;

}


插件版權:官方插件
插件名稱:評論系統
解決方案
  • public function output_comment($data) {
            $rt = [];
            // 這里根據項目的$data輸出格式來定義PHP的數據寫法,
            // 每個接口的寫法幾乎不一樣,下面是測試例子
            
            if ($data['list']) {
                foreach ($data['list'] as $t) {
                    $user = dr_member_info($t['uid']);
                    $c = [
                        'avatar'=> dr_avatar($t['uid']),//用戶頭像
                        'author' => $user['name'], // 賬號
                        'title' => $t['title'], // 昵稱
                        'comments' => $t['comments'],//評論總數
                        'support' => $t['support'],//點贊總數
                        'id' => $t['id'], // 評論id號
                        'content' => dr_replace_emotion($t['content']), // 評論內容
                        'inputtime' => dr_date($t['inputtime'], 'Y-m-d H:i:s'), // 時間轉換
                    ];
                    //回復評論
                    if ($t['rlist']) {
                     $r['rlist'] = [];
                     foreach ($t['rlist'] as $tt) {
                    $user = dr_member_info($tt['uid']);
                     $c['rlist'][] = [
                        'avatar'=> dr_avatar($tt['uid']),//用戶頭像
                        'author' => $user['name'], // 賬號
                        'title' => $tt['title'], // 昵稱
                        'comments' => $tt['comments'],//評論總數
                        'support' => $tt['support'],//點贊總數
                        'id' => $tt['id'], // 評論id號
                        'content' => dr_replace_emotion($tt['content']), // 評論內容
                        'inputtime' => dr_date($tt['inputtime'], 'Y-m-d H:i:s'), // 時間轉換
                    ];
                     }
                        
                    }
                    $rt[] = $c;
                }
            }
            return $rt;
        }
    滿意答案
    開源積分+10
  • @官方插件技術-李譯:已解決已解決 謝謝
    想撈錢