1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

PHP Notice removal and Forum Rank display preference added.

This commit is contained in:
Cameron
2016-05-16 11:44:38 -07:00
parent b8f7c5458d
commit 572a4bb8be
5 changed files with 41 additions and 30 deletions

View File

@@ -12,12 +12,14 @@ class plugin_forum_view_shortcodes extends e_shortcode
{
protected $e107;
protected $defaultImgAttachSize = false;
protected $pref;
function __construct()
{
parent::__construct();
$this->e107 = e107::getInstance();
$this->forum = new e107forum();
$this->pref = e107::pref('forum');
$this->defaultImgAttachSize = e107::pref('forum','maxwidth',false); // don't resize here if set to 0.
}
@@ -381,11 +383,19 @@ class plugin_forum_view_shortcodes extends e_shortcode
function sc_level($parm)
{
if(isset($this->pref['ranks']) && empty($this->pref['ranks']))
{
return false;
}
if (!$this->postInfo['post_user']) { return ''; }
$rankInfo = e107::getRank()->getRanks($this->postInfo['post_user']);
// FIXME - level handler!!!
// print_a($rankInfo);
if($parm == 'badge')