| Gökhan YILDIZ |
|
|---|---|
|
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:
require_once cot_incfile('forms');
altına ekle:
$uid = $usr['id'];
function userPostFind(){
global $db;
global $q; //Topic Id
global $uid; //User Id
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: $t->assign(cot_generate_usertags($row, 'FORUMS_POSTS_ROW_USER')); Üstüne Ekle:
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: 'FORUMS_POSTS_ROW_TEXT' => cot_parse($row['fp_text'], ($cfg['forums']['markup'] && $cfg['forums']['cat_' . $s]['allowbbcodes'])), Değiştir: '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. Gökhan YILDIZ
Dit bericht is bewerkt door Gökhan YILDIZ (2015-05-20 14:28, 10 jaren ago) |