0) { if(!isset($smiliecount)) { $smiliecount = array(); } $smiliekey = "{$pid}_{$smiliekey}"; if(empty($smiliecount[$smiliekey])) { $smiliecount[$smiliekey] = 1; } else { $smiliecount[$smiliekey]++; } if($smiliecount[$smiliekey] > $maxsmilies) { return "{:soso_$smilieid:}"; } } if($imgcode) { return "[img]{$imgsrc}[/img]"; } else { return "\"\""; } } } class plugin_soso_smilies extends plugin_soso_smilies_base { function global_footer() { global $_G; if(CURSCRIPT == 'home' && !empty($_G['uid'])) { if($_GET['ac'] == 'pm' && $_GET['mod'] == 'spacecp') { if(empty($_GET['op'])) { return $this->_soso_script('send'); } elseif($_GET['op'] == 'showmsg') { return $this->_soso_script('pm'); } } elseif($_GET['subop'] == 'view' && $_GET['do'] == 'pm' && $_GET['mod'] == 'space') { return $this->_soso_script('reply'); } } return ''; } function discuzcode($param) { global $_G; if($param['caller'] == 'discuzcode') { $smileyoff = $param['param'][1]; $allowsmilies = $param['param'][4]; $pid = $param['param'][12]; $this->discuzcode_callback_soso_smiles_1($pid, 1); if(!$smileyoff && $allowsmilies && strpos($_G['discuzcodemessage'], '{:soso_') !== false) { $_G['discuzcodemessage'] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'discuzcode_callback_soso_smiles_1'), $_G['discuzcodemessage'], $_G['setting']['maxsmilies']); } } else { $_G['discuzcodemessage'] = preg_replace("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", '', $_G['discuzcodemessage']); } } function discuzcode_callback_soso_smiles_1($matches, $action = 0) { static $pid = 0; if($action == 1) { $pid = $matches; } else { global $_G; return $this->_soso_smiles($matches[1], $_G['setting']['maxsmilies'], $pid); } } function _soso_script($textareaid) { return ''. ''; } } class plugin_soso_smilies_forum extends plugin_soso_smilies { function forumdisplay_bottom_output($template = array()) { global $_G; if(!empty($_G['uid'])) { return $this->_soso_script('fastpost'); } } function viewthread_fastpost_content_output($template = array()) { global $_G; if(!empty($_G['uid'])) { return $this->_soso_script('fastpost'); } } function post_smileyoff() { global $_G; if(!empty($_GET['message'])) { $_G['cache']['smileycodes'][] = '{:soso_'; } return ''; } function post_bottom_output($template = array()) { global $_G; if(!empty($_G['uid'])) { return $this->_soso_script('newthread'); } } } class plugin_soso_smilies_home extends plugin_soso_smilies { function spacecp_profile_bottom_output() { global $_G; if(!empty($_G['uid'])) { return $this->_soso_script('sightml'); } } function spacecp_profile_sightml() { global $_G; if($_GET['ac'] == 'profile' && submitcheck('profilesubmitbtn') && !empty($_POST['sightml'])) { $_POST['sightml'] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'spacecp_profile_sightml_callback_soso_smiles_1'), $_POST['sightml'], $_G['setting']['maxsmilies']); } } function spacecp_profile_sightml_callback_soso_smiles_1($matches) { return $this->_soso_smiles($matches[1], -1, 0, 1); } function spacecp_pm_output() { global $_G; if(!empty($GLOBALS['msglist'])) { foreach($GLOBALS['msglist'] as $day => $result) { foreach($result as $key => $value) { $GLOBALS['msglist'][$day][$key]['message'] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'spacecp_pm_output_space_pm_output_follow_soso_output_callback_soso_smiles_1'), $GLOBALS['msglist'][$day][$key]['message'], $_G['setting']['maxsmilies']); } } } elseif($_GET['op'] == 'showchatmsg' && $GLOBALS['list']) { foreach($GLOBALS['list'] as $key => $value) { $GLOBALS['list'][$key]['message'] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'spacecp_pm_output_space_pm_output_follow_soso_output_callback_soso_smiles_1'), $GLOBALS['list'][$key]['message'], $_G['setting']['maxsmilies']); } } } function space_pm_output() { global $_G; if(!empty($GLOBALS['list'])) { foreach($GLOBALS['list'] as $key => $value) { if(!empty($_GET['subop'])) { $GLOBALS['list'][$key] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'spacecp_pm_output_space_pm_output_follow_soso_output_callback_soso_smiles_1'), $GLOBALS['list'][$key], $_G['setting']['maxsmilies']); } else { $GLOBALS['list'][$key] = preg_replace("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", '', $GLOBALS['list'][$key], $_G['setting']['maxsmilies']); } } } } function follow_soso_output() { global $_G; if(!empty($GLOBALS['list']['content'])) { foreach($GLOBALS['list']['content'] as $key => $value) { $GLOBALS['list']['content'][$key]['content'] = preg_replace_callback("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", array($this, 'spacecp_pm_output_space_pm_output_follow_soso_output_callback_soso_smiles_1'), $GLOBALS['list']['content'][$key]['content'], $_G['setting']['maxsmilies']); } } } function spacecp_pm_output_space_pm_output_follow_soso_output_callback_soso_smiles_1($matches) { return $this->_soso_smiles($matches[1], -1, 0, 0); } } class mobileplugin_soso_smilies extends plugin_soso_smilies_base { function discuzcode($param) { global $_G; $_G['discuzcodemessage'] = preg_replace("/\{\:soso_((e\d+)|(_\d+_\d))\:\}/", '', $_G['discuzcodemessage']); } }