mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 21:57:51 +02:00
Few more changes due to shortcode changes
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
|
|
||||||
class forum_post_shortcodes extends e_shortcode
|
class plugin_forum_post_shortcodes extends e_shortcode
|
||||||
{
|
{
|
||||||
protected $e107;
|
protected $e107;
|
||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
$this->e107 = e107::getInstance();
|
$this->e107 = e107::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,6 +7,7 @@ class plugin_forum_view_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function __construct()
|
function __construct()
|
||||||
{
|
{
|
||||||
|
parent::__construct();
|
||||||
$this->e107 = e107::getInstance();
|
$this->e107 = e107::getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -71,9 +71,8 @@ if (!$forum->checkPerm($forumId, 'post'))
|
|||||||
define('MODERATOR', USER && $forum->isModerator(USERID));
|
define('MODERATOR', USER && $forum->isModerator(USERID));
|
||||||
require_once(e_HANDLER.'ren_help.php');
|
require_once(e_HANDLER.'ren_help.php');
|
||||||
|
|
||||||
//require_once(e_HANDLER.'forum_include.php');
|
e107::getScBatch('view', 'forum');
|
||||||
e107::getScBatch('forum', 'forum');
|
e107::getScBatch('post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo);
|
||||||
e107::getScBatch('forum_post', 'forum')->setScVar('forum', $forum)->setScVar('threadInfo', $threadInfo);
|
|
||||||
|
|
||||||
$gen = new convert;
|
$gen = new convert;
|
||||||
$fp = new floodprotect;
|
$fp = new floodprotect;
|
||||||
@@ -490,42 +489,12 @@ if (!$FORUMPOST)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* check post access (bugtracker #1424) */
|
|
||||||
//if($action == "rp" && !$sql -> db_Select("forum_t", "*", "thread_id='{$id}'"))
|
|
||||||
//{
|
|
||||||
// $ns -> tablerender(LAN_20, "<div style='text-align:center'>".LAN_399."</div>");
|
|
||||||
// require_once(FOOTERF);
|
|
||||||
// exit;
|
|
||||||
//}
|
|
||||||
//elseif($action == "nt")
|
|
||||||
//{
|
|
||||||
// if (!$sact && !$sql -> db_Select("forum", "*", "forum_id='{$id}'"))
|
|
||||||
// {
|
|
||||||
// $ns -> tablerender(LAN_20, "<div style='text-align:center'>".LAN_399."</div>");
|
|
||||||
// require_once(FOOTERF);
|
|
||||||
// exit;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// // DB access should pass - after all, the thread should exist
|
|
||||||
// $sql->db_Select_gen("SELECT t.*, p.forum_postclass FROM #forum_t AS t
|
|
||||||
// LEFT JOIN #forum AS p ON t.thread_forum_id=p.forum_id WHERE thread_id='{$id}'");
|
|
||||||
// $fpr = $sql -> db_Fetch();
|
|
||||||
// if(!check_class($fpr['forum_postclass']))
|
|
||||||
// {
|
|
||||||
// $ns -> tablerender(LAN_20, "<div style='text-align:center'>".LAN_399."</div>");
|
|
||||||
// require_once(FOOTERF);
|
|
||||||
// exit;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
if($action == 'rp')
|
if($action == 'rp')
|
||||||
{
|
{
|
||||||
$FORUMPOST = $FORUMPOST_REPLY;
|
$FORUMPOST = $FORUMPOST_REPLY;
|
||||||
}
|
}
|
||||||
$text = $tp->parseTemplate($FORUMPOST, true);
|
$text = $tp->parseTemplate($FORUMPOST, true);
|
||||||
//$text = $tp->parseTemplate($FORUMPOST, FALSE, $forum_post_shortcodes);
|
|
||||||
|
|
||||||
|
|
||||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
@@ -542,7 +511,6 @@ else
|
|||||||
function isAuthor()
|
function isAuthor()
|
||||||
{
|
{
|
||||||
global $postInfo;
|
global $postInfo;
|
||||||
// print_a($postInfo);
|
|
||||||
return ((USERID === $postInfo['post_user']) || MODERATOR);
|
return ((USERID === $postInfo['post_user']) || MODERATOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user