diff --git a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php index e68decd18..e06980138 100644 --- a/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/forum_shortcodes.php @@ -699,4 +699,8 @@ $gen = new convert; return $frm->breadcrumb($breadarray); } + function sc_avatar($opts) + { + return e107::getParser()->toAvatar(e107::user($this->var['forum_lastpost_user']),$opts); + } } diff --git a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php index ecc2049af..09b23e5f1 100644 --- a/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php +++ b/e107_plugins/forum/shortcodes/batch/viewforum_shortcodes.php @@ -888,5 +888,19 @@ $LASTPOSTUSER = $this->var['lastpost_username']; } */ + function sc_avatar($opts) + { + if (isset($this->var['thread_id'])) + { + return e107::getParser()->toAvatar(e107::user($this->var['thread_lastuser']),$opts); + } + elseif (isset($this->var['forum_id'])) + { + return e107::getParser()->toAvatar(e107::user($this->var['forum_lastpost_user']),$opts); + } + + return ''; + // return print_r($this->var); + } } ?> \ No newline at end of file