mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Code clean-up (globals, $e107->, headers, $sql)
This commit is contained in:
@@ -15,8 +15,9 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
{
|
||||
$parm = ($parm ? $parm : 10);
|
||||
global $LATESTPOSTS_START, $LATESTPOSTS_END, $LATESTPOSTS_POST;
|
||||
$tp = e107::getParser();
|
||||
|
||||
$txt = $this->e107->tp->parseTemplate($LATESTPOSTS_START, true);
|
||||
$txt = $tp->parseTemplate($LATESTPOSTS_START, true);
|
||||
$start = max($this->threadInfo['thread_total_replies'] - $parm, 0);
|
||||
$num = min($this->threadInfo['thread_total_replies'], $parm);
|
||||
|
||||
@@ -26,9 +27,9 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
for($i = count($tmp); $i > 0; $i--)
|
||||
{
|
||||
$bach->setScVar('postInfo', $tmp[$i-1]);
|
||||
$txt .= $this->e107->tp->parseTemplate($LATESTPOSTS_POST, true);
|
||||
$txt .= $tp->parseTemplate($LATESTPOSTS_POST, true);
|
||||
}
|
||||
$txt .= $this->e107->tp->parseTemplate($LATESTPOSTS_END, true);
|
||||
$txt .= $tp->parseTemplate($LATESTPOSTS_END, true);
|
||||
return $txt;
|
||||
}
|
||||
|
||||
@@ -37,7 +38,7 @@ class plugin_forum_post_shortcodes extends e_shortcode
|
||||
global $THREADTOPIC_REPLY;
|
||||
$tmp = $this->forum->postGet($this->threadInfo['thread_id'], 0, 1);
|
||||
e107::getScBatch('view', 'forum')->setScVar('postInfo', $tmp[0]);
|
||||
return $this->e107->tp->parseTemplate($THREADTOPIC_REPLY, true);
|
||||
return e107::getParser()->parseTemplate($THREADTOPIC_REPLY, true);
|
||||
}
|
||||
|
||||
function sc_formstart()
|
||||
|
@@ -55,7 +55,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
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']);
|
||||
return e107::getParser()->toHTML($this->postInfo['post_entry'], true, 'USER_BODY'.$emote, 'class:'.$this->postInfo['user_class']);
|
||||
}
|
||||
|
||||
function sc_postdeleted()
|
||||
@@ -108,7 +108,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if(plugInstalled('pm') && ($this->postInfo['post_user'] > 0))
|
||||
{
|
||||
return $this->e107->tp->parseTemplate("{SENDPM={$this->postInfo['post_user']}}");
|
||||
return e107::getParser()->parseTemplate("{SENDPM={$this->postInfo['post_user']}}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
}
|
||||
else
|
||||
{
|
||||
return '<b>'.$this->e107->tp->toHTML($this->postInfo['post_user_anon']).'</b>';
|
||||
return '<b>'.e107::getParser()->toHTML($this->postInfo['post_user_anon']).'</b>';
|
||||
}
|
||||
|
||||
}
|
||||
@@ -173,7 +173,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if($this->postInfo['user_name'])
|
||||
{
|
||||
return (!$this->postInfo['user_hideemail'] ? $this->e107->tp->parseTemplate("{EMAILTO={$this->postInfo['user_email']}}") : '');
|
||||
return (!$this->postInfo['user_hideemail'] ? e107::getParser()->parseTemplate("{EMAILTO={$this->postInfo['user_email']}}") : '');
|
||||
}
|
||||
return '';
|
||||
|
||||
@@ -183,7 +183,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if($this->postInfo['thread_start'])
|
||||
{
|
||||
return $this->e107->tp->parseTemplate("{EMAIL_ITEM=".FORLAN_101."^plugin:forum.{$this->postInfo['post_thread']}}");
|
||||
return e107::getParser()->parseTemplate("{EMAIL_ITEM=".FORLAN_101."^plugin:forum.{$this->postInfo['post_thread']}}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if($this->postInfo['thread_start'])
|
||||
{
|
||||
return $this->e107->tp->parseTemplate("{PRINT_ITEM=".FORLAN_102."^plugin:forum.{$this->postInfo['post_thread']}}");
|
||||
return e107::getParser()->parseTemplate("{PRINT_ITEM=".FORLAN_102."^plugin:forum.{$this->postInfo['post_thread']}}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if (USER && $this->postInfo['user_name'])
|
||||
{
|
||||
return $this->e107->tp->parseTemplate("{PROFILE={$this->postInfo['post_user']}}");
|
||||
return e107::getParser()->parseTemplate("{PROFILE={$this->postInfo['post_user']}}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
||||
{
|
||||
if ($this->postInfo['user_customtitle'])
|
||||
{
|
||||
return $this->e107->tp->toHTML($this->postInfo['user_customtitle']).'<br />';
|
||||
return e107::getParser()->toHTML($this->postInfo['user_customtitle']).'<br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user