mirror of
https://github.com/e107inc/e107.git
synced 2025-08-19 04:41:53 +02:00
${task.key} (${task.type}): User ranks now configurable and render properly. Still need to work on moving config from forum, and establishing a default config.
This commit is contained in:
@@ -11,7 +11,7 @@ class forum_shortcodes
|
||||
var $postInfo;
|
||||
var $thread;
|
||||
var $forum;
|
||||
|
||||
|
||||
function forum_shortcodes()
|
||||
{
|
||||
$this->e107 = e107::getInstance();
|
||||
@@ -276,16 +276,17 @@ class forum_shortcodes
|
||||
{
|
||||
if (!$this->postInfo['post_user']) { return ''; }
|
||||
|
||||
$rankInfo = $this->e107->userRank->getRanks($this->postInfo['post_user']);
|
||||
$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']))
|
||||
@@ -294,7 +295,7 @@ class forum_shortcodes
|
||||
}
|
||||
return '';
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
return varset($rankInfo[$parm], '');
|
||||
break;
|
||||
|
@@ -59,8 +59,6 @@ if(isset($_GET['f']))
|
||||
if($_GET['f'] != 'last') { $thread->init(); }
|
||||
}
|
||||
e107::getScParser();
|
||||
require_once (e_HANDLER . 'level_handler.php');
|
||||
if (!is_object($e107->userRank)) { $e107->userRank = new e107UserRank; }
|
||||
require_once (e_PLUGIN . 'forum/forum_shortcodes.php');
|
||||
setScVar('forum_shortcodes', 'thread', $thread);
|
||||
|
||||
|
Reference in New Issue
Block a user