Форуми / National / Turkish / Teknik Destek / Konuya Yorum Atmadan Mesaj Gözükmesin ?

Gökhan YILDIZ
#40887 21.05.2015 06:38

Genoa için system/core/forums/forums.posts.inc.php dosyasını aç

bul:

PHP
1
unset ($notlastpage);

 

altına ekle:

PHP
1
2
3
4
5
6
7
8
9
10
11
12
$uid = $usr['id'];
function userPostFind(){
    global $q; //Topic Id
    global $uid; //User Id
    $sqlpost = sed_sql_query("SELECT COUNT(*) FROM sed_forum_posts WHERE fp_topicid= '$q' and fp_posterid = '$uid'");
    $toptaluserpost = sed_sql_result($sqlpost,0,'COUNT(*)');
    if ($toptaluserpost == 0 && sed_auth('admin', 'any', 'R') == 0){
        return FALSE;
    }else{
        return TRUE;
    }
}

Bul:

PHP
1
2
$t-> assign(array(
        "FORUMS_POSTS_ROW_ID" => $row['fp_id'],

Üstüne ekle:

PHP
1
2
3
4
5
if(userPostFind() == TRUE){
        $viewuserpost = $row['fp_text'];
    }else {
        $viewuserpost = "Konu detaylarını görebilmek için cevap yazmalısınız.";
    }

Bul:

PHP
1
"FORUMS_POSTS_ROW_TEXT" => $row['fp_text'],

Değiştir:

PHP
1
"FORUMS_POSTS_ROW_TEXT" => $viewuserpost,

 

Dosyayı kaydet ve aynı dizine yükle.

Gökhan YILDIZ