mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Updates to use new plugin specific prefs. Change file headers as well.
This commit is contained in:
@@ -8,10 +8,8 @@
|
||||
*
|
||||
* Check for admin events being triggered
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_admin_events.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
function plugin_forum_admin_events($type, $parms)
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_linkgen.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -19,15 +17,15 @@ if (!defined('e107_INIT')) { exit; }
|
||||
// Usage: sublink_type[x]['title'].
|
||||
// x should be the same as the plugin folder.
|
||||
|
||||
include_lan(e_PLUGIN."forum/languages/".e_LANGUAGE."/lan_forum_admin.php");
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php');
|
||||
|
||||
$sublink_type['forum']['title'] = FORLAN_155; // "News Categories";
|
||||
$sublink_type['forum']['table'] = "forum";
|
||||
$sublink_type['forum']['table'] = 'forum';
|
||||
$sublink_type['forum']['query'] = "forum_parent !='0' ORDER BY forum_order ASC";
|
||||
$sublink_type['forum']['url'] = "{e_PLUGIN}forum/forum_viewforum.php?#";
|
||||
$sublink_type['forum']['fieldid'] = "forum_id";
|
||||
$sublink_type['forum']['fieldname'] = "forum_name";
|
||||
$sublink_type['forum']['fielddiz'] = "forum_description";
|
||||
$sublink_type['forum']['fieldid'] = 'forum_id';
|
||||
$sublink_type['forum']['fieldname'] = 'forum_name';
|
||||
$sublink_type['forum']['fielddiz'] = 'forum_description';
|
||||
|
||||
|
||||
?>
|
@@ -8,14 +8,13 @@
|
||||
*
|
||||
* Forum e_list Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_list.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
//TODO: Investigate queries
|
||||
class list_forum
|
||||
{
|
||||
function list_forum($parent)
|
||||
@@ -30,7 +29,7 @@ class list_forum
|
||||
|
||||
$bullet = $this->parent->getBullet($this->parent->settings['icon']);
|
||||
|
||||
if($this->parent->mode == "new_page" || $this->parent->mode == "new_menu" )
|
||||
if($this->parent->mode == 'new_page' || $this->parent->mode == 'new_menu' )
|
||||
{
|
||||
$lvisit = $this->parent->getlvisit();
|
||||
$qry = "
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
* Forum plugin notify configuration
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/e_notify.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$forum_posts = $sql -> db_Count("forum_t");
|
||||
$forum_posts = $sql->db_Count('forum_post');
|
||||
$text .= "<div style='padding-bottom: 2px;'>".E_16_FORUM." ".ADLAN_113.": ".$forum_posts."</div>";
|
||||
?>
|
@@ -75,7 +75,7 @@ $fVars->USERINFO = "<a href='".e_BASE."top.php?0.top.forum.10'>".LAN_429."</a> |
|
||||
if(USER)
|
||||
{
|
||||
$fVars->USERINFO .= " | <a href='".e_BASE.'userposts.php?0.forums.'.USERID."'>".LAN_431."</a> | <a href='".e_BASE."usersettings.php'>".LAN_432."</a> | <a href='".e_BASE."user.php?id.".USERID."'>".LAN_435."</a>";
|
||||
if($pref['forum_attach'] && (check_class($pref['upload_class']) || getperms('0')))
|
||||
if($forum->prefs->get('attach') && (check_class($pref['upload_class']) || getperms('0')))
|
||||
{
|
||||
$fVars->USERINFO .= " | <a href='".e_PLUGIN."forum/forum_uploads.php'>".FORLAN_442."</a>";
|
||||
}
|
||||
@@ -193,7 +193,7 @@ if (USER && $allread != TRUE && $total_new_threads && $total_new_threads >= $tot
|
||||
$fVars->INFO .= "<br /><a href='".e_SELF."?mark.all.as.read'>".LAN_199.'</a>'.(e_QUERY != 'new' ? ", <a href='".e_SELF."?new'>".LAN_421."</a>" : '');
|
||||
}
|
||||
|
||||
if (USER && varsettrue($pref['forum_track']) && e_QUERY != 'track')
|
||||
if (USER && varsettrue($forum->prefs->get('track')) && e_QUERY != 'track')
|
||||
{
|
||||
$fVars->INFO .= "<br /><a href='".e_SELF."?track'>".LAN_393.'</a>';
|
||||
}
|
||||
@@ -407,9 +407,9 @@ if (e_QUERY == 'track')
|
||||
}
|
||||
$forum_track_start = $e107->tp->simpleParse($FORUM_TRACK_START, $trackVars);
|
||||
$forum_track_end = $e107->tp->simpleParse($FORUM_TRACK_END, $trackVars);
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('enclose'))
|
||||
{
|
||||
$ns->tablerender($pref['forum_title'], $forum_track_start.$forum_trackstring.$forum_track_end, array('forum', 'main1'));
|
||||
$ns->tablerender($forum->prefs->get('title'), $forum_track_start.$forum_trackstring.$forum_track_end, array('forum', 'main1'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -449,9 +449,9 @@ if (e_QUERY == 'new')
|
||||
$forum_new_start = $e107->tp->simpleParse($FORUM_NEWPOSTS_START, $nVars);
|
||||
$forum_new_end = $e107->tp->simpleParse($FORUM_NEWPOSTS_END, $nVars);
|
||||
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('enclose'))
|
||||
{
|
||||
$ns->tablerender($pref['forum_title'], $forum_new_start.$forum_newstring.$forum_new_end, array('forum', 'main2'));
|
||||
$ns->tablerender($forum->prefs->get('title'), $forum_new_start.$forum_newstring.$forum_new_end, array('forum', 'main2'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -462,9 +462,9 @@ if (e_QUERY == 'new')
|
||||
$forum_main_start = $e107->tp->simpleParse($FORUM_MAIN_START, $fVars);
|
||||
$forum_main_end = $e107->tp->simpleParse($FORUM_MAIN_END, $fVars);
|
||||
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('enclose'))
|
||||
{
|
||||
$ns->tablerender($pref['forum_title'], $forum_main_start.$forum_string.$forum_main_end, array('forum', 'main3'));
|
||||
$ns->tablerender($forum->prefs->get('title'), $forum_main_start.$forum_string.$forum_main_end, array('forum', 'main3'));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -8,19 +8,17 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
$eplug_admin = true;
|
||||
require_once("../../class2.php");
|
||||
require_once('../../class2.php');
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php');
|
||||
|
||||
if (!getperms("P"))
|
||||
if (!getperms('P'))
|
||||
{
|
||||
header("location:".e_BASE."index.php");
|
||||
header('location:'.e_BASE.'index.php');
|
||||
exit;
|
||||
}
|
||||
$e_sub_cat = 'forum';
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
* Forum admin functions
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin_class.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
class forumAdmin
|
||||
|
@@ -19,7 +19,7 @@ class e107forum
|
||||
{
|
||||
// var $fieldTypes = array();
|
||||
private $userViewed, $permList;
|
||||
protected $modArray, $prefs;
|
||||
public $modArray, $prefs;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_conf.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_mod.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit(); }
|
||||
@@ -19,16 +17,12 @@ include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_admin.php');
|
||||
|
||||
function forum_thread_moderate($p)
|
||||
{
|
||||
// var_dump($_POST);
|
||||
// return;
|
||||
$e107 = e107::getInstance();
|
||||
global $sql;
|
||||
foreach ($p as $key => $val)
|
||||
{
|
||||
if (preg_match("#(.*?)_(\d+)_x#", $key, $matches))
|
||||
{
|
||||
$act = $matches[1];
|
||||
// print_a($matches); return;
|
||||
$id = (int)$matches[2];
|
||||
|
||||
switch ($act)
|
||||
@@ -69,7 +63,7 @@ function forum_thread_moderate($p)
|
||||
function forumDeleteThread($threadId)
|
||||
{
|
||||
require_once (e_PLUGIN.'forum/forum_class.php');
|
||||
$f = &new e107forum;
|
||||
$f = new e107forum;
|
||||
$ret = $f->threadDelete($threadId);
|
||||
return FORLAN_6.' and '.$ret.' '.FORLAN_7.'.';
|
||||
}
|
||||
@@ -77,7 +71,7 @@ function forumDeleteThread($threadId)
|
||||
function forumDeletePost($postId)
|
||||
{
|
||||
require_once (e_PLUGIN.'forum/forum_class.php');
|
||||
$f = &new e107forum;
|
||||
$f = new e107forum;
|
||||
$ret = $f->postDelete($postId);
|
||||
return FORLAN_6.' and '.$ret.' '.FORLAN_7.'.';
|
||||
}
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
* Forum Posting
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_post.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
@@ -96,7 +94,7 @@ define('e_PAGETITLE', LAN_01.' / '.$forumInfo['forum_name'].' / '.($action == 'r
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if($pref['forum_attach'])
|
||||
if($forum->prefs->get('forum_attach'))
|
||||
{
|
||||
global $allowed_filetypes, $max_upload_size;
|
||||
include_once(e_HANDLER.'upload_handler.php');
|
||||
@@ -146,7 +144,7 @@ if (isset($_POST['fpreview']))
|
||||
$tsubject = $tp->post_toHTML($_POST['subject'], true);
|
||||
$tpost = $tp->post_toHTML($_POST['post'], true);
|
||||
|
||||
if ($_POST['poll_title'] != '' && check_class($pref['forum_poll']))
|
||||
if ($_POST['poll_title'] != '' && check_class($forum->prefs->get('forum_poll')))
|
||||
{
|
||||
require_once(e_PLUGIN."poll/poll_class.php");
|
||||
$poll = new poll;
|
||||
@@ -322,7 +320,7 @@ if (isset($_POST['newthread']) || isset($_POST['reply']))
|
||||
$e107cache->clear('newforumposts');
|
||||
$threadLink = $e107->url->getUrl('forum', 'thread', array('func' => 'last', 'id' => $threadId));
|
||||
$forumLink = $e107->url->getUrl('forum', 'forum', array('func' => 'view', 'id' => $forumId));
|
||||
if ($pref['forum_redirect'])
|
||||
if ($forum->prefs->get('forum_redirect'))
|
||||
{
|
||||
header('location:'.$threadLink);
|
||||
exit;
|
||||
@@ -519,9 +517,9 @@ $text = $tp->parseTemplate($FORUMPOST, true);
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('forum_enclose'))
|
||||
{
|
||||
$ns->tablerender($pref['forum_title'], $text);
|
||||
$ns->tablerender($forum->prefs->get('title'), $text);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -550,7 +548,7 @@ function forumjump()
|
||||
|
||||
function process_upload()
|
||||
{
|
||||
global $pref, $forumInfo, $thread_info, $admin_log;
|
||||
global $forumInfo, $thread_info, $admin_log;
|
||||
|
||||
$postId = (int)$postId;
|
||||
$ret = array();
|
||||
@@ -576,17 +574,17 @@ function process_upload()
|
||||
if(strstr($upload['type'], 'image'))
|
||||
{
|
||||
$_type = 'img';
|
||||
if(isset($pref['forum_maxwidth']) && $pref['forum_maxwidth'] > 0)
|
||||
if($forum->prefs->get('maxwidth', 0) > 0)
|
||||
{
|
||||
require_once(e_HANDLER.'resize_handler.php');
|
||||
$orig_file = $upload['name'];
|
||||
$new_file = 'th_'.$orig_file;
|
||||
|
||||
$resizeDir = ($pref['forum_linkimg'] ? 'thumb/' : '');
|
||||
$resizeDir = ($forum->prefs->get('linkimg') ? 'thumb/' : '');
|
||||
|
||||
if(resize_image($attachmentDir.$orig_file, $attachmentDir.$resizeDir.$new_file, $pref['forum_maxwidth']))
|
||||
if(resize_image($attachmentDir.$orig_file, $attachmentDir.$resizeDir.$new_file, $forum->prefs->get('maxwidth')))
|
||||
{
|
||||
if($pref['forum_linkimg'])
|
||||
if($forum->prefs->get('linkimg'))
|
||||
{
|
||||
$parms = image_getsize($attachmentDir.$new_file);
|
||||
$_txt = '[br][link='.$fpath.$orig_file."][img{$parms}]".$fpath.$new_file.'[/img][/link][br]';
|
||||
|
@@ -76,7 +76,7 @@ class forum_post_shortcodes
|
||||
|
||||
function sc_postbox()
|
||||
{
|
||||
global $post, $pref;
|
||||
global $post;
|
||||
$rows = (e_WYSIWYG) ? 15 : 10;
|
||||
$ret = "<textarea class='e-wysiwyg tbox' id='post' name='post' cols='70' rows='{$rows}' style='width:95%' onselect='storeCaret(this);' onclick='storeCaret(this);' onkeyup='storeCaret(this);'>$post</textarea>\n<br />\n";
|
||||
if(!e_WYSIWYG)
|
||||
@@ -103,9 +103,9 @@ class forum_post_shortcodes
|
||||
|
||||
function sc_fileattach()
|
||||
{
|
||||
global $pref, $fileattach, $fileattach_alert;
|
||||
global $forum, $pref, $fileattach, $fileattach_alert;
|
||||
|
||||
if ($pref['forum_attach'] && strpos(e_QUERY, 'edit') === FALSE && (check_class($pref['upload_class']) || getperms('0')))
|
||||
if ($forum->prefs->get('forum_attach') && strpos(e_QUERY, 'edit') === FALSE && (check_class($pref['upload_class']) || getperms('0')))
|
||||
{
|
||||
if (is_writable(e_UPLOAD))
|
||||
{
|
||||
@@ -179,8 +179,8 @@ class forum_post_shortcodes
|
||||
|
||||
function sc_poll()
|
||||
{
|
||||
global $poll_form, $action, $pref;
|
||||
if ($action == 'nt' && check_class($pref['forum_poll']) && strpos(e_QUERY, 'edit') === false)
|
||||
global $forum, $poll_form, $action;
|
||||
if ($action == 'nt' && check_class($forum->prefs->get('poll')) && strpos(e_QUERY, 'edit') === false)
|
||||
{
|
||||
return $poll_form;
|
||||
}
|
||||
|
@@ -179,16 +179,15 @@ class forum_shortcodes
|
||||
function sc_signature()
|
||||
{
|
||||
if(!USER) { return ''; }
|
||||
global $pref;
|
||||
global $forum;
|
||||
static $forum_sig_shown;
|
||||
if(varsettrue($pref['forum_sig_once']))
|
||||
if($forum->prefs->get('sig_once'))
|
||||
{
|
||||
$_tmp = 'forum_sig_shown_'.$this->postInfo['post_user'];
|
||||
if(getcachedvars($_tmp)) { return ''; }
|
||||
cachevars($_tmp, 1);
|
||||
}
|
||||
return ($this->postInfo['user_signature'] ? "<br /><hr style='width:15%; text-align:left' /><span class='smalltext'>".$this->e107->tp->toHTML($this->postInfo['user_signature'], true).'</span>' : '');
|
||||
|
||||
}
|
||||
|
||||
function sc_profileimg()
|
||||
@@ -275,7 +274,6 @@ class forum_shortcodes
|
||||
|
||||
function sc_level($parm)
|
||||
{
|
||||
global $pref;
|
||||
if (!$this->postInfo['post_user']) { return ''; }
|
||||
|
||||
$rankInfo = $this->e107->userRank->getRanks($this->postInfo['post_user']);
|
||||
|
@@ -8,14 +8,14 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_stats.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
|
||||
//TODO: Investigate the queries used here
|
||||
|
||||
include_lan(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_stats.php');
|
||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||
$gen = new convert;
|
||||
|
@@ -259,6 +259,9 @@ function step4()
|
||||
$coreConfig->remove($key);
|
||||
}
|
||||
}
|
||||
$old_prefs['reported_post_email'] = $coreConfig->get('reported_post_email');
|
||||
$coreConfig->remove('reported_post_email');
|
||||
|
||||
$fconf->setPref($old_prefs)->save(false, true);
|
||||
$coreConfig->save(false, true);
|
||||
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_uploads.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
require_once("../../class2.php");
|
||||
|
@@ -30,14 +30,14 @@ if (!e_QUERY)
|
||||
exit;
|
||||
}
|
||||
|
||||
//$view = 25;
|
||||
$view = (varset($pref['forum_threadspage']) ? $pref['forum_threadspage'] : 25);
|
||||
$page = (varset($_GET['p']) ? $_GET['p'] : 0);
|
||||
$threadFrom = $page * $view;
|
||||
|
||||
require_once(e_PLUGIN.'forum/forum_class.php');
|
||||
$forum = new e107forum;
|
||||
|
||||
//$view = 25;
|
||||
$view = $forum->prefs->get('threadspage', 25);
|
||||
$page = (varset($_GET['p']) ? $_GET['p'] : 0);
|
||||
$threadFrom = $page * $view;
|
||||
|
||||
global $forum_info, $FORUM_CRUMB;
|
||||
$fVars = new e_vars;
|
||||
|
||||
@@ -242,7 +242,7 @@ if (count($threadList) )
|
||||
{
|
||||
$sticky_threads ++;
|
||||
}
|
||||
if ($sticky_threads > 0 && !$stuck && $pref['forum_hilightsticky'])
|
||||
if ($sticky_threads > 0 && !$stuck && $forum->prefs->get('hilightsticky'))
|
||||
{
|
||||
if($FORUM_IMPORTANT_ROW)
|
||||
{
|
||||
@@ -292,9 +292,9 @@ $forum_view_start = $tp->simpleParse($FORUM_VIEW_START, $fVars);
|
||||
$forum_view_end = $tp->simpleParse($FORUM_VIEW_END, $fVars);
|
||||
|
||||
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('forum_enclose'))
|
||||
{
|
||||
$ns->tablerender($pref['forum_title'], $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1'));
|
||||
$ns->tablerender($forum->prefs->get('forum_title'), $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1'));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -313,7 +313,7 @@ require_once(FOOTERF);
|
||||
|
||||
function parse_thread($thread_info)
|
||||
{
|
||||
global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $pref, $menu_pref, $threadsViewed;
|
||||
global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $menu_pref, $threadsViewed;
|
||||
global $tp;
|
||||
$tVars = new e_vars;
|
||||
$e107 = e107::getInstance();
|
||||
@@ -351,7 +351,7 @@ function parse_thread($thread_info)
|
||||
|
||||
$tVars->THREADDATE = $gen->convert_date($thread_info['thread_datestamp'], 'forum');
|
||||
$tVars->ICON = ($newflag ? IMAGE_new : IMAGE_nonew);
|
||||
if ($tVars->REPLIES >= $pref['forum_popular'])
|
||||
if ($tVars->REPLIES >= $forum->prefs->get('popular', 10))
|
||||
{
|
||||
$tVars->ICON = ($newflag ? IMAGE_new_popular : IMAGE_nonew_popular);
|
||||
}
|
||||
@@ -381,10 +381,10 @@ function parse_thread($thread_info)
|
||||
// {
|
||||
// $thread_name = substr($thread_name, strlen($THREADTYPE));
|
||||
// }
|
||||
if ($pref['forum_tooltip'])
|
||||
if ($forum->prefs->get('tooltip'))
|
||||
{
|
||||
$thread_thread = strip_tags($tp->toHTML($thread_info['thread_thread'], true, 'no_hook'));
|
||||
$tip_length = ($pref['forum_tiplength'] ? $pref['forum_tiplength'] : 400);
|
||||
$tip_length = $forum->prefs->get('tiplength', 400);
|
||||
if (strlen($thread_thread) > $tip_length)
|
||||
{
|
||||
//$thread_thread = substr($thread_thread, 0, $tip_length).' '.$menu_pref['newforumposts_postfix'];
|
||||
@@ -399,7 +399,7 @@ function parse_thread($thread_info)
|
||||
}
|
||||
$tVars->THREADNAME = "<a {$title} href='".$e107->url->getUrl('forum', 'thread', "func=view&id={$threadId}")."'>{$thread_name}</a>";
|
||||
|
||||
$pages = ceil(($tVars->REPLIES+1)/$pref['forum_postspage']);
|
||||
$pages = ceil(($tVars->REPLIES+1)/$forum->prefs->get('postspage'));
|
||||
if ($pages > 1)
|
||||
{
|
||||
if($pages > 6)
|
||||
|
@@ -135,7 +135,7 @@ $tVars->NEXTPREV = "<< <a href='" . $e107->url->getUrl('forum', 'thread',
|
||||
$tVars->NEXTPREV .= ' | ';
|
||||
$tVars->NEXTPREV .= "<a href='" . $e107->url->getUrl('forum', 'thread', array('func' => 'next', 'id' => $thread->threadId)) . "'>" . LAN_390 . "</a> >>";
|
||||
|
||||
if ($pref['forum_track'] && USER)
|
||||
if ($forum->prefs->get('track') && USER)
|
||||
{
|
||||
$img = ($thread->threadInfo['track_userid'] ? IMAGE_track : IMAGE_untrack);
|
||||
$url = $e107->url->getUrl('forum', 'thread', array('func' => 'view', 'id' => $thread->threadId));
|
||||
@@ -264,7 +264,7 @@ if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->thread
|
||||
|
||||
require_once (HEADERF);
|
||||
|
||||
if ($pref['forum_enclose'])
|
||||
if ($forum->prefs->get('enclose'))
|
||||
{
|
||||
$ns->tablerender(LAN_01, $forumstring, array('forum_viewtopic', 'main'));
|
||||
}
|
||||
@@ -451,10 +451,10 @@ class e107ForumThread
|
||||
|
||||
function init()
|
||||
{
|
||||
global $pref, $forum;
|
||||
global $forum;
|
||||
$e107 = e107::getInstance();
|
||||
$this->threadId = (int)varset($_GET['id']);
|
||||
$this->perPage = (varset($_GET['perpage']) ? (int)$_GET['perpage'] : $pref['forum_postspage']);
|
||||
$this->perPage = (varset($_GET['perpage']) ? (int)$_GET['perpage'] : $forum->prefs->get('postspage'));
|
||||
$this->page = (varset($_GET['p']) ? (int)$_GET['p'] : 0);
|
||||
|
||||
//If threadId doesn't exist, or not given, redirect to main forum page
|
||||
@@ -499,7 +499,7 @@ class e107ForumThread
|
||||
|
||||
function processFunction()
|
||||
{
|
||||
global $forum, $thread, $pref;
|
||||
global $forum, $thread;
|
||||
$e107 = e107::getInstance();
|
||||
if (!isset($_GET['f']))
|
||||
{
|
||||
@@ -513,7 +513,7 @@ class e107ForumThread
|
||||
$postId = varset($_GET['id']);
|
||||
$postInfo = $forum->postGet($postId,'post');
|
||||
$postNum = $forum->postGetPostNum($postInfo['post_thread'], $postId);
|
||||
$postPage = ceil($postNum / $pref['forum_postspage'])-1;
|
||||
$postPage = ceil($postNum / $forum->prefs->get('postspage'))-1;
|
||||
$url = $e107->url->getUrl('forum', 'thread', "func=view&id={$postInfo['post_thread']}&page=$postPage");
|
||||
header('location: '.$url);
|
||||
exit;
|
||||
@@ -553,7 +553,7 @@ class e107ForumThread
|
||||
if (isset($_POST['report_thread']))
|
||||
{
|
||||
$report_add = $e107->tp->toDB($_POST['report_add']);
|
||||
if ($pref['reported_post_email'])
|
||||
if ($forum->prefs->get('reported_post_email'))
|
||||
{
|
||||
require_once (e_HANDLER . 'mail.php');
|
||||
$report = LAN_422 . SITENAME . " : " . (substr(SITEURL, -1) == "/" ? SITEURL : SITEURL . "/") . $PLUGINS_DIRECTORY . "forum/forum_viewtopic.php?" . $thread_id . ".post\n" . LAN_425 . USERNAME . "\n" . $report_add;
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/index.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
header("location: forum.php");
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
@@ -27,7 +25,7 @@ $max_age = $max_age == 0 ? '' : '(t.post_datestamp > '.(time()-(int)$max_age*864
|
||||
|
||||
$forum = new e107forum;
|
||||
$forumList = implode(',', $forum->permList['view']);
|
||||
|
||||
//TODO: Use query from forum class to get thread list
|
||||
$qry = "
|
||||
SELECT
|
||||
p.post_user, p.post_id, p.post_datestamp, p.post_user_anon, p.post_entry,
|
||||
|
@@ -8,10 +8,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_plugins/forum/newforumposts_menu_config.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
* $URL$
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
$eplug_admin = TRUE;
|
||||
|
@@ -14,19 +14,18 @@
|
||||
<siteLinks>
|
||||
<link url="{e_PLUGIN}forum/forum.php" perm='everyone'>Forum</link>
|
||||
</siteLinks>
|
||||
<mainPrefs>
|
||||
<pref name="forum_show_topics">1</pref>
|
||||
<pref name="forum_postfix">[more...]</pref>
|
||||
<pref name="forum_poll">255</pref>
|
||||
<pref name="forum_popular">10</pref>
|
||||
<pref name="forum_track">1</pref>
|
||||
<pref name="forum_eprefix">[forum]</pref>
|
||||
<pref name="forum_enclose">1</pref>
|
||||
<pref name="forum_title">Forums</pref>
|
||||
<pref name="forum_postspage">10</pref>
|
||||
<pref name="forum_threadspage">25</pref>
|
||||
<pref name="forum_hilightsticky">1</pref>
|
||||
</mainPrefs>
|
||||
<pluginPrefs>
|
||||
<pref name="show_topics">1</pref>
|
||||
<pref name="postfix">[more...]</pref>
|
||||
<pref name="poll">255</pref>
|
||||
<pref name="popular">10</pref>
|
||||
<pref name="track">1</pref>
|
||||
<pref name="eprefix">[forum]</pref>
|
||||
<pref name="enclose">1</pref>
|
||||
<pref name="title">Forums</pref>
|
||||
<pref name="postspage">10</pref>
|
||||
<pref name="hilightsticky">1</pref>
|
||||
</pluginPrefs>
|
||||
<userClasses>
|
||||
<class name="forum_moderator" description="Moderator of all forums" />
|
||||
</userClasses>
|
||||
|
Reference in New Issue
Block a user