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

Issue #2796 - New Forum Posts Menu query and shortcode fixes.

This commit is contained in:
Cameron
2017-09-24 14:12:35 -07:00
parent 8053319b5c
commit a4091ea6d6
3 changed files with 88 additions and 17 deletions

View File

@@ -80,7 +80,8 @@
function sc_post_author_avatar($parm=null)
{
return $this->sc_avatar($parm);
return e107::getParser()->toAvatar($this->postInfo, $parm);
// return $this->sc_avatar($parm);
}
// @todo new thread/topic shortcodes
@@ -91,6 +92,46 @@
}
function sc_topic_author_name($parm=null)
{
if($this->var['thread_user_username'])
{
return "<a href='" . e107::getUrl()->create('user/profile/view', array('name' => $this->postInfo['thread_user_username'], 'id' => $this->postInfo['thread_user'])) . "'>{$this->postInfo['thread_user_username']}</a>";
}
else
{
return '<b>' . e107::getParser()->toHTML($this->postInfo['thread_user_anon']) . '</b>';
}
}
function sc_topic_author_url($parm=null)
{
if(empty($this->var['thread_user_username']) || empty($this->var['thread_user']))
{
return '';
}
return e107::getUrl()->create('user/profile/view', array('name' => $this->var['thread_user_username'], 'id' => $this->var['thread_user']));
}
function sc_topic_author_avatar($parm=null)
{
$arr = array(
'user_id' => $this->var['thread_user'], // standardized field names.
'user_name' => $this->var['thread_user_username'],
'user_image' => $this->var['thread_user_userimage'],
'user_currentvisit' => $this->var['thread_user_usercurrentvisit']
);
return e107::getParser()->toAvatar($arr, $parm);
// return $this->sc_avatar($parm);
}
function sc_topic_url($parm=null)
{
return e107::url('forum', 'topic', $this->var);