public static function validate_message(Module_Chat $module, $arg) { $arg = trim($arg); $_POST['message'] = $arg; if (0 === ($len = strlen($arg))) { return $module->lang('err_msg_short'); } $maxlen = $module->getMaxMessageLength(); if ($len > $maxlen) { return $module->lang('err_msg_long', array($maxlen)); } return false; }
public function displayMessage() { $msg = $this->getVar('chatmsg_msg'); return Module_Chat::isBBCodeAllowedS() ? GWF_Message::display($msg, true, true) : GWF_HTML::display($msg); }
/** * Delete guys that are not online anymore. * @param Module_Chat $module * @return boolean */ private static function cleanupTable(Module_Chat $module) { $cut = time() - $module->getOnlineTime(); $time = time(); return self::table(__CLASS__)->update("chaton_timeleft={$time}", "chaton_timeleft=0 AND chaton_timeaccess<={$cut}"); }
private function displayMibbitURL($url) { $href = Module_Chat::getMibbitURL($url); // $href = GWF_WEB_ROOT.'index.php?mo=Chat&me=MibbitCustom&url='.urlencode($url); return GWF_Button::link($href, 'foo'); }