mirror of
https://github.com/e107inc/e107.git
synced 2025-08-09 08:06:38 +02:00
@@ -381,7 +381,11 @@ class forum_post_handler
|
|||||||
|
|
||||||
$file = "forum_".$type."_template.php";
|
$file = "forum_".$type."_template.php";
|
||||||
|
|
||||||
if (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED))
|
if($template = e107::getTemplate('forum', 'forum_post'))
|
||||||
|
{
|
||||||
|
$FORUM_POST_TEMPLATE = $template;
|
||||||
|
}
|
||||||
|
elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED))
|
||||||
{
|
{
|
||||||
if (is_readable(THEME.$file))
|
if (is_readable(THEME.$file))
|
||||||
{
|
{
|
||||||
@@ -397,6 +401,8 @@ class forum_post_handler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ----------------- Legacy -------------------------
|
// ----------------- Legacy -------------------------
|
||||||
|
|
||||||
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
if(!defined("USER_WIDTH")){ define("USER_WIDTH","width:95%"); }
|
||||||
@@ -859,7 +865,14 @@ class forum_post_handler
|
|||||||
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($data))->setVars($data);
|
$sc = e107::getScBatch('post', 'forum')->setScVar('forum', $this->forumObj)->setScVar('threadInfo', vartrue($data))->setVars($data);
|
||||||
$text = e107::getParser()->parseTemplate($template['form'], true, $sc);
|
$text = e107::getParser()->parseTemplate($template['form'], true, $sc);
|
||||||
|
|
||||||
$this->render($text);
|
$caption = null;
|
||||||
|
|
||||||
|
if(!empty($template['caption']))
|
||||||
|
{
|
||||||
|
$caption = e107::getParser()->parseTemplate($template['caption'], true, $sc);
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->render($text, $caption);
|
||||||
|
|
||||||
if(empty($data))
|
if(empty($data))
|
||||||
{
|
{
|
||||||
@@ -961,13 +974,15 @@ class forum_post_handler
|
|||||||
/**
|
/**
|
||||||
* @param $text
|
* @param $text
|
||||||
*/
|
*/
|
||||||
function render($text)
|
function render($text, $caption = false)
|
||||||
{
|
{
|
||||||
$ns = e107::getRender();
|
$ns = e107::getRender();
|
||||||
|
|
||||||
if ($this->forumObj->prefs->get('enclose'))
|
if ($this->forumObj->prefs->get('enclose'))
|
||||||
{
|
{
|
||||||
$ns->tablerender($this->forumObj->prefs->get('title'), $text);
|
|
||||||
|
$caption = (!empty($caption)) ? $caption : $this->forumObj->prefs->get('title');
|
||||||
|
$ns->tablerender($caption, $text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -12,6 +12,7 @@ if (!defined('e107_INIT')) { exit; }
|
|||||||
|
|
||||||
// New in v2.x - requires a bootstrap theme be loaded.
|
// New in v2.x - requires a bootstrap theme be loaded.
|
||||||
|
|
||||||
|
//$FORUM_POST_TEMPLATE['caption'] = "Custom caption";
|
||||||
$FORUM_POST_TEMPLATE['form'] = "
|
$FORUM_POST_TEMPLATE['form'] = "
|
||||||
{FORUM_POST_FORM_START}
|
{FORUM_POST_FORM_START}
|
||||||
<div class='row-fluid'>
|
<div class='row-fluid'>
|
||||||
|
Reference in New Issue
Block a user