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

Update forum_post.php

This commit is contained in:
rica-carv
2016-12-13 19:47:06 +00:00
committed by GitHub
parent 85574060b8
commit 1ebdfb6783

View File

@@ -373,20 +373,23 @@ class forum_post_handler
global $FORUMPOST, $subjectbox, $userbox, $poll_form, $fileattach, $fileattach_alert; // needed for BC. global $FORUMPOST, $subjectbox, $userbox, $poll_form, $fileattach, $fileattach_alert; // needed for BC.
$FORUM_POST_TEMPLATE = array(); //-- $FORUM_POST_TEMPLATE = array();
$FORUM_POSTED_TEMPLATE = array(); //-- $FORUM_POSTED_TEMPLATE = array();
$FORUMREPLYPOSTED = ''; $FORUMREPLYPOSTED = '';
$FORUMTHREADPOSTED = ''; $FORUMTHREADPOSTED = '';
$FORUMPOLLPOSTED = ''; $FORUMPOLLPOSTED = '';
$file = "forum_".$type."_template.php"; // $file = "forum_".$type."_template.php";
if($template = e107::getTemplate('forum', 'forum_post')) // var_dump ($type);
// var_dump (e107::getTemplate('forum', 'forum_'.$type));
if($template = e107::getTemplate('forum', 'forum_'.$type))
{ {
$FORUM_POST_TEMPLATE = $template; //-- $FORUM_POST_TEMPLATE = $template;
} }
elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED)) elseif (empty($FORUMPOST) && empty($FORUMREPLYPOSTED) && empty($FORUMTHREADPOSTED))
{ {
$file = "forum_".$type."_template.php";
if (is_readable(THEME.$file)) if (is_readable(THEME.$file))
{ {
include_once(THEME.$file); include_once(THEME.$file);
@@ -609,27 +612,29 @@ class forum_post_handler
if($type == 'post') //-- if($type == 'post' || $type == 'posted')
if($template)
{ {
$template= (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST); //-- $template= (deftrue('BOOTSTRAP')) ? $FORUM_POST_TEMPLATE : array('form'=>$FORUMPOST);
$template= (deftrue('BOOTSTRAP')) ? $template : array('form'=>$FORUMPOST);
// print_a($template); // print_a($template);
return $this->upgradeTemplate($template); return $this->upgradeTemplate($template);
} }
else else
{ {
if (deftrue('BOOTSTRAP')) //v2.x //-- if (deftrue('BOOTSTRAP')) //v2.x
{ //-- {
return $FORUM_POSTED_TEMPLATE; //-- return $FORUM_POSTED_TEMPLATE;
} //-- }
else //v1.x //-- else //v1.x
{ //-- {
return array( return array(
"reply" => $FORUMREPLYPOSTED, "reply" => $FORUMREPLYPOSTED,
"thread" => $FORUMTHREADPOSTED, "thread" => $FORUMTHREADPOSTED,
"poll" => $FORUMPOLLPOSTED "poll" => $FORUMPOLLPOSTED
); );
} //-- }
} }