Ðăng Nhập

View Full Version : Hỏi: tắt chức năng tự động gửi tin nhắn của vB Comment



nmhung
12-10-2011, 09:59 AM
Mình dùng VvB Comment - v1.2 để add thêm vào forum nhưng mỗi lần có người Comment thì diễn đàn lại tự động gửi 1 tin nhắn từ nick của admin tới thành viên được viết comment.
Vậy tắt chức năng này đi như thế nào?

Mong được giúp đỡ :MatCuoi (8):

Mình dùng bản VBcomment này: VvB Comment - v1.2.rar (http://3cdotcom.vn/data/data/Hungnm/3cdotcom/VvB%20Comment%20-%20v1.2.rar)

hoangmai
12-10-2011, 10:27 AM
haizzz.... hack rùi thì disable nó đi là hết chứ sao

nmhung
12-10-2011, 01:44 PM
khổ nỗi ko biết disable ở chỗ nào,trong quản trị ko có chức năng đó

Ai có thể chỉ cho mình cái disable chức năng gửi tin nhắn trong vB Comment - v1.2 được ko?

Xin cảm ơn

nmhung
26-12-2011, 08:23 AM
ai biết chỉ mình mới, cảm ơn

nmhung
26-12-2011, 08:09 PM
admin chỉ hộ mới,chờ mãi,tìm mãi mà ko biết chỉnh ntn.
giúp đỡ mình mới

nmhung
24-02-2012, 08:59 AM
Admin cùng các Mod,Smod có thể giúp mình vấn đề này được ko?
Mình xin cảm ơn

HTT.itvn
24-02-2012, 09:10 AM
Mod này không có chức nặng gỡ gửi tin nhắn đâu . Chỉ còn cách gỡ Mod vB Comment ra. Chưa tìm hiểu code mod này và máy đang dùng không cài localhost nên không chỉ dẫn cho bạn được. Bạn mày mò ở trong plugin liên quan của nó bằng cách gõ tìm $userid.

nmhung
24-02-2012, 09:48 AM
Mod này không có chức nặng gỡ gửi tin nhắn đâu . Chỉ còn cách gỡ Mod vB Comment ra. Chưa tìm hiểu code mod này và máy đang dùng không cài localhost nên không chỉ dẫn cho bạn được. Bạn mày mò ở trong plugin liên quan của nó bằng cách gõ tìm $userid.

Đây là toàn bộ code trong file comment.php



<?php
/*================================================= =====================*\
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ vB Comment @
@ Author: pdtan - VietVBB Administrator @
@ http://www.vietvbb.vn @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
\*================================================ ======================*/

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

define('CSRF_PROTECTION', true);
define('THIS_SCRIPT', 'comment');
$phrasegroups = array();

// pre-cache templates used by all actions
$globaltemplates = array(
'dt_vb_comment_form',
'dt_vb_comment_form_main',
);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/class_bbcode.php');
// ################################################## #####################
// ######################## START MAIN SCRIPT ############################
// ################################################## #####################
function pm($from, $to, $title, $messagetext)
{
global $vbulletin;
// create the DM to do error checking and insert the new PM
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_SILENT);
$pmdm->set('fromuserid', $from['userid']);
$pmdm->set('fromusername', $from['username']);
$pmdm->set_info('recept', false);
$pmdm->set_info('savecopy', false);
$pmdm->set('title', $title);
$pmdm->set('message', $messagetext);
$pmdm->set_recipients($to['username'], $from['permissions']);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
// ######################### SEARCH SCRIPT ############################

// ######################### SOME VARIABLES NEEDED ############################
if(!$vbulletin->options['dt_vb_comment_active']) eval(standard_error(fetch_error('dt_vb_comment_ina ctive')));
$vbcm_forumids = explode(",", $vbulletin->options['dt_vb_comment_exclforums']);
if(in_array($threadinfo['forumid'], $vbcm_forumids)) eval(standard_error(fetch_error('dt_vb_comment_ina ctive2')));
if (!$postinfo['postid'] OR !$threadinfo['threadid'] OR $postinfo['isdeleted'] OR $threadinfo['isdeleted'])
{
eval(standard_error(fetch_error('invalidid', $vbphrase['post'], $vbulletin->options['contactuslink'])));
}

if ($vbulletin->userinfo['userid'] == 0 AND $_REQUEST['do']!='listcm')
{
print_no_permission();
}

$userid = $db->query_first_slave("SELECT userid FROM " . TABLE_PREFIX . "post WHERE postid = $postid");
$userinfo = fetch_userinfo($userid['userid']);

$userid = $userinfo['userid'];

if (!$userid)
{
eval(standard_error(fetch_error('invalidid', $vbphrase['user'], $vbulletin->options['contactuslink'])));
}

// ######################### ADD SP ############################

if($_REQUEST['do'] == 'comment')
{
$vbulletin->input->clean_array_gpc('p', array(
'ajax' => TYPE_BOOL,
));
$opt = "";
if($vbulletin->userinfo['userid']==$userid){
$q = $vbulletin->db->query_write("
SELECT * FROM " . TABLE_PREFIX . "vbcomment
WHERE postid = $postid
ORDER BY id DESC
");
$cid = $tid = array();
while($cminfo = $vbulletin->db->fetch_array($q))
{
//$opt .= "<option value=\"$cminfo\">Comment #$cminfo[id]</option>\n";
if($cminfo['toid']) $tid[] = $cminfo['toid'];
else {
if($vbulletin->userinfo['userid']!=$cminfo['userid']) $cid[] = $cminfo['id'];
}
}
foreach($cid AS $ccid)
{
if(!in_array($ccid,$tid)) $opt .= "<option value=\"$ccid\">Comment #$ccid</option>\n";
}
}
$url = $vbulletin->url;
$templater = vB_Template::create('dt_vb_comment_form');
$templater->register('postid', $postid);
$templater->register('option', $opt);
$templater->register('url', $url);
$reputationbit = $templater->render();

if ($vbulletin->GPC['ajax'])
{
$templater = vB_Template::create('dt_vb_comment_form_main');
$templater->register('commentbit', $reputationbit);
$reputation = $templater->render();

require_once(DIR . '/includes/class_xml.php');
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_tag('vbcommentbit', process_replacement_vars($reputation));
$xml->print_xml();
}
else {
standard_error('Accept AJAX only!');
}
}
if ($_POST['do'] == 'insert')
{
$vbulletin->input->clean_array_gpc('p', array(
'vb_comment' => TYPE_STR,
'ajax' => TYPE_INT,
'toid' => TYPE_INT,
'url' => TYPE_NOHTML
));
$comment = convert_urlencoded_unicode($vbulletin->GPC['vb_comment']);
$toid = $vbulletin->GPC['toid'];
if($check = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "vbcomment WHERE toid=$toid AND toid!=0")) eval(standard_error(fetch_error('dt_vb_comment_cme d')));

$vbulletin->url = "{$vbulletin->GPC['url']}#post$postid";
if(!$comment) eval(standard_error(fetch_error('dt_vb_comment_no_ comment')));
else{
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "vbcomment(userid, postid, comment, dateline, toid)
VALUES({$vbulletin->userinfo['userid']}, $postid, '" . $vbulletin->db->escape_string($comment) . "', " . TIMENOW . ", $toid)
");
$id=$vbulletin->db->insert_id();
$pminfo = fetch_userinfo($vbulletin->options['dt_vb_comment_userid']);
$urlz = $vbulletin->options['bburl'] . '/' . fetch_seo_url('thread', $threadinfo) . "&p=$postid#comment$postid";
$mes = <<<mes
Hi $userinfo[username],
{$vbulletin->userinfo['username']} da viet 1 nhan xet trong bai viet cua ban.
Vui long vao link sau de xem link ($urlz)

[i]* Chu y: Day la tin nhan tu dong.Vui long ko gui lai!
mes;
if($vbulletin->userinfo['userid']!=$userid) pm($pminfo, $userinfo, 'Mot nhan xet da duoc viet trong bai cua ban', $mes);
if($toid){
$info = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "vbcomment WHERE id=$toid");
if($info['userid']){
$uinfo = fetch_userinfo($info['userid']);
$mes = <<<mes
Hi $uinfo[username],
{$vbulletin->userinfo['username']} has replied your comment.
Vui long vao link sau de xem link ($urlz)

* Chu y: Day la tin nhan tu dong.Vui long ko gui lai!
mes;
pm($pminfo, $uinfo, 'Your comment has been replied',$mes);
}
}
if($vbulletin->GPC['ajax'])
{
$cminfo = fetch_userinfo($vbulletin->userinfo['userid'],2);
$cminfo['time'] = vbcmdate($vbulletin->options['timeformat'], TIMENOW, true);
if ($cminfo['avatarid']) $cminfo['avatarurl'] = $cminfo['avatarpath'];
else {
if ($cminfo['hascustomavatar'] AND $vbulletin->options['avatarenabled'])
if ($vbulletin->options['usefileavatar']) $cminfo['avatarurl'] = $vbulletin->options['avatarurl'] . '/avatar' . $cminfo['userid'] . '_' . $cminfo['avatarrevision'] . '.gif';
else $cminfo['avatarurl'] = 'image.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $cminfo['userid'] . '&amp;dateline=' . $cminfo['avatardateline'];
else $cminfo['avatarurl'] = '';
}
$vbcm_groupids = explode(",", $vbulletin->options['dt_vb_comment_del_permission']);
if(in_array($vbulletin->userinfo['usergroupid'], $vbcm_groupids)) $show['candeletecm'] = true;
else $show['candeletecm'] = false;
$cminfo['postid'] = $postid;
$cminfo['id'] = $id;
if($toid) $tem = 'dt_vb_commentbit2';
else $tem = 'dt_vb_commentbit';
$vbulletin->options['allowsmilies'] = $vbulletin->options['dt_vb_comment_smilies'];
$templater = vB_Template::create($tem);
$cmparser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$vbulletin->options['allowsmilies'] = $vbulletin->options['dt_vb_comment_smilies'];
$cminfo['comment'] = $cmparser->parse(trim($comment), 'nonforum');
fetch_musername($cminfo);
$templater->register('cminfo',$cminfo);
$templater->register('show',$show);
$commentbit = $templater->render();
require_once(DIR . '/includes/class_xml.php');
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('vbcommentbit');
$xml->add_tag('postid', $postinfo['postid']);
$xml->add_tag('toid', $toid);
$xml->add_tag('info', process_replacement_vars($commentbit));
$xml->close_group();
$xml->print_xml();
} else {
$message = "Success ! This post is added $spp SP";
$vbulletin->url = "showthread.php?" . $vbulletin->session->vars['sessionurl'] ."p=$postid";
eval(print_standard_redirect($message,false, true));exit;
}
}
}

