1-2 kere daha sorulmuştu. Buyüzden küçük bir düzenleme hazırlayayım dedim.
modules/forums/inc/forums.posts.php dosyasını aç:
bul:
PHP
1 |
require_once cot_incfile( 'forms' );
|
altına ekle:
PHP
1 2 3 4 5 6 7 8 9 10 11 |
$uid = $usr [ 'id' ];
function userPostFind(){
global $db ;
global $q ;
global $uid ;
if ( $db ->query( "SELECT COUNT(*) FROM cot_forum_posts WHERE fp_topicid= '$q' and fp_posterid = '$uid'" )->fetchColumn() == 0 && cot_auth( 'admin' , 'any' , 'R' ) == 0){
return FALSE;
} else {
return TRUE;
}
}
|
Bul:
PHP
1 |
$t ->assign(cot_generate_usertags( $row , 'FORUMS_POSTS_ROW_USER' ));
|
Üstüne Ekle:
PHP
1 2 3 4 5 |
if (userPostFind() == TRUE){
$viewuserpost = cot_parse( $row [ 'fp_text' ], ( $cfg [ 'forums' ][ 'markup' ] && $cfg [ 'forums' ][ 'cat_' . $s ][ 'allowbbcodes' ]));
} else {
$viewuserpost = "Konu detaylarını görebilmek için cevap yazmalısınız." ;
}
|
Bul:
PHP
1 |
'FORUMS_POSTS_ROW_TEXT' => cot_parse( $row [ 'fp_text' ], ( $cfg [ 'forums' ][ 'markup' ] && $cfg [ 'forums' ][ 'cat_' . $s ][ 'allowbbcodes' ])),
|
Değiştir:
PHP
1 |
'FORUMS_POSTS_ROW_TEXT' => $viewuserpost ,
|
Konu detaylarını görebilmek için cevap yazmalısınız. yazısını kendine göre değiştirirsin. Kolay gelsin.