e107 = e107::getInstance(); $this->postInfo = array(); } function sc_top() { return "".LAN_10.''; } function sc_joined() { global $gen; if ($this->postInfo['post_user']) { return LAN_06.': '.$gen->convert_date($this->postInfo['user_join'], 'forum').'
'; } } function sc_threaddatestamp() { global $gen; return " 'post', 'id' => $this->postInfo['post_id']))."'>".IMAGE_post." ".$gen->convert_date($this->postInfo['post_datestamp'], 'forum'); } function sc_post() { $emote = (isset($this->postInfo['post_options']['no_emote']) ? ',emotes_off' : ''); return $this->e107->tp->toHTML($this->postInfo['post_entry'], true, 'USER_BODY'.$emote, 'class:'.$this->postInfo['user_class']); } function sc_postdeleted() { if($this->postInfo['post_status']) { $info = unserialize($this->postInfo['post_options']); return " Post delete on: {$info['deldate']}
reason: {$info['delreason']} "; $ret = '
'.print_r($info, true).'
'; } } function sc_attachments() { if($this->postInfo['post_attachments']) { $attachments = explode(',', $this->postInfo['post_attachments']); $txt = ''; foreach($attachments as $a) { $info = explode('*', $a); switch($info[0]) { case 'file': $txt .= IMAGE_attachment." {$info[2]}
"; break; case 'img': //if image has a thumb, show it and link to main if(isset($info[2])) { $txt .= "
"; } else { $txt .= "
"; } } } return $txt; } } function sc_privmessage() { if(plugInstalled('pm') && ($this->postInfo['post_user'] > 0)) { return $this->e107->tp->parseTemplate("{SENDPM={$this->postInfo['post_user']}}"); } } function sc_avatar() { if ($this->postInfo['post_user']) { if(!$avatar = getcachedvars('forum_avatar_'.$this->postInfo['post_user'])) { if ($this->postInfo['user_image']) { require_once(e_HANDLER.'avatar_handler.php'); $avatar = "

"; } else { $avatar = ''; } cachevars('forum_avatar_'.$this->postInfo['post_user'], $avatar); } return $avatar; } return ''; } function sc_anon_ip() { if($this->postInfo['post_user_anon'] && (ADMIN || MODERATOR)) { return $this->e107->ipDecode($this->postInfo['post_ip']); } } function sc_ip() { if((ADMIN || MODERATOR) && !$this->postInfo['user_admin']) { return $this->e107->ipDecode($this->postInfo['post_ip']); } } function sc_poster() { if($this->postInfo['user_name']) { return " 'profile', 'id' => $this->postInfo['post_user']))."'>{$this->postInfo['user_name']}"; } else { return ''.$this->e107->tp->toHTML($this->postInfo['post_user_anon']).''; } } function sc_emailimg() { if($this->postInfo['user_name']) { return (!$this->postInfo['user_hideemail'] ? $this->e107->tp->parseTemplate("{EMAILTO={$this->postInfo['user_email']}}") : ''); } return ''; } function sc_emailitem() { if($this->postInfo['thread_start']) { return $this->e107->tp->parseTemplate("{EMAIL_ITEM=".FORLAN_101."^plugin:forum.{$this->postInfo['post_thread']}}"); } } function sc_printitem() { if($this->postInfo['thread_start']) { return $this->e107->tp->parseTemplate("{PRINT_ITEM=".FORLAN_102."^plugin:forum.{$this->postInfo['post_thread']}}"); } } function sc_signature() { if(!USER) { return ''; } global $forum; static $forum_sig_shown; if($forum->prefs->get('sig_once')) { $_tmp = 'forum_sig_shown_'.$this->postInfo['post_user']; if(getcachedvars($_tmp)) { return ''; } cachevars($_tmp, 1); } return ($this->postInfo['user_signature'] ? "

".$this->e107->tp->toHTML($this->postInfo['user_signature'], true).'' : ''); } function sc_profileimg() { if (USER && $this->postInfo['user_name']) { return $this->e107->tp->parseTemplate("{PROFILE={$this->postInfo['post_user']}}"); } } function sc_posts() { if ($this->postInfo['post_user']) { return LAN_67.': '.(int)$this->postInfo['user_plugin_forum_posts'].'
'; } } function sc_visits() { if ($this->postInfo['user_name']) { return LAN_09.': '.$this->postInfo['user_visits'].'
'; } } function sc_customtitle() { if ($this->postInfo['user_customtitle']) { return $this->e107->tp->toHTML($this->postInfo['user_customtitle']).'
'; } } function sc_website() { if ($this->postInfo['user_homepage']) { return LAN_08.': '.$this->postInfo['user_homepage'].'
'; } } function sc_websiteimg() { if ($this->postInfo['user_homepage'] && $this->postInfo['user_homepage'] != 'http://') { return "".IMAGE_website.''; } } function sc_editimg() { if (USER && $this->postInfo['post_user'] == USERID && $this->thread->threadInfo['thread_active']) { return " 'edit', 'id' => $this->postInfo['post_id']))."'>".IMAGE_edit.' '; } } function sc_quoteimg() { if($this->forum->checkperm($this->postInfo['post_forum'], 'post')) { return " 'quote', 'id' => $this->postInfo['post_id']))."'>".IMAGE_quote.' '; } } function sc_reportimg() { global $page; if (USER) { return "postInfo['post_thread']}&post={$this->postInfo['post_id']}")."'>".IMAGE_report.' '; } } function sc_rpg() { return rpg($this->postInfo['user_join'], $this->postInfo['user_plugin_forum_posts']); } function sc_memberid() { if (!$this->postInfo['post_user']) { return FALSE; } return "".LAN_195.' #'.$this->postInfo['post_user'].''; } function sc_level($parm) { if (!$this->postInfo['post_user']) { return ''; } $rankInfo = e107::getRank()->getRanks($this->postInfo['post_user']); if(!$parm) { $parm = 'name'; } switch($parm) { case 'userid' : return $this->sc_memberid(); break; case 'special': if(isset($rankInfo['special'])) { return $rankInfo['special']; } if($this->forum->isModerator($this->postInfo['post_user'])) { return "
".IMAGE_rank_moderator_image.'
'; } return ''; break; default: return varset($rankInfo[$parm], ''); break; } } function sc_modoptions() { if (MODERATOR) { return showmodoptions(); } } function sc_lastedit() { global $gen; if ($this->postInfo['post_edit_datestamp']) { return $gen->convert_date($this->postInfo['post_edit_datestamp'],'forum'); } } function sc_lasteditby() { if(isset($this->postInfo['edit_name'])) { if($parm == 'link') { $e107 = e107::getInstance(); $url = $e107->url->getUrl('core:user', 'main', 'func=profile&id='.$this->postInfo['post_edit_user']); return "{$this->postInfo['edit_name']}"; } return $this->postInfo['edit_name']; } } function sc_poll() { global $pollstr; return $pollstr; } function sc_newflag() { // Defined in case an indicator is required return ''; } } ?>