1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 16:46:50 +02:00

Issue #4578 - Legacy forum template issue with missing thread subject element.

This commit is contained in:
Cameron
2021-10-18 14:17:54 -07:00
parent c8e48970ce
commit 573a8d55af
2 changed files with 23 additions and 8 deletions

View File

@@ -97,15 +97,20 @@ class plugin_forum_post_shortcodes extends e_shortcode
// return forumjump(); // FIXME - broken in v1 themes
}
/**
* @deprecated
* @return string
*/
function sc_userbox()
{
global $userbox;
return (USER == false ? $userbox : '');
return (USER === false) ? e107::getParser()->parseTemplate($userbox, true, $this) : '';
}
function sc_forum_post_author()
function sc_forum_post_author($opts = array())
{
$opts = array('size' => 'xlarge');
$opts['size'] = 'xlarge';
$tp = e107::getParser();
if(USER == false)
@@ -126,15 +131,20 @@ class plugin_forum_post_shortcodes extends e_shortcode
}
/**
* @deprecated
* @return string
*/
function sc_subjectbox()
{
global $subjectbox;
return ($this->var['action'] == 'nt' ? $subjectbox : '');
return $this->sc_forum_post_subject('boolean') ? e107::getParser()->parseTemplate($subjectbox, true, $this) : '';
}
function sc_forum_post_subject()
function sc_forum_post_subject($parm=null)
{
$opts = array('size' => 'xlarge');
$opts = empty($parm) ? array('size' => 'xlarge') : $parm;
if($this->var['action'] =='rp' || $this->var['action'] =='quote')
{
@@ -153,6 +163,11 @@ class plugin_forum_post_shortcodes extends e_shortcode
{
$opts['required'] = 1;
}
if($parm === 'boolean')
{
return empty($opts['disabled']);
}
// elseif($this->var['action'] == 'edit')
// {
// $_POST['subject'] = $this->varp;