Бормотухи.НЕТ

Вернуться   Бормотухи.НЕТ > Web-мастеру > vBulletin 4.x > Хаки для vBulletin 4.x
Расширенный поиск

Хаки для vBulletin 4.x Скачать хаки для vBulletin 4.x

Ответ
 
Опции темы Поиск в этой теме
Старый 30.04.2015, 02:04 Вверх   #1
.:V.I.P.:.
 
Аватар для EHOT
EHOT вне форума
Доп. информация
По умолчанию Чат бокс, нужно спрятать ник

Вот покопался в кодах чатбокса и сделал так, что при наборе /re + текст
получался такое сообщение
[Системное сообщение] sdfg


Как можно убрать ник автора?
Что бы реально казался системным сообщением.
Я уже пытался менять переменные, ничего не получается.


Код:
if ($vbulletin->options['vsachatbox_enable_product'] AND !VSacb_userExcluded($vbulletin->userinfo) AND empty($vbulletin->userinfo['infractiongroupids']) AND $vsacb_hasenoughposts)
		{
			function VSacb_buildTime($vsacb_reqtime = TIMENOW)
			{
				global $vbulletin;
				$vsacb_time = '';
				if ($vbulletin->options['vsachatbox_dateformat']!='')
				{
					$vsacb_time = vbdate($vbulletin->options['vsachatbox_dateformat'], $vsacb_reqtime);
					$vsacb_time .= ', ';
				}
				$vsacb_time .= vbdate($vbulletin->options['vsachatbox_timeformat'], $vsacb_reqtime);
				return $vsacb_time;
			}

			function VSacb_clickableLinks($vsacb_text)
			{
			    $vsacb_text = preg_replace("/(\r\n|\n|\r)/", "\n", $vsacb_text);
			    $vsacb_lines = explode("\n", $vsacb_text);
			    for ($x = 0, $y = count($vsacb_lines); $x < $y; $x++) {
			        $vsacb_line = $vsacb_lines[$x];
			        $vsacb_words = explode(' ', $vsacb_line);
			        for ($vsacb_i = 0, $j = count($vsacb_words); $vsacb_i < $j; $vsacb_i++) {
			            $vsacb_word = $vsacb_words[$vsacb_i];
			            $vsacb_punctuation = '.,\'")(<>;:';
			            if (substr($vsacb_word, 0, 7) == 'http://' || substr($vsacb_word, 0, 8) == 'https://' || substr($vsacb_word, 0, 4) == 'www.')
						{
			                $trailing = '';
			                $vsacb_last = substr($vsacb_word, -1);
			                while (strpos($vsacb_punctuation, $vsacb_last) !== false) {
			                    $trailing .= $vsacb_last;
			                    $vsacb_word = substr($vsacb_word, 0, -1);
			                    $vsacb_last = substr($vsacb_word, -1);
			                }
			                $vsacb_link = $vsacb_word;
			                if (substr($vsacb_link, 0, 4) == 'www.') {
			                    $vsacb_link = 'http://'.$vsacb_link;
			                }
			                $vsacb_word = ''.$vsacb_word.''.$trailing;
			            }
			            $vsacb_words[$vsacb_i] = $vsacb_word;
			        }
			        $vsacb_lines[$x] = implode(' ', $vsacb_words);
			    }
			    return implode("\n", $vsacb_lines);
			}

			require_once(DIR . '/includes/class_bbcode.php');
			$vsacb_bbparser = new vB_BbCodeParser($vbulletin, fetch_tag_list());

			$vsacb_smilies_onoff = $vbulletin->options['vsachatbox_smilies_parse'];

			if (($_REQUEST['do']=='cchatbox') OR ($_REQUEST['do']=='ccarc'))
			{
				$vbulletin->db->hide_errors();
				$vsacb_xhours = TIMENOW - ($vbulletin->options['vsachatbox_stats_lastxhours'] * 60 * 60);
				$vsacb_mymessage = 0;
				$vsacb_xhoursmessage = 0;
				$vsacb_get_stats = $vbulletin->db->query_read("SELECT id, userid, dateline FROM " . TABLE_PREFIX . "vsa_chatbox ");
				while ($vsacb_stats = $vbulletin->db->fetch_array($vsacb_get_stats))
				{
					if ($vsacb_stats[userid] == $vbulletin->userinfo['userid'])
					{
						$vsacb_mymessage += 1;
					}

					if ($vsacb_stats[dateline] > $vsacb_xhours)
					{
						$vsacb_xhoursmessage += 1;
					}
				}
				$vsacb_totalentries = $vbulletin->db->num_rows($vsacb_get_stats);
				$vsacb_totalmessages = vb_number_format($vsacb_totalentries);
				$vsacb_mymessages = vb_number_format($vsacb_mymessage);
				$vsacb_xhoursmessages = vb_number_format($vsacb_xhoursmessage);
				unset($vsacb_get_stats, $vsacb_stats);

				$vsacb_get_topx = $vbulletin->db->query("
					SELECT COUNT(id) AS vsacb_msgs, vsa_chatbox.userid, user.username, user.usergroupid
					FROM " . TABLE_PREFIX . "vsa_chatbox AS vsa_chatbox
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON (vsa_chatbox.userid = user.userid)
					WHERE vsa_chatbox.userid > 0
					GROUP BY vsa_chatbox.userid
					ORDER BY vsacb_msgs DESC
					LIMIT 0, ".$vbulletin->options['vsachatbox_topx_results']."
				");
				$vsacb_topx_total = $vbulletin->db->num_rows($vsacb_get_topx);
				if ($vsacb_topx_total < $vbulletin->options['vsachatbox_topx_results'])
				{
					$vsacb_topx_res = $vsacb_topx_total;
				}
				else
				{
					$vsacb_topx_res = $vbulletin->options['vsachatbox_topx_results'];
				}
				while ($vsacb_topposter = $vbulletin->db->fetch_array($vsacb_get_topx))
				{
					$vsacb_topposternr += 1;
					$templater = vB_Template::create('vsa_chatbox_topchatters_bit');
					$templater->register('vsacb_topposter', $vsacb_topposter);
					$templater->register('vsacb_topposternr', $vsacb_topposternr);
					$vsacb_topchatters .= $templater->render();
				}
				unset($vsacb_get_topx, $vsacb_topposter);

				if ($vbulletin->options['vsachatbox_excluded_users']!='')
				{
					$vsacb_banlist_get = explode(',',$vbulletin->options['vsachatbox_excluded_users']);
					foreach ($vsacb_banlist_get AS $vsacb_banlist_item)
					{
						$vsacb_banlist_userinfo = fetch_userinfo($vsacb_banlist_item);
						if ($vsacb_canmod)
						{
							$vsacb_banlist_usercell[] = '<a style="white-space:nowrap;" href="javascript:VSacb_Confirm(\'unbanuser\',\''.$vsacb_banlist_item.'\',\''.$vsacb_banlist_userinfo['username'].'\');">'.$vsacb_banlist_userinfo['musername'].'</a>';
						}
						else
						{
							$vsacb_banlist_usercell[] = '<a style="white-space:nowrap;" href="member.php?'.$vbulletin->session->vars['sessionurl'].'u='.$vsacb_banlist_item.'">'.$vsacb_banlist_userinfo['musername'].'</a>';
						}
					}
					sort($vsacb_banlist_usercell);
					foreach ($vsacb_banlist_usercell AS $vsacb_banlist_user)
					{
						$vsacb_banlist .= $vsacb_banlist_user;
					}
					unset($vsacb_banlist_get, $vsacb_banlist_item, $vsacb_banlist_user);
				}

				$vbulletin->db->show_errors();

				$templater = vB_Template::Create('vsa_chatbox_input');
				$templater->register('vsacb_cantpost', $vsacb_cantpost);
				$templater->register('vsacb_smilies_init', $vsacb_smilies_init);
				$templater->register('vsacb_colors', $vsacb_colors);
				$templater->register('vsacb_smilie_first', $vsacb_smilie_first);
				$templater->register('vsacb_textsize', $vsacb_textsize);
				$templater->register('vsacb_color_default', $vsacb_color_default);
				$vsachatbox_input = $templater->render();

				$templater = vB_Template::Create('vsa_chatbox_dropdown');
				$templater->register('vsacb_canmod', $vsacb_canmod);
				$templater->register('vsacb_candelall', $vsacb_candelall);
				$templater->register('vsacb_totalmessages', $vsacb_totalmessages);
				$templater->register('vsacb_xhoursmessages', $vsacb_xhoursmessages);
				$templater->register('vsacb_mymessages', $vsacb_mymessages);
				$templater->register('vsacb_topx_res', $vsacb_topx_res);
				$templater->register('vsacb_topchatters', $vsacb_topchatters);
				$templater->register('vsacb_banlist', $vsacb_banlist);
				$vsachatbox_dropdown = $templater->render();

				$templater = vB_Template::Create('vsa_chatbox_status');
				$templater->register('vsacb_sizes', $vsacb_sizes);
				$vsachatbox_status = $templater->render();

				$navbits = construct_navbits(array('' => $vbphrase['vsacb_chatbox_full']));
				$navbar = render_navbar_template($navbits);
				$templater = vB_Template::Create('vsa_chatbox');
				$templater->register_page_templates();
				$templater->register('navbar', $navbar);
				$templater->register('vsachatbox_input', $vsachatbox_input);
				$templater->register('vsachatbox_status', $vsachatbox_status);
				$templater->register('vsachatbox_dropdown', $vsachatbox_dropdown);
				$templater->register('vsacb_mymessages', $vsacb_mymessages);
				$templater->register('vsacb_totalmessages', $vsacb_totalmessages);
				$templater->register('vsacb_xhoursmessages', $vsacb_xhoursmessages);
				$templater->register('vsacb_topchatters', $vsacb_topchatters);
				$templater->register('vsacb_topx_res', $vsacb_topx_res);
				$templater->register('vsacb_banlist', $vsacb_banlist);
				$templater->register('vsacb_totalentries', $vsacb_totalentries);
				$templater->register('vsacb_canmod', $vsacb_canmod);
				$templater->register('vsacb_candelall', $vsacb_candelall);
				$templater->register('vsacb_locs', $vsacb_locs);
				$templater->register('vsacb_oneforum', $vsacb_oneforum);
				$templater->register('vsacb_newstat', $vsacb_newstat);
				$templater->register('vsacb_textsize', $vsacb_textsize);
				$templater->register('vsacb_color_default', $vsacb_color_default);
				$templater->register('vsacb_cantpost', $vsacb_cantpost);
				$vsachatbox = $templater->render();
			}

			if ($_REQUEST['do']=='cchatbox')
			{
				$vbulletin->db->hide_errors();
				$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "session SET lastactivity = '".TIMENOW."', location = 'cchatbox' WHERE userid = " . $vbulletin->userinfo['userid']);
				$vbulletin->db->show_errors();
				print_output($vsachatbox);
			}

			if ($_REQUEST['ccbloc']!='')
			{
				$vbulletin->db->hide_errors();
				$vsacb_locmessid = $vbulletin->input->clean_gpc('r', 'ccbloc', TYPE_UINT);

				if ($vsacb_locmessid)
				{
					$vsacb_getlocpos = $vbulletin->db->query_read("
						SELECT id
						FROM " . TABLE_PREFIX . "vsa_chatbox
						WHERE id >= '".$vsacb_locmessid."'
					");
					$vsacb_findlocpos = $vbulletin->db->num_rows($vsacb_getlocpos);
					$vsacb_loctargetpage = ceil($vsacb_findlocpos / $vbulletin->options['vsachatbox_archive_perpage']);
					$vsacb_locredirect = 'misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc&amp;page='.$vsacb_loctargetpage.'&amp;cm='.$vsacb_locmessid.'#'.$vsacb_locmessid;
				}
				else
				{
					$vsacb_locredirect = 'misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc&amp;ccbnomess=true';
				}
				$vbulletin->db->show_errors();
				exec_header_redirect($vsacb_locredirect);
			}

			if ($_REQUEST['ccbfind']!='')
			{
				$vbulletin->db->hide_errors();
				if ($_REQUEST['ccbfind']=='unread')
				{
					$vsacb_lastmess_unread = $vbulletin->db->query_first("
						SELECT id
						FROM " . TABLE_PREFIX . "vsa_chatbox
						WHERE dateline > '".$vbulletin->userinfo['lastvisit']."'
						ORDER BY dateline ASC
					");
					$vsacb_reqmid = $vsacb_lastmess_unread['id'];
				}
				else
				{
					$vsacb_lastmessuser = $vbulletin->input->clean_gpc('r', 'ccbfind', TYPE_UINT);
					$vsacb_lastmess_user = $vbulletin->db->query_first("
						SELECT MAX(id) AS id
						FROM " . TABLE_PREFIX . "vsa_chatbox
						WHERE userid = '".$vsacb_lastmessuser."'
					");
					$vsacb_reqmid = $vsacb_lastmess_user['id'];
				}
				if ($vsacb_reqmid)
				{
					$vsacb_getfindpos = $vbulletin->db->query_read("
						SELECT id
						FROM " . TABLE_PREFIX . "vsa_chatbox
						WHERE id >= '".$vsacb_reqmid."'
					");
					$vsacb_findpos = $vbulletin->db->num_rows($vsacb_getfindpos);
					$vsacb_targetpage = ceil($vsacb_findpos / $vbulletin->options['vsachatbox_archive_perpage']);
					$vsacb_findredirect = 'misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc&amp;page='.$vsacb_targetpage.'&amp;cm='.$vsacb_reqmid.'#'.$vsacb_reqmid;
				}
				else
				{
					$vsacb_findredirect = 'misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc&amp;ccbnomess=true';
				}
				$vbulletin->db->show_errors();
				exec_header_redirect($vsacb_findredirect);
			}

			if ($_REQUEST['do']=='ccarc')
			{
				$vbulletin->db->hide_errors();
				$vsacb_globals = array(
					'cbt' => TYPE_STR,
					'cbu' => TYPE_UINT
				);
				$vbulletin->input->clean_array_gpc('r', $vsacb_globals);

				$vsacb_search_value = $vbphrase['vsacb_search_chatbox'];

				$vsacb_targettext = htmlspecialchars($vbulletin->GPC['cbt']);
				if ($vsacb_targettext)
				{
					$vsacb_onlytext = "AND vsa_chatbox.message LIKE '%".$vbulletin->db->escape_string($vsacb_targettext)."%' ";
					$vsacb_search_value = $vsacb_targettext;
				}

				$vsacb_targetuser = $vbulletin->GPC['cbu'];
				if ($vsacb_targetuser)
				{
					$vsacb_onlyuser = "AND vsa_chatbox.userid = '".$vsacb_targetuser."' ";
				}

				$vsacb_get_msg_nav = $vbulletin->db->query_read("
					SELECT vsa_chatbox.id, vsa_chatbox.message
					FROM ".TABLE_PREFIX."vsa_chatbox AS vsa_chatbox
					WHERE vsa_chatbox.message !='' $vsacb_onlytext $vsacb_onlyuser
				");
				$vsacb_totalnav = $vbulletin->db->num_rows($vsacb_get_msg_nav);

				$navbits = array('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['vsacb_chatbox']);
				$perpage = $vbulletin->input->clean_gpc('r', 'perpage', TYPE_UINT);

				$pagenumber = $vbulletin->input->clean_gpc('r', 'pagenumber', TYPE_UINT);
				sanitize_pageresults($vsacb_totalnav, $pagenumber, $perpage, 40, $vbulletin->options['vsachatbox_archive_perpage']);
				$limitlower = ($pagenumber - 1) * $perpage + 1;
				if ($limitlower <= 0)
				{
					$limitlower = 1;
				}

				$vsacb_get_msg_arc = $vbulletin->db->query_read("
					SELECT vsa_chatbox.id, vsa_chatbox.userid, vsa_chatbox.userip, vsa_chatbox.message, vsa_chatbox.dateline, vsa_chatbox.textprop, user.username, user.usergroupid, user.displaygroupid
					FROM ".TABLE_PREFIX."vsa_chatbox AS vsa_chatbox
					LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = vsa_chatbox.userid)
					WHERE vsa_chatbox.message !='' $vsacb_onlytext $vsacb_onlyuser $vsacb_onlymessage
					ORDER BY vsa_chatbox.dateline DESC
					LIMIT " . ($limitlower - 1) . "," . $perpage . "
				");
				while ($vsacb_msg_arc = $vbulletin->db->fetch_array($vsacb_get_msg_arc))
				{
					$vsacb_msg_arc_nr += 1;
					$vsacb_msg_arc_staff = false;
					if (is_member_of($vsacb_msg_arc, explode(',', '5,6,7')))
					{
						$vsacb_msg_arc_staff = true;
					}

					$vsacb_msg_arc_id = $vsacb_msg_arc['id'];
					$vsacb_msg_arc['message'] = htmlspecialchars_uni($vsacb_msg_arc['message']);
					$vsacb_msg_arc['musername'] = fetch_musername($vsacb_msg_arc);

					$vsacb_msg_arc_banned = false;
					eval('$vsacb_bannedusers = in_array($vsacb_msg_arc[userid], array(' . $vbulletin->options['vsachatbox_excluded_users'] . '));');
					if (in_array($vsacb_msg_arc[userid], array($vsacb_bannedusers)))
					{
						$vsacb_msg_arc_banned = true;
					}

					$vsacb_msg_arc['time'] = VSacb_buildTime($vsacb_msg_arc['dateline']);
					if ($vsacb_msg_arc['dateline']>$vbulletin->userinfo['lastvisit'])
					{
						$vsacb_msg_arc_icon = '<img class="inlineimg" src="'.vB_Template_Runtime::fetchStyleVar('imgdir_statusicon').'/post_new.png" alt="'.$vbphrase['new'].'" border="0" /> ';
					}
					else
					{
						$vsacb_msg_arc_icon = '<img class="inlineimg" src="'.vB_Template_Runtime::fetchStyleVar('imgdir_statusicon').'/post_old.png" alt="'.$vbphrase['new'].'" border="0" /> ';
					}
					$vsacb_arc_coloropen = '';
					$vsacb_arc_colorclose = '';
					$vsacb_arc_boldopen = '';
					$vsacb_arc_boldclose = '';
					$vsacb_arc_italicopen = '';
					$vsacb_arc_italicclose = '';
					$vsacb_arc_underlineopen = '';
					$vsacb_arc_underlineclose = '';
					$vsacb_msg_arc['textprop'] = unserialize($vsacb_msg_arc['textprop']);
					if ($vsacb_msg_arc['textprop']['color'] AND $vbulletin->options['vsachatbox_colors_enabled'])
					{
						$vsacb_arc_coloropen = '[color='.$vsacb_msg_arc['textprop']['color'].']';
						$vsacb_arc_colorclose = '[/color]';
					}
					if ($vsacb_msg_arc['textprop']['bold'])
					{
						$vsacb_arc_boldopen = '';
						$vsacb_arc_boldclose = '';
					}
  Ответить с цитированием
Старый 30.04.2015, 02:05 Вверх   #2
.:V.I.P.:.
 
Аватар для EHOT
EHOT вне форума
Доп. информация
По умолчанию

продолжение кода
Код:
if ($vsacb_msg_arc['textprop']['italic'])
					{
						$vsacb_arc_italicopen = '';
						$vsacb_arc_italicclose = '';
					}
					if ($vsacb_msg_arc['textprop']['underline'])
					{
						$vsacb_arc_underlineopen = '';
						$vsacb_arc_underlineclose = '';
					}

					if ($vbulletin->options['vsachatbox_clickable_links'])
					{
						$vsacb_msg_arc_tow = VSacb_clickableLinks($vsacb_msg_arc['message']);
					}
					else
					{
						$vsacb_msg_arc_tow = $vsacb_msg_arc['message'];
					}

					$vsacb_msg_arc_styled = $vsacb_arc_coloropen.$vsacb_arc_boldopen.$vsacb_arc_italicopen.$vsacb_arc_underlineopen.$vsacb_msg_arc_tow.$vsacb_arc_underlineclose.$vsacb_arc_italicclose.$vsacb_arc_boldclose.$vsacb_arc_colorclose;

					$vsacb_msg_arc_parsed = str_replace('\'', ''', $vsacb_bbparser->do_parse($vsacb_msg_arc_styled,1,$vsacb_smilies_onoff,1,1,1));

					$templater = vB_Template::create('vsa_chatbox_archive_bit');
					$templater->register('vsacb_msg_arc_nr', $vsacb_msg_arc_nr);
					$templater->register('vsacb_msg_arc_id', $vsacb_msg_arc_id);
					$templater->register('vsacb_msg_arc', $vsacb_msg_arc);
					$templater->register('vsacb_msg_arc_icon', $vsacb_msg_arc_icon);
					$templater->register('vsacb_msg_arc_parsed', $vsacb_msg_arc_parsed);
					$templater->register('vsacb_msg_arc_staff', $vsacb_msg_arc_staff);
					$templater->register('vsacb_msg_arc_banned', $vsacb_msg_arc_banned);
					$templater->register('vsacb_canmod', $vsacb_canmod);
					$templater->register('vsacb_canedit', $vsacb_canedit);
					$templater->register('vsacb_totalentries', $vsacb_totalentries);
					$templater->register('vsacb_targettext', $vsacb_targettext);

					if ($vbulletin->options['vsachatbox_reverse_messages_arc'])
					{
						$vsacb_msgs_arc[] .= $templater->render();
					}
					else
					{
						$vsacb_msgs_arc .= $templater->render();
					}
				}

				if ($vbulletin->options['vsachatbox_reverse_messages_arc'])
				{
					if (!empty($vsacb_msgs_arc))
					{
						$vsacb_msgs_arc_rev = array_reverse($vsacb_msgs_arc);
						foreach ($vsacb_msgs_arc_rev as $vsacb_msg_arc_rev)
						{
							$vsacb_msgs_arc_final .= $vsacb_msg_arc_rev;
						}
					}
					else
					{
						$vsacb_msgs_arc_final = '';
					}
				}
				else
				{
					$vsacb_msgs_arc_final = $vsacb_msgs_arc;
				}

				unset($vsacb_get_msg_arc, $vsacb_msg_arc);

				$pagenav = construct_page_nav($pagenumber, $perpage, $vsacb_totalnav, 'misc.php?' . $vbulletin->session->vars['sessionurl'] . 'do=ccarc'
					. (!empty($vbulletin->GPC['perpage']) ? "&amp;pp=$perpage" : "")
					. (!empty($vsacb_targetuser) ? "&amp;cbu=$vsacb_targetuser" : "")
					. (!empty($vsacb_targettext) ? "&amp;cbt=$vsacb_targettext" : "")
				);

				$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "session SET lastactivity = '".TIMENOW."', location = 'ccarc' WHERE userid = " . $vbulletin->userinfo['userid']);
				$vbulletin->db->show_errors();

				$navbits = construct_navbits(array('' => $vbphrase['vsacb_archive']));
				$navbar = render_navbar_template($navbits);
				$templater = vB_Template::Create('vsa_chatbox');
				$templater->register_page_templates();
				$templater->register('navbar', $navbar);
				$templater->register('vsachatbox_dropdown', $vsachatbox_dropdown);
				$templater->register('vsacb_totalmessages', $vsacb_totalmessages);
				$templater->register('vsacb_totalentries', $vsacb_totalentries);
				$templater->register('vsacb_xhoursmessages', $vsacb_xhoursmessages);
				$templater->register('vsacb_mymessages', $vsacb_mymessages);
				$templater->register('vsacb_topx_res', $vsacb_topx_res);
				$templater->register('vsacb_topchatters', $vsacb_topchatters);
				$templater->register('vsacb_candelall', $vsacb_candelall);
				$templater->register('vsacb_banlist', $vsacb_banlist);
				$templater->register('vsacb_targettext', $vsacb_targettext);
				$templater->register('vsacb_targetuser', $vsacb_targetuser);
				$templater->register('vsacb_msgs_arc_final', $vsacb_msgs_arc_final);
				$templater->register('vsacb_canmod', $vsacb_canmod);
				$templater->register('vsacb_canedit', $vsacb_canedit);
				$templater->register('pagenav', $pagenav);
				$templater->register('vsacb_cantpost', $vsacb_cantpost);
				$templater->register('vsacb_search_value', $vsacb_search_value);
				$templater->register('vsacb_locs', $vsacb_locs);
				$templater->register('vsacb_oneforum', $vsacb_oneforum);
				$vsachatbox = $templater->render();
				print_output($vsachatbox);
			}

			if (($_REQUEST['show']=='ccbusers') AND (THIS_SCRIPT=='misc'))
			{
				$vbulletin->db->hide_errors();
				$vsacb_viewers_timecut = TIMENOW - ($vbulletin->options['vsachatbox_viewers_timecut'] * 60);
				$vsacb_viewers_reg = 0;
				$vsacb_viewers_unreg = 0;

				$vsacb_getviewers = $vbulletin->db->query_read("
					SELECT session.lastactivity, session.userid, session.location, session.host, user.username, user.usergroupid, user.displaygroupid, IF(user.options & " . $vbulletin->bf_misc_useroptions['invisible'] . ", 1, 0) AS invisible
					FROM " . TABLE_PREFIX . "session AS session
					LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = session.userid)
					WHERE session.lastactivity > $vsacb_viewers_timecut AND session.location LIKE '%cchatbox%' OR session.location LIKE '%ccarc%'
					GROUP BY session.userid
					ORDER BY user.username ASC
				");
				$vbulletin->db->show_errors();
				while ($vsacb_viewer = $vbulletin->db->fetch_array($vsacb_getviewers))
				{
					$vsacb_markinv = '';
					$vsacb_viewer_visible = true;
					if ($vsacb_viewer[invisible])
					{
						$vsacb_viewer_visible = false;
						if (($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canseehidden']) OR $vsacb_viewer['userid'] == $vbulletin->userinfo['userid'])
						{
							$vsacb_markinv = '*';
							$vsacb_viewer_visible = true;
						}
					}
					if ($vsacb_viewer[userid]!=0)
					{
						$vsacb_viewers_reg += 1;
						$vsacb_viewer_username = fetch_musername($vsacb_viewer);
						$vsacb_viewer_lastact = vbdate('d-m, H:i', $vsacb_viewer[lastactivity]);
						if ($vsacb_viewer_visible)
						{
							$vsacb_viewer_item .= ', <a href="member.php?'.$vbulletin->session->vars['sessionurl'].'u='.$vsacb_viewer[userid].'" title="'.$vsacb_viewer_lastact.'">'.$vsacb_viewer_username.'</a>'.$vsacb_markinv;
						}
						else
						{
							$vsacb_viewer_item .= ', '.$vbphrase['vsacb_invisible'];
						}
					}
					else
					{
						$vsacb_viewers_unreg += 1;
					}
				}
				$vsacb_viewers_total = $vsacb_viewers_reg + $vsacb_viewers_unreg;
				$vsacb_viewers_list = substr($vsacb_viewer_item, 2);
				unset($vsacb_getviewers, $vsacb_viewer);
				echo ('<tr>
						<td colspan="5">
							'.construct_phrase($vbphrase['vsacb_active_users_x'], $vbulletin->options['vsachatbox_viewers_timecut'], $vsacb_viewers_total, $vsacb_viewers_reg, $vsacb_viewers_unreg).'
						</td>
					</tr>' . iif($vsacb_viewers_list,'<tr><td colspan="5">'.$vsacb_viewers_list.'</td></tr>',''));
				exit;
			}

			if ($_REQUEST['show']=='ccbmessages')
			{
				$stylevar[codeblockwidth] = $vbulletin->options['vsachatbox_code_maxwidth'].'px';
				$vbulletin->db->hide_errors();
				$vsacb_get_msg_box = $vbulletin->db->query_read("
					SELECT vsa_chatbox.id, vsa_chatbox.userid, vsa_chatbox.message, vsa_chatbox.dateline, vsa_chatbox.textprop, user.username, user.usergroupid, user.displaygroupid
					FROM ".TABLE_PREFIX."vsa_chatbox AS vsa_chatbox
					LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = vsa_chatbox.userid)
					ORDER BY vsa_chatbox.dateline DESC
					LIMIT 0, " . $vbulletin->options['vsachatbox_messages_main'] . "
				");
				$vbulletin->db->show_errors();
				$vsacb_box_totalmessages = $vbulletin->db->num_rows($vsacb_get_msg_box);
				while ($vsacb_msg_box = $vbulletin->db->fetch_array($vsacb_get_msg_box))
				{
					$vsacb_msg_box_id = $vsacb_msg_box['id'];
					$vsacb_msg_box['message'] = htmlspecialchars_uni($vsacb_msg_box['message']);
					if ($vbulletin->options['vsachatbox_clickable_links'])
					{
						$vsacb_msg_box['message'] = VSacb_clickableLinks($vsacb_msg_box['message']);
					}
					$vsacb_msg_box['musername'] = fetch_musername($vsacb_msg_box);

					$vsacb_msg_box_banned = false;
					eval('$vsacb_bannedusers = in_array($vsacb_msg_box[userid], array(' . $vbulletin->options['vsachatbox_excluded_users'] . '));');
					if (in_array($vsacb_msg_box[userid], array($vsacb_bannedusers)))
					{
						$vsacb_msg_box_banned = true;
					}

					$vsacb_msg_box['time'] = VSacb_buildTime($vsacb_msg_box['dateline']);
					if ($vsacb_msg_box['dateline']>$vbulletin->userinfo['lastvisit'])
					{
						$vsacb_msg_box_icon = '<img class="inlineimg" src="'.vB_Template_Runtime::fetchStyleVar('imgdir_statusicon').'/post_new.png" alt="'.$vbphrase['new'].'" border="0" /> ';
					}
					else
					{
						$vsacb_msg_box_icon = '<img class="inlineimg" src="'.vB_Template_Runtime::fetchStyleVar('imgdir_statusicon').'/post_old.png" alt="'.$vbphrase['new'].'" border="0" /> ';
					}
					$vsacb_box_coloropen = '';
					$vsacb_box_colorclose = '';
					$vsacb_box_boldopen = '';
					$vsacb_box_boldclose = '';
					$vsacb_box_italicopen = '';
					$vsacb_box_italicclose = '';
					$vsacb_box_underlineopen = '';
					$vsacb_box_underlineclose = '';
					$vsacb_msg_box['textprop'] = unserialize($vsacb_msg_box['textprop']);
					if ($vsacb_msg_box['textprop']['color'] AND $vbulletin->options['vsachatbox_colors_enabled'])
					{
						$vsacb_box_coloropen = '[color='.$vsacb_msg_box['textprop']['color'].']';
						$vsacb_box_colorclose = '[/color]';
					}
					if ($vsacb_msg_box['textprop']['bold'])
					{
						$vsacb_box_boldopen = '';
						$vsacb_box_boldclose = '';
					}
					if ($vsacb_msg_box['textprop']['italic'])
					{
						$vsacb_box_italicopen = '';
						$vsacb_box_italicclose = '';
					}
					if ($vsacb_msg_box['textprop']['underline'])
					{
						$vsacb_box_underlineopen = '';
						$vsacb_box_underlineclose = '';
					}
					$vsacb_msg_box_styled = $vsacb_box_coloropen.$vsacb_box_boldopen.$vsacb_box_italicopen.$vsacb_box_underlineopen.$vsacb_msg_box['message'].$vsacb_box_underlineclose.$vsacb_box_italicclose.$vsacb_box_boldclose.$vsacb_box_colorclose;
					$vsacb_msg_box_parsed = str_replace('\'', ''', $vsacb_bbparser->do_parse($vsacb_msg_box_styled,1,$vsacb_smilies_onoff,1,1,1));

					$templater = vB_Template::create('vsa_chatbox_bit');
					$templater->register('vsachatbox_dropdown', $vsachatbox_dropdown);
					$templater->register('vsacb_msg_box_parsed', $vsacb_msg_box_parsed);
					$templater->register('vsacb_msg_box_id', $vsacb_msg_box_id);
					$templater->register('vsacb_msg_box', $vsacb_msg_box);
					$templater->register('vsacb_msg_box_icon', $vsacb_msg_box_icon);

					if ($vbulletin->options['vsachatbox_reverse_messages'])
					{
						$vsacb_msgs_box[] .= $templater->render();
					}
					else
					{
						$vsacb_msgs_box .= $templater->render();
					}
				}
				if ($vbulletin->options['vsachatbox_reverse_messages'])
				{
					if (!empty($vsacb_msgs_box))
					{
						$vsacb_msgs_box_rev = array_reverse($vsacb_msgs_box);
						foreach ($vsacb_msgs_box_rev as $vsacb_msg_box_rev)
						{
							$vsacb_msgs_box_final .= $vsacb_msg_box_rev;
						}
					}
					else
					{
						$vsacb_msgs_box_final = '';
					}
				}
				else
				{
					$vsacb_msgs_box_final = $vsacb_msgs_box;
				}
				unset($vsacb_get_msg_box, $vsacb_msg_box);
				if ($vsacb_box_totalmessages>0)
				{
					echo ($vsacb_msgs_box_final);
				}
				else
				{
					echo ('<tr><td>'.$vbphrase['vsacb_no_messages'].'</td></tr>');
				}
				exit;
			}

			if ($_REQUEST['show']=='ccbsmilies')
			{
				if ($vbulletin->options['vsachatbox_smiliestotal']>1)
				{
					$vsacb_fsmilies_limit = "LIMIT 0, ".$vbulletin->options['vsachatbox_smiliestotal']."";
				}
				$vbulletin->db->hide_errors();
				$vsacb_get_fsmilies = $vbulletin->db->query_read_slave("
					SELECT smilieid, smilietext, smiliepath, smilie.title, imagecategory.title AS category
					FROM " . TABLE_PREFIX . "smilie AS smilie
					LEFT JOIN " . TABLE_PREFIX . "imagecategory AS imagecategory USING(imagecategoryid)
					ORDER BY imagecategory.displayorder, imagecategory.title, smilie.displayorder
					$vsacb_fsmilies_limit
				");
				$vsacb_fsmilies_total = $vbulletin->db->num_rows($vsacb_get_fsmilies);
				$vbulletin->db->data_seek($vsacb_get_fsmilies, 0);
				$vsacb_i = 0;
				$vsacb_fsmilie_bit = array();
				while ($vsacb_fsmilie = $vbulletin->db->fetch_array($vsacb_get_fsmilies) AND ($vsacb_i++ < $vsacb_fsmilies_total))
				{
					$vsacb_fsmilie_id += 1;

					$vsacb_fsmilie_html = '<a style="display:block;margin:2px;overflow:hidden;width:'.$vbulletin->options['vsachatbox_smiliesclip'].'px;height:'.$vbulletin->options['vsachatbox_smiliesclip'].'px;" href="javascript:void(0);" onclick="return VSacb_insertSmilie(\''.str_replace("'", "\'", $vsacb_fsmilie['smilietext']).'\')"><img onmouseover="return VSacb_updateSmiliePreview(this.src);" src="'.$vsacb_fsmilie['smiliepath'].'" alt="'.$vsacb_fsmilie['title'].'" border="0" /></a>';
					$vsacb_fsmilie_bit[] = '<td>'.$vsacb_fsmilie_html.'</td>';
					if (sizeof($vsacb_fsmilie_bit) == $vbulletin->options['vsachatbox_smiliesperrow'])
					{
						$vsacb_fsmilie_cell = implode('', $vsacb_fsmilie_bit);
						$vsacb_fsmilie_bits .= '<tr style="text-align:center;">'.$vsacb_fsmilie_cell.'</tr>';
						$vsacb_fsmilie_bit = array();
					}
				}
				$vsacb_fsmilies_remaining = sizeof($vsacb_fsmilie_bit);
				if ($vsacb_fsmilies_remaining > 0)
				{
					$vsacb_fsmilies_colrem = $vbulletin->options['vsachatbox_smiliesperrow'] - $vsacb_fsmilies_remaining;
					$vsacb_fsmilie_bit[] = '<td colspan="'.$vsacb_fsmilies_colrem.'">&nbsp;</td>';
					$vsacb_fsmilie_cell = implode('', $vsacb_fsmilie_bit);
					$vsacb_fsmilie_bits .= '<tr style="text-align:center;" style="vertical-align:bottom;">'.$vsacb_fsmilie_cell.'</tr>';
				}
				$vbulletin->db->show_errors();
				$vsacb_fsmilies = '<table cellpadding="0" cellspacing="0" border="0" style="text-align:center;">'.$vsacb_fsmilie_bits.'</table>';
				unset($vsacb_get_fsmilies, $vsacb_fsmilie);
				echo ($vsacb_fsmilies);
				exit;
			}

			if ($_POST['do'] == 'cb_postnew')
			{
				$vbulletin->input->clean_array_gpc('p', array(
					'vsacb_newmessage'	 => TYPE_STR,
					'color' => TYPE_NOHTML,
					'fontWeight' => TYPE_NOHTML,
					'fontStyle' => TYPE_NOHTML,
					'textDecoration' => TYPE_NOHTML)
				);

				if (!empty($vbulletin->GPC['vsacb_newmessage']) && $vbulletin->userinfo['userid'] > 0 && !VSacb_userExcluded($vbulletin->userinfo) AND empty($vbulletin->userinfo['infractiongroupids']))
				{
					$vsacb_messageinfo = addslashes(serialize(array(
						'color' => addslashes(convert_urlencoded_unicode($vbulletin->GPC['color'])),
						'bold' => addslashes(convert_urlencoded_unicode($vbulletin->GPC['fontWeight'])),
						'italic' => addslashes(convert_urlencoded_unicode($vbulletin->GPC['fontStyle'])),
						'underline' => addslashes(convert_urlencoded_unicode($vbulletin->GPC['textDecoration']))
					)));

					$vbulletin->GPC['vsacb_newmessage'] = convert_urlencoded_unicode($vbulletin->GPC['vsacb_newmessage']);

					$vsacb_checkme = strpos($vbulletin->GPC['vsacb_newmessage'], '/me ');
					if ($vsacb_checkme !== false)
					{
						$vbulletin->GPC['vsacb_newmessage'] = str_replace('/me ', $vbulletin->userinfo[''].' ', $vbulletin->GPC['vsacb_newmessage']);
						$vbulletin->GPC['vsacb_newmessage'] = '[color='.$vbulletin->options['vsachatbox_mecolor'].']Системное сообщение: [/color]'.$vbulletin->GPC['vsacb_newmessage'].'';
					}
					
					$vbulletin->GPC['vsacb_newmessage'] = convert_urlencoded_unicode($vbulletin->GPC['vsacb_newmessage']);

					$vsacb_checkme = strpos($vbulletin->GPC['vsacb_newmessage'], '/re ');
					if ($vsacb_checkme !== false)
					{
						$vbulletin->userinfo['username'] == $vbulletin->userinfo['555'] ;
						$vbulletin->GPC['vsacb_newmessage'] = str_replace('/re ', $vbulletin->userinfo[''].' ', $vbulletin->GPC['vsacb_newmessage']);
						$vbulletin->GPC['vsacb_newmessage'] = '[color='.red.'][Системное сообщение][/color][color='.yellow.']'.$vbulletin->GPC['vsacb_newmessage'].'[/color]';
					}

					if ($vbulletin->options['vsachatbox_banned_tags']!='')
					{
						$vsachatbox_banned_tags = str_replace(" ","",$vbulletin->options['vsachatbox_banned_tags']);
						$vsacb_banned_tags = explode(',',$vsachatbox_banned_tags);
						foreach ($vsacb_banned_tags AS $vsacb_banned_tag)
						{
							$vsacb_bannedtags .= ',['.$vsacb_banned_tag.']';
							$vsacb_bannedtags .= ',[/'.$vsacb_banned_tag.']';
						}
						$vsacb_bannedtagsu = strtoupper($vsacb_bannedtags);
						$vsacb_bannedtagspf = substr($vsacb_bannedtags.$vsacb_bannedtagsu, 1);
						$vsacb_bannedtagsf = explode(',',$vsacb_bannedtagspf);
						$vbulletin->GPC['vsacb_newmessage'] = str_replace($vsacb_bannedtagsf, '', $vbulletin->GPC['vsacb_newmessage']);
					}

					$vbulletin->db->hide_errors();
					$vbulletin->db->query_write("
						INSERT INTO ".TABLE_PREFIX."vsa_chatbox
							(userid, userip, message, dateline, textprop)
						VALUES ('".$vbulletin->userinfo['userid']."', '".$_SERVER['REMOTE_ADDR']."', '".addslashes($vbulletin->GPC['vsacb_newmessage'])."', ".TIMENOW.", '".$vsacb_messageinfo."')
					");

					$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "session SET lastactivity = '".TIMENOW."', location = 'cchatbox' WHERE userid = " . $vbulletin->userinfo['userid']);
					$vbulletin->db->show_errors();
				}
				exit;
			}

			if (($_POST['do'] == 'vsacb_editmessage') AND $vsacb_canedit)
			{
				$vbulletin->input->clean_array_gpc('p', array(
					'id' => TYPE_UINT,
					'vsacb_editmessage' => TYPE_STR)
				);

				$vbulletin->db->hide_errors();
				$vsacb_getmessageinfo = $vbulletin->db->query_first("SELECT id, userid from " . TABLE_PREFIX . "vsa_chatbox WHERE id = '".$vbulletin->GPC['id']."' ");

				if ($vsacb_getmessageinfo['userid'] != $vbulletin->userinfo['userid'] && !$vsacb_canmod)
				{
					echo $vbulletin->GPC['vsacb_editmessage'];
					exit;
				}

				$vbulletin->GPC['vsacb_editmessage'] = convert_urlencoded_unicode($vbulletin->GPC['vsacb_editmessage']);
				
				if ($vbulletin->options['vsachatbox_banned_tags']!='')
				{
					$vsachatbox_banned_tags = str_replace(" ","",$vbulletin->options['vsachatbox_banned_tags']);
					$vsacb_banned_tags = explode(',',$vsachatbox_banned_tags);
					foreach ($vsacb_banned_tags AS $vsacb_banned_tag)
					{
						$vsacb_bannedtags .= ',['.$vsacb_banned_tag.']';
						$vsacb_bannedtags .= ',[/'.$vsacb_banned_tag.']';
					}
					$vsacb_bannedtagsu = strtoupper($vsacb_bannedtags);
					$vsacb_bannedtagspf = substr($vsacb_bannedtags.$vsacb_bannedtagsu, 1);
					$vsacb_bannedtagsf = explode(',',$vsacb_bannedtagspf);
					$vbulletin->GPC['vsacb_editmessage'] = str_replace($vsacb_bannedtagsf, '', $vbulletin->GPC['vsacb_editmessage']);
				}

				$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "vsa_chatbox SET message = '".addslashes($vbulletin->GPC['vsacb_editmessage'])."' WHERE id = '".$vsacb_getmessageinfo['id']."' ");

				$vsacb_edit_coloropen = '';
				$vsacb_edit_colorclose = '';
				$vsacb_edit_boldopen = '';
				$vsacb_edit_boldclose = '';
				$vsacb_edit_italicopen = '';
				$vsacb_edit_italicclose = '';
				$vsacb_edit_underlineopen = '';
				$vsacb_edit_underlineclose = '';

				$vsacb_msg_edit = $vbulletin->db->query_first("SELECT id, message, textprop FROM " . TABLE_PREFIX . "vsa_chatbox WHERE id = '".$vbulletin->GPC['id']."' ");

				$vbulletin->db->show_errors();

				$vsacb_msg_edit['message'] = htmlspecialchars_uni($vsacb_msg_edit['message']);
				$vsacb_msg_edit['textprop'] = unserialize($vsacb_msg_edit['textprop']);
				if ($vsacb_msg_edit['textprop']['color'] AND $vbulletin->options['vsachatbox_colors_enabled'])
				{
					$vsacb_edit_coloropen = '[color='.$vsacb_msg_edit['textprop']['color'].']';
					$vsacb_edit_colorclose = '[/color]';
				}
				if ($vsacb_msg_edit['textprop']['bold'])
				{
					$vsacb_edit_boldopen = '';
					$vsacb_edit_boldclose = '';
				}
				if ($vsacb_msg_edit['textprop']['italic'])
				{
					$vsacb_edit_italicopen = '';
					$vsacb_edit_italicclose = '';
				}
				if ($vsacb_msg_edit['textprop']['underline'])
				{
					$vsacb_edit_underlineopen = '';
					$vsacb_edit_underlineclose = '';
				}

				if ($vbulletin->options['vsachatbox_clickable_links'])
				{
					$vsacb_msg_edit_tow = VSacb_clickableLinks($vsacb_msg_edit['message']);
				}
				else
				{
					$vsacb_msg_edit_tow = $vsacb_msg_edit['message'];
				}

				$vsacb_msg_edit_styled = $vsacb_edit_coloropen.$vsacb_edit_boldopen.$vsacb_edit_italicopen.$vsacb_edit_underlineopen.$vsacb_msg_edit_tow.$vsacb_edit_underlineclose.$vsacb_edit_italicclose.$vsacb_edit_boldclose.$vsacb_edit_colorclose;
				$vsacb_msg_edit_parsed = str_replace('\'', ''', $vsacb_bbparser->do_parse($vsacb_msg_edit_styled,1,$vsacb_smilies_onoff,1,1,1));
				unset($vsacb_msg_edit);
				echo $vsacb_msg_edit_parsed;
				exit;
			}

			if (($_REQUEST['do'] == 'vsacb_multidel') AND $vsacb_canmod)
			{
				$vbulletin->db->hide_errors();
				$vbulletin->input->clean_gpc('r', 'cbdel', TYPE_ARRAY);		
				if ($vbulletin->GPC['cbdel']!='')
				{
					$vsacb_delids = implode(',', $vbulletin->GPC['cbdel']);
					if ($vsacb_delids)
					{
						$vbulletin->db->query_write(" DELETE FROM " . TABLE_PREFIX . "vsa_chatbox WHERE id IN($vsacb_delids) ");
					}
				}
				$vbulletin->db->show_errors();
				exec_header_redirect('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc');
			}

			if (($_REQUEST['do']=='vsacb_delall') AND $vsacb_candelall)
			{
				$vbulletin->db->hide_errors();
				$vbulletin->db->query_write("TRUNCATE TABLE " . TABLE_PREFIX . "vsa_chatbox");
				$vbulletin->db->show_errors();
				if ($_SERVER['HTTP_REFERER'])
				{
					$vsacb_redto = $_SERVER['HTTP_REFERER'];
				}
				else
				{
					$vsacb_redto = 'misc.php?'.$vbulletin->session->vars['sessionurl'].'do=cchatbox';
				}
				exec_header_redirect($vsacb_redto);
			}

			if (($_REQUEST['do']=='vsacb_banuser') AND $vsacb_canmod)
			{
				$vbulletin->db->hide_errors();
				$vsacb_usertoban = $vbulletin->input->clean_gpc('r', 'u', TYPE_UINT);
				$vsacb_banuser = $vbulletin->options['vsachatbox_excluded_users'].','.$vsacb_usertoban;
				$vsacb_banuser = str_replace(',,',',',$vsacb_banuser);
				$vsacb_banuser = trim($vsacb_banuser, ',');
				$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = '".$vsacb_banuser."' WHERE varname = 'vsachatbox_excluded_users' ");
				$vbulletin->db->show_errors();
				require_once(DIR . '/includes/adminfunctions.php');
				build_options();
				exec_header_redirect('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc');
			}

			if (($_REQUEST['do']=='vsacb_unbanuser') AND $vsacb_canmod)
			{
				$vbulletin->db->hide_errors();
				$vsacb_usertounban = $vbulletin->input->clean_gpc('r', 'u', TYPE_UINT);
				$vsacb_unbanuser = str_replace($vsacb_usertounban,'',$vbulletin->options['vsachatbox_excluded_users']);
				$vsacb_unbanuser = str_replace(',,',',',$vsacb_unbanuser);
				$vsacb_unbanuser = trim($vsacb_unbanuser, ',');
				$vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "setting SET value = '".$vsacb_unbanuser."' WHERE varname = 'vsachatbox_excluded_users' ");
				$vbulletin->db->show_errors();
				require_once(DIR . '/includes/adminfunctions.php');
				build_options();
				exec_header_redirect('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc');
			}

			if (($_REQUEST['do']=='vsacb_deluser') AND $vsacb_canmod)
			{
				$vbulletin->db->hide_errors();
				$vsacb_usertodel = $vbulletin->input->clean_gpc('r', 'u', TYPE_UINT);	
				$vbulletin->db->query_write(" DELETE FROM " . TABLE_PREFIX . "vsa_chatbox WHERE userid = '".$vsacb_usertodel."' ");
				$vbulletin->db->show_errors();
				exec_header_redirect('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc');
			}

			if ($_REQUEST['do']=='vsacb_delmess')
			{
				$vbulletin->db->hide_errors();
				$vsacb_messtodel = $vbulletin->input->clean_gpc('r', 'm', TYPE_UINT);
				$vsacb_getmessinfo = $vbulletin->db->query_first("SELECT id, userid from " . TABLE_PREFIX . "vsa_chatbox WHERE id = '".$vsacb_messtodel."' ");
				if ((($vsacb_getmessinfo['userid']==$vbulletin->userinfo['userid']) AND $vbulletin->options['vsachatbox_users_candelete']) OR $vsacb_canmod)
				{
					$vbulletin->db->query_write(" DELETE FROM " . TABLE_PREFIX . "vsa_chatbox WHERE id = '".$vsacb_messtodel."' ");
				}
				$vbulletin->db->show_errors();
				exec_header_redirect('misc.php?'.$vbulletin->session->vars['sessionurl'].'do=ccarc');
			}
		}
  Ответить с цитированием
Старый 30.04.2015, 02:14 Вверх   #3
.:V.I.P.:.
 
Аватар для EHOT
EHOT вне форума
Доп. информация
По умолчанию

$vbulletin->userinfo['username'] && 0 ; это я что меняю?
  Ответить с цитированием
Старый 01.05.2015, 23:01 Вверх   #4
Грамотный форумчанин
 
Аватар для Dikiy_J
Dikiy_J вне форума
Доп. информация
По умолчанию

Вроде надо убрать $vbulletin->userinfo['username'] == $vbulletin->userinfo['555'] ;
  Ответить с цитированием
Старый 02.05.2015, 10:25 Вверх   #5
.:V.I.P.:.
 
Аватар для EHOT
EHOT вне форума
Доп. информация
По умолчанию

Цитата Сообщение от Dikiy_J Посмотреть сообщение
Вроде надо убрать $vbulletin->userinfo['username'] == $vbulletin->userinfo['555'] ;
Так это ж я ставил, в надежде что, что то изменится)
  Ответить с цитированием
Старый 02.05.2015, 12:20 Вверх   #6
Знаток
 
Аватар для sertaras
sertaras вне форума
Доп. информация
По умолчанию

А мне кажется что это в файле XML чата нужно покопать....
  Ответить с цитированием
Старый 02.05.2015, 21:48 Вверх   #7
.:V.I.P.:.
 
Аватар для EHOT
EHOT вне форума
Доп. информация
По умолчанию

Цитата Сообщение от sertaras Посмотреть сообщение
А мне кажется что это в файле XML чата нужно покопать....
Копался, не получается
  Ответить с цитированием
Старый 03.05.2015, 10:04 Вверх   #8
Коренной житель
 
Аватар для AleX-DSA
AleX-DSA вне форума
Доп. информация
По умолчанию

В шаблоне модуля копать и через "if confition" подменять автора системной мессаги на пустую строку.
  Ответить с цитированием
Ответ

Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


Текущее время: 04:44. Часовой пояс GMT +3.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc. Перевод: zCarot
 

Время генерации страницы 0.15305 секунды с 11 запросами