Exemple #1
0
 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;
 }
Exemple #2
0
 public function displayMessage()
 {
     $msg = $this->getVar('chatmsg_msg');
     return Module_Chat::isBBCodeAllowedS() ? GWF_Message::display($msg, true, true) : GWF_HTML::display($msg);
 }
Exemple #3
0
 /**
  * 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}");
 }
Exemple #4
0
 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');
 }