// ######################### REMOVE SP ############################

if($_REQUEST['do']=='deletecm')
{
$vbcm_groupids = explode(",", $vbulletin->options['dt_vb_comment_del_permission']);
if(!in_array($vbulletin->userinfo['usergroupid'], $vbcm_groupids) OR !can_moderate($threadinfo['forumid'], 'canmoderateposts')) print_no_permission();
$vbulletin->input->clean_array_gpc('r', array(
'cmid' => TYPE_INT,
));
$db->query_write("DELETE FROM " . TABLE_PREFIX . "vbcomment WHERE id = '{$vbulletin->GPC['cmid']}'");
$db->query_write("DELETE FROM " . TABLE_PREFIX . "vbcomment WHERE toid = '{$vbulletin->GPC['cmid']}'");
$vbulletin->url = fetch_seo_url('thread', $threadinfo, array('p' => $postid)) . "#post$postid";
eval(print_standard_redirect('redirect_reputationm inus'));
}

if($_POST['do']=='listcm')
{
$vb_comments = $vbulletin->db->query_read("
SELECT comment.*, user.*,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
" . ($vbulletin->options['avatarenabled'] ? ", avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline, customavatar.width AS avwidth, customavatar.height AS avheight" : "") . "
FROM " . TABLE_PREFIX . "vbcomment AS comment
LEFT JOIN " . TABLE_PREFIX . "user AS user ON (comment.userid = user.userid)
" . ($vbulletin->options['avatarenabled'] ? "LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON (avatar.avatarid = user.avatarid)
LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON (customavatar.userid = user.userid) " : "") . "
WHERE comment.postid = '{$postinfo['postid']}'
ORDER BY comment.dateline {$vbulletin->options['dt_vb_comment_sort']}
");
$commentbit = "";
$vbcm_groupids = explode(",", $vbulletin->options['dt_vb_comment_del_permission']);
if(in_array($vbulletin->userinfo['usergroupid'], $vbcm_groupids)) $show['candeletecm'] = true;
else $show['candeletecm'] = false;
$subcm = $vbcm = array();

while ($cminfo=$vbulletin->db->fetch_array($vb_comments))
{
$cminfo['time'] = vbcmdate($vbulletin->options['timeformat'], $cminfo['dateline'], true);
if ($cminfo['avatarid']) $cminfo['avatarurl'] = $cminfo['avatarpath'];
else {
if ($cminfo['hascustomavatar'] AND $vbulletin->options['avatarenabled'])
if ($vbulletin->options['usefileavatar']) $cminfo['avatarurl'] = $vbulletin->options['avatarurl'] . '/avatar' . $cminfo['userid'] . '_' . $cminfo['avatarrevision'] . '.gif';
else $cminfo['avatarurl'] = 'image.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $cminfo['userid'] . '&amp;dateline=' . $cminfo['avatardateline'];
else $cminfo['avatarurl'] = '';
}
$cmparser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
$vbulletin->options['allowsmilies'] = $vbulletin->options['dt_vb_comment_smilies'];
$cminfo['comment'] = $cmparser->parse(trim($cminfo['comment']), 'nonforum');
fetch_musername($cminfo);
if($cminfo['toid']) $subcm["{$cminfo['toid']}"] = $cminfo;
else $vbcm[] = $cminfo;
}
unset($cminfo);
foreach ($vbcm AS $cminfo)
{
if($subcm["{$cminfo['id']}"]){
$templater1 = vB_Template::create('dt_vb_commentbit2');
$templater1->register('cminfo',$subcm["{$cminfo['id']}"]);
$templater1->register('show',$show);
$subcminfo = $templater1->render();
}
else $subcminfo = "";
$templater = vB_Template::create('dt_vb_commentbit');
$templater->register('cminfo',$cminfo);
$templater->register('show',$show);
$templater->register('subcomment',$subcminfo);
$commentbit .= $templater->render();
}
$vbulletin->db->free_result($vb_comments);
echo $commentbit;exit;
}
?>


Trong này mình tìm có đoạn code gửi tin nhắn,nhưng mình ko biết xóa từ chỗ nào.Mong bạn chỉ giúp