Genoa için system/core/forums/forums.posts.inc.php dosyasını aç
bul:
altına ekle:
PHP
1 2 3 4 5 6 7 8 9 10 11 12 |
$uid = $usr [ 'id' ];
function userPostFind(){
global $q ;
global $uid ;
$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.