• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Share mod thank cho bang hội JohnCMS

Admin

Well-Known Member
Staff member
Administrator
Đầu tiên chúng ta import data này cái nha..
Tải xuống data_soo_thanks_wapit-mobi-by-nguyen.gz (0.7kb)
Mod nâng cấp VIP khi thank sẽ cộng vào thank_duoc trong user
Mở soo/index.php tìm
PHP:
if ($user_id && !$filter) {

 // Фиксация факта прочтения топика

 }

 if ($rights < 7 && $type1['close'] == 1) {

 echo '<div class="rmenu"><p>' . $lng_forum['topic_deleted'] . '<br/><a href="?id=' . $type1['refid'] . '">' . $lng_forum['to_section'] . '</a></p></div>';

 require('../incfiles/end.php');

 exit;

 }

Thêm vào bên dưới

PHP:
$congcamon=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . trim($_GET['user']) . '"'));
 mysql_query("UPDATE `soo_forum` SET `thank`='" . ($type1['thank'] + 1) . "' WHERE `id` = '$id'");
 mysql_query("UPDATE `users` SET `thank_duoc`='" . ($congcamon['thank_duoc'] + 1) . "' WHERE `id` = '" . trim($_GET['user']) . "'");
 mysql_query("UPDATE `users` SET `thank_di`='" . ($datauser['thank_di'] + 1) . "' WHERE `id` = '" . $user_id . "'");

$checkthankdau = mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $_GET['thanks'] . '" and `user` = "' . $_GET['user'] . '"');
if ($user_id && $user_id != $_GET['user'] && (mysql_result($checkthankdau, 0) < 1)) { if ((isset ($_GET['thank']))&&(isset ($_GET['user']))&&(isset ($_GET['thanks']))) {
echo '<div class="rmenu" id="thanksyou"><b>Bạn đã cảm ơn bài viết thành công </b></div>';
mysql_query("INSERT INTO `soo_forum_thank` SET `user` = '".trim($_GET['user'])."', `topic` = '".trim($_GET['thanks'])."' , `time` = '$realtime', `userthank` = '$user_id', `sid` = '$type1[sid]', `chude` = '".$_GET["id"]."' ");
}
}

Tìm tiếp

PHP:
$file_id = $fres['id'];

}

Thêm bên dưới

PHP:
$checkthank = mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `userthank` = "' . $user_id . '" and `topic` = "' . $res['id'] . '" and `sid` = "' . $res['sid'] . '" and `user` = "' . $res['user_id'] . '"');
if ($user_id && $user_id != $res['user_id'] && (mysql_result($checkthank, 0) < 1)) {
echo'&nbsp;<a id="btn" href="../soo/?mod=forum&amp;sid='. $sid .'&amp;id=' . $id . '&amp;thanks=' . $res['id'] . '&amp;user=' . $res['user_id'] . '&amp;start=' . $start . '&amp;thank#thanksyou">Thank'; echo '</a>';
}

Còn cái này là thống kê người thanks...
Dán đâu bạn thấy ok là được...
Dán dưới cái thank trên cũng được...

PHP:
// Thong Ke So Nguoi Thank JohnCMS 4.4
$thongkethank = mysql_query("SELECT COUNT(*) from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic`='" . $res["id"] . "'");
$thongkethanks = mysql_result($thongkethank, 0);
// $thongkethanks=mysql_result(mysql_query('SELECT COUNT(*) FROM `soo_forum_thank` WHERE `sid` = '" . $sid . "' and `topic` = "' . $res['id'] . '"')), 0);
$thongkea= @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id'] . "'");
$thongke=mysql_fetch_array($thongkea);
$idthongke=trim($_GET['idthongke']);
if($thongkethanks>0&&(empty($_GET['idthongke'])))
{
echo'<div class="func"><div id="'.$idthongke.'"><img src="../images/thanks.png" /> ';
$thongkeaa = @mysql_query("select * from `soo_forum_thank` where `sid` = '" . $sid . "' and `topic` = '" . $res['id'] . "'");
while ($thongkea = mysql_fetch_array($thongkeaa))
{
{
$dentv=mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$thongkea['userthank'].'"'));
echo '<a href="/users/profile.php?user='.$thongkea['userthank'].'">'.nick($dentv['id']).'</a>, ';
}
++$f;
}
echo'</div></div>';
}
/////////

Nguồn: WAPIT
 

Facebook Comments

New posts New threads New resources

Back
Top