diff --git a/e107_files/e_url/core/core/main.php b/e107_files/e_url/core/core/main.php new file mode 100644 index 000000000..9fabe34cc --- /dev/null +++ b/e107_files/e_url/core/core/main.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/e107_plugins/forum/e_url/forum.php b/e107_plugins/forum/e_url/forum.php index 28e8861f6..be379aa7a 100644 --- a/e107_plugins/forum/e_url/forum.php +++ b/e107_plugins/forum/e_url/forum.php @@ -1,11 +1,12 @@ forum_getparents(); $forum_list = $forum->forum_getforums(); -$sub_list = $forum->forum_getsubs(); +$sub_list = $forum->forumGetSubs(); $newflag_list = $forum->forum_newflag_list(); if (!$parent_list) diff --git a/e107_plugins/forum/forum_admin.php b/e107_plugins/forum/forum_admin.php index c2e0ea03f..86fc60c7f 100644 --- a/e107_plugins/forum/forum_admin.php +++ b/e107_plugins/forum/forum_admin.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin.php,v $ -| $Revision: 1.5 $ -| $Date: 2008-12-05 01:30:56 $ +| $Revision: 1.6 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -233,12 +233,12 @@ if(isset($_POST['update_forum'])) $tmp['WHERE'] = 'forum_id = '.(int)$id; $tmp2['_FIELD_TYPES'] = $tmp['_FIELD_TYPES']; - $tmp2['forum_moderators'] = $tmp['forum_moderators']; - $tmp2['forum_class'] = $tmp['forum_class']; - $tmp2['forum_postclass'] = $tmp['forum_postclass']; - $tmp2['forum_threadclass'] = $tmp['forum_threadclass']; + $tmp2['forum_moderators'] = $tmp['forum_moderators']; + $tmp2['forum_class'] = $tmp['forum_class']; + $tmp2['forum_postclass'] = $tmp['forum_postclass']; + $tmp2['forum_threadclass'] = $tmp['forum_threadclass']; $tmp2['WHERE'] = 'forum_sub = '.(int)$id; - + $sql->db_Update('forum', $tmp); $sql->db_Update('forum', $tmp2); @@ -268,6 +268,7 @@ if (isset($_POST['updateoptions'])) $pref['forum_enclose'] = $_POST['forum_enclose']; $pref['forum_title'] = $_POST['forum_title']; $pref['forum_postspage'] = $_POST['forum_postspage']; + $pref['forum_threadspage'] = $_POST['forum_threadspage']; $pref['html_post'] = $_POST['html_post']; $pref['forum_attach'] = $_POST['forum_attach']; $pref['forum_redirect'] = $_POST['forum_redirect']; diff --git a/e107_plugins/forum/forum_admin_class.php b/e107_plugins/forum/forum_admin_class.php index 57f260797..1ded86765 100755 --- a/e107_plugins/forum/forum_admin_class.php +++ b/e107_plugins/forum/forum_admin_class.php @@ -9,8 +9,8 @@ * Forum admin functions * * $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_admin_class.php,v $ -* $Revision: 1.9 $ -* $Date: 2008-12-10 15:29:31 $ +* $Revision: 1.10 $ +* $Date: 2008-12-15 00:29:20 $ * $Author: mcfly_e107 $ * */ @@ -258,7 +258,7 @@ class forumAdmin { global $e107, $for; - $subList = $for->forum_getsubs(); + $subList = $for->forumGetSubs(); if (!$mode) { @@ -737,6 +737,11 @@ class forumAdmin + + ".FORLAN_186."
".FORLAN_187." + + + ".FORLAN_132."
".FORLAN_133." ".($pref['forum_hilightsticky'] ? "" : "")." diff --git a/e107_plugins/forum/forum_class.php b/e107_plugins/forum/forum_class.php index bd4e28b1a..84f16ac06 100644 --- a/e107_plugins/forum/forum_class.php +++ b/e107_plugins/forum/forum_class.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_class.php,v $ -| $Revision: 1.26 $ -| $Date: 2008-12-14 03:18:45 $ +| $Revision: 1.27 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -39,7 +39,7 @@ class e107forum $this->fieldTypes['forum_thread']['thread_user'] = 'int'; $this->fieldTypes['forum_thread']['thread_lastpost'] = 'int'; $this->fieldTypes['forum_thread']['thread_lastuser'] = 'int'; - $this->fieldTypes['forum_thread']['thread_s'] = 'int'; + $this->fieldTypes['forum_thread']['thread_sticky'] = 'int'; $this->fieldTypes['forum_thread']['thread_forum_id'] = 'int'; $this->fieldTypes['forum_thread']['thread_active'] = 'int'; $this->fieldTypes['forum_thread']['thread_datestamp'] = 'int'; @@ -282,9 +282,9 @@ class e107forum { //TODO: Fix query to get only forum and parent info needed, with correct naming $qry = ' - SELECT t.*, f.*, + SELECT t.*, f.*, fp.forum_id as parent_id, fp.forum_name as parent_name, - sp.forum_id as forum_sub, sp.forum_name as sub_parent, + sp.forum_id as forum_sub, sp.forum_name as sub_parent, tr.track_userid FROM `#forum_thread` AS t LEFT JOIN `#forum` AS f ON t.thread_forum_id = f.forum_id @@ -457,7 +457,7 @@ class e107forum /** * Given threadId and postId, determine which number of post in thread the postid is - * + * */ function postGetPostNum($threadId, $postId) { @@ -589,13 +589,13 @@ class e107forum function threadMarkAsRead($threadId) { + global $currentUser; $e107 = e107::getInstance(); $threadId = (int)$threadId; - $currentUser['user_plugin_forum_viewed'] = '4..5..6.7.8'; - $_tmp = preg_split('#\.+#', $currentUser['user_plugin_forum_viewed']); + $_tmp = preg_split('#\,+#', $currentUser['user_plugin_forum_viewed']); $_tmp[] = $threadId; - $viewed = '.'.implode('.', $_tmp).'.'; - unset($_tmp); + $tmp = array_unique($tmp); + $viewed = trim(implode(',', $_tmp), ','); return $e107->sql->db_Update('user_extended', "user_plugin_forum_viewed = '{$viewed}' WHERE user_extended_id = ".USERID); } @@ -657,13 +657,13 @@ class e107forum return FALSE; } - function forum_getsubs($forum_id = '') + function forumGetSubs($forum_id = '') { global $sql; - $where = ($forum_id != '' && $forum_id != 'bysub' ? "AND forum_sub = ".(int)$forum_id : ''); + $where = ($forum_id != '' && $forum_id != 'bysub' ? 'AND forum_sub = '.(int)$forum_id : ''); $qry = " - SELECT f.*, u.user_name FROM #forum AS f - LEFT JOIN #user AS u ON f.forum_lastpost_user = u.user_id + SELECT f.*, u.user_name FROM `#forum` AS f + LEFT JOIN `#user` AS u ON f.forum_lastpost_user = u.user_id WHERE forum_sub != 0 {$where} ORDER BY f.forum_order ASC "; @@ -671,7 +671,7 @@ class e107forum { while ($row = $sql->db_Fetch(MYSQL_ASSOC)) { - if($forum_id == "") + if($forum_id == '') { $ret[$row['forum_parent']][$row['forum_sub']][] = $row; } @@ -846,7 +846,7 @@ class e107forum LEFT JOIN `#user` AS lpu ON t.thread_lastuser = lpu.user_id WHERE t.thread_forum_id = {$forumId} ORDER BY - t.thread_s DESC, + t.thread_sticky DESC, t.thread_lastpost DESC LIMIT ".(int)$from.','.(int)$view; @@ -909,7 +909,7 @@ class e107forum WHERE thread_forum_id = $forumId AND thread_lastpost {$dir} $lastpost ORDER BY - thread_s DESC, + thread_sticky DESC, thread_lastpost {$sort} LIMIT 1"; if ($e107->sql->db_Select_gen($qry)) @@ -934,7 +934,7 @@ class e107forum WHERE t.thread_forum_id = $forum_id AND t.thread_parent = 0 ORDER BY - t.thread_s DESC, + t.thread_sticky DESC, t.thread_lastpost DESC, t.thread_datestamp DESC LIMIT ".intval($from).",".intval($limit); @@ -1127,7 +1127,7 @@ class e107forum } } - function thread_insert($thread_name, $thread_thread, $thread_forum_id, $thread_parent, $thread_poster, $thread_active, $thread_s, $forum_sub) + function thread_insert($thread_name, $thread_thread, $thread_forum_id, $thread_parent, $thread_poster, $thread_active, $thread_sticky, $forum_sub) { $post_time = time(); global $sql, $tp, $pref, $e107; @@ -1147,7 +1147,7 @@ class e107forum } $post_last_user = ($thread_parent ? "" : $post_user); - $vals = "'0', '{$thread_name}', '{$thread_thread}', '".intval($thread_forum_id)."', '".intval($post_time)."', '".intval($thread_parent)."', '{$thread_post_user}', '0', '".intval($thread_active)."', '$post_time', '$thread_s', '0', '{$post_last_user}', '0'"; + $vals = "'0', '{$thread_name}', '{$thread_thread}', '".intval($thread_forum_id)."', '".intval($post_time)."', '".intval($thread_parent)."', '{$thread_post_user}', '0', '".intval($thread_active)."', '$post_time', '$thread_sticky', '0', '{$post_last_user}', '0'"; $newthread_id = $sql->db_Insert('forum_t', $vals); if(!$newthread_id) { @@ -1262,7 +1262,7 @@ class e107forum if($type == 'delete') { //Get list of threads to prune - if ($sql->db_Select("forum_t", "thread_id", "thread_lastpost < $prunedate AND thread_parent=0 AND thread_s != 1 AND thread_forum_id IN ({$forumList})")) + if ($sql->db_Select("forum_t", "thread_id", "thread_lastpost < $prunedate AND thread_parent=0 AND thread_sticky != 1 AND thread_forum_id IN ({$forumList})")) { $threadList = $sql->db_getList(); foreach($threadList as $thread) diff --git a/e107_plugins/forum/forum_mod.php b/e107_plugins/forum/forum_mod.php index 1847fff1b..d15a25ea7 100644 --- a/e107_plugins/forum/forum_mod.php +++ b/e107_plugins/forum/forum_mod.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_mod.php,v $ -| $Revision: 1.4 $ -| $Date: 2008-12-11 16:02:05 $ +| $Revision: 1.5 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -49,12 +49,12 @@ function forum_thread_moderate($p) break; case 'stick': - $e107->sql->db_Update('forum_thread', 'thread_s=1 WHERE thread_id='.$id); + $e107->sql->db_Update('forum_thread', 'thread_sticky=1 WHERE thread_id='.$id); return FORLAN_STICK; break; case 'unstick': - $e107->sql->db_Update('forum_thread', 'thread_s=0 WHERE thread_id='.$id); + $e107->sql->db_Update('forum_thread', 'thread_sticky=0 WHERE thread_id='.$id); return FORLAN_UNSTICK; break; diff --git a/e107_plugins/forum/forum_post.php b/e107_plugins/forum/forum_post.php index 115796b49..baa841230 100644 --- a/e107_plugins/forum/forum_post.php +++ b/e107_plugins/forum/forum_post.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_post.php,v $ -| $Revision: 1.31 $ -| $Date: 2008-12-13 21:52:18 $ +| $Revision: 1.32 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -269,7 +269,7 @@ if (isset($_POST['newthread']) || isset($_POST['reply'])) // New thread started. Add the thread info (with lastest post info), add the post. // Update forum with latest post info case 'nt': - $threadInfo['thread_s'] = (MODERATOR ? (int)$_POST['threadtype'] : 0); + $threadInfo['thread_sticky'] = (MODERATOR ? (int)$_POST['threadtype'] : 0); $threadInfo['thread_name'] = $_POST['subject']; $threadInfo['thread_forum_id'] = $forumId; $threadInfo['thread_active'] = 1; @@ -375,9 +375,9 @@ if (isset($_POST['update_thread'])) $postVals['post_edit_datestamp'] = time(); $postVals['post_edit_user'] = USERID; $postVals['post_entry'] = $_POST['post']; - + $threadVals['thread_name'] = $_POST['subject']; - + $forum->threadUpdate($postInfo['post_thread'], $threadVals); $forum->postUpdate($postInfo['post_id'], $postVals); $e107cache->clear('newforumposts'); @@ -405,7 +405,7 @@ if (isset($_POST['update_reply'])) $postVals['post_edit_datestamp'] = time(); $postVals['post_edit_user'] = USERID; $postVals['post_entry'] = $_POST['post']; - + $forum->postUpdate($postInfo['post_id'], $postVals); $e107cache->clear('newforumposts'); $url = $e107->url->getUrl('forum', 'thread', "func=post&id={$postInfo['post_id']}"); diff --git a/e107_plugins/forum/forum_post_shortcodes.php b/e107_plugins/forum/forum_post_shortcodes.php index 2586884fb..e51ee377e 100644 --- a/e107_plugins/forum/forum_post_shortcodes.php +++ b/e107_plugins/forum/forum_post_shortcodes.php @@ -108,8 +108,8 @@ SC_BEGIN POSTTHREADAS global $action, $thread_info; if (MODERATOR && $action == "nt") { - $thread_s = (isset($_POST['threadtype']) ? $_POST['threadtype'] : $thread_info['head']['thread_s']); - return "
".LAN_400."".LAN_1." ".LAN_2." ".LAN_3.""; + $thread_sticky = (isset($_POST['threadtype']) ? $_POST['threadtype'] : $thread_info['head']['thread_sticky']); + return "
".LAN_400."".LAN_1." ".LAN_2." ".LAN_3.""; } return ''; SC_END diff --git a/e107_plugins/forum/forum_shortcodes.php b/e107_plugins/forum/forum_shortcodes.php index 915db975b..d06fcd8d2 100644 --- a/e107_plugins/forum/forum_shortcodes.php +++ b/e107_plugins/forum/forum_shortcodes.php @@ -29,7 +29,7 @@ SC_END SC_BEGIN POSTDELETED global $postInfo; -if($postInfo['post_s']) +if($postInfo['post_status']) { $info = unserialize($postInfo['post_options']); return " diff --git a/e107_plugins/forum/forum_sql.php b/e107_plugins/forum/forum_sql.php index 176c2e125..7097b5ced 100644 --- a/e107_plugins/forum/forum_sql.php +++ b/e107_plugins/forum/forum_sql.php @@ -28,7 +28,7 @@ CREATE TABLE forum_thread ( `thread_views` int(10) unsigned NOT NULL default '0', `thread_active` tinyint(3) unsigned NOT NULL default '0', `thread_lastpost` int(10) unsigned NOT NULL default '0', - `thread_s` tinyint(1) unsigned NOT NULL default '0', + `thread_sticky` tinyint(1) unsigned NOT NULL default '0', `thread_datestamp` int(10) unsigned default NULL, `thread_user` int(10) unsigned default NULL, `thread_user_anon` varchar(30) NULL, @@ -47,7 +47,7 @@ CREATE TABLE forum_post ( `post_entry` text NOT NULL, `post_thread` int(10) unsigned default NULL, `post_forum` int(10) unsigned default NULL, - `post_s` tinyint(1) unsigned NOT NULL default '0', + `post_status` tinyint(1) unsigned NOT NULL default '0', `post_datestamp` int(10) unsigned NOT NULL default '0', `post_user` int(10) unsigned NOT NULL, `post_edit_datestamp` int(10) unsigned NOT NULL default '0', diff --git a/e107_plugins/forum/forum_viewforum.php b/e107_plugins/forum/forum_viewforum.php index 70050ff20..37ecedd04 100644 --- a/e107_plugins/forum/forum_viewforum.php +++ b/e107_plugins/forum/forum_viewforum.php @@ -9,8 +9,8 @@ * View specific forums * * $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_viewforum.php,v $ -* $Revision: 1.9 $ -* $Date: 2008-12-14 03:18:45 $ +* $Revision: 1.10 $ +* $Date: 2008-12-15 00:29:20 $ * $Author: mcfly_e107 $ * */ @@ -30,8 +30,12 @@ if (!e_QUERY) exit; } -$view = 25; -$threadFrom = (isset($_REQUEST['p']) ? $_REQUEST['p'] * $view : 0); +//$view = 25; +//echo "pref = {$pref['forum_threadspage']}
"; +$view = (varset($pref['forum_threadspage']) ? $pref['forum_threadspage'] : 25); +//echo "view = $view
"; +$page = (varset($_GET['p']) ? $_GET['p'] : 0); +$threadFrom = $page * $view; require_once(e_PLUGIN.'forum/forum_class.php'); $forum = new e107forum; @@ -118,14 +122,12 @@ else $pages = false; } -//echo "pages = $pages
"; - if ($pages) { if(strpos($FORUM_VIEW_START, 'THREADPAGES') !== false || strpos($FORUM_VIEW_END, 'THREADPAGES') !== false) { - $parms = "{$threadCount},{$view},{$threadFrom},".e_SELF.'?'.$forumId.'.[FROM],off'; - $THREADPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}"); + $parms = "{$pages},1,{$page},url::forum::forum::func=view&id={$forumId}&page=[FROM], off"; + $THREADPAGES = $e107->tp->parseTemplate("{NEXTPREV={$parms}}"); } } @@ -209,16 +211,15 @@ $reg_threads = 0; $unstuck = false; $threadList = $forum->forumGetThreads($forumId, $threadFrom, $view); -$subList = $forum->forum_getsubs($forum_id); -//print_a($sub_list); +$subList = $forum->forumGetSubs($forum_id); $gen = new convert; $SUBFORUMS = ''; -if(is_array($sub_list)) +if(is_array($subList) && isset($subList[$forumInfo['forum_parent']][$forumId])) { $newflag_list = $forum->forum_newflag_list(); $sub_info = ''; - foreach($sub_list as $sub) + foreach($subList[$forumInfo['forum_parent']][$forumId] as $sub) { $sub_info .= parse_sub($sub); } @@ -237,7 +238,7 @@ if (count($threadList) ) { $thread_info['thread_options'] = array(); } - if ($thread_info['thread_s']) + if ($thread_info['thread_sticky']) { $sticky_threads ++; } @@ -253,7 +254,7 @@ if (count($threadList) ) } $stuck = true; } - if (!$thread_info['thread_s']) + if (!$thread_info['thread_sticky']) { $reg_threads ++; } @@ -312,7 +313,7 @@ require_once(FOOTERF); function parse_thread($thread_info) { - global $forum, $tp, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $pref, $forum_id, $menu_pref; + global $forum, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $pref, $forum_id, $menu_pref; $e107 = e107::getInstance(); $text = ''; @@ -327,13 +328,14 @@ function parse_thread($thread_info) $lastpost_datestamp = $gen->convert_date($thread_info['thread_lastpost'], 'forum'); if($thread_info['lastpost_username']) { - $LASTPOST = "".$thread_info['lastpost_username'].""; + $url = $e107->url->getUrl('core:user', 'main', "func=profile&id={$thread_info['thread_lastuser']}"); + $LASTPOST = "".$thread_info['lastpost_username'].""; } else { if(!$thread_info['thread_lastuser']) { - $LASTPOST = $tp->toHTML($thread_info['thread_lastuser_anon']); + $LASTPOST = $e107->tp->toHTML($thread_info['thread_lastuser_anon']); } else { @@ -360,12 +362,12 @@ function parse_thread($thread_info) } $THREADTYPE = ''; - if ($thread_info['thread_s'] == 1) + if ($thread_info['thread_sticky'] == 1) { $ICON = ($thread_info['thread_active'] ? IMAGE_sticky : IMAGE_stickyclosed); $THREADTYPE = '['.LAN_202.']
'; } - elseif($thread_info['thread_s'] == 2) + elseif($thread_info['thread_sticky'] == 2) { $ICON = IMAGE_announce; $THREADTYPE = '['.LAN_396.']
'; @@ -376,7 +378,7 @@ function parse_thread($thread_info) } - $thread_name = strip_tags($tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off')); + $thread_name = strip_tags($e107->tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off')); if(isset($thread_info['thread_options']['poll'])) { $thread_name = '['.FORLAN_23.'] ' . $thread_name; @@ -400,7 +402,7 @@ function parse_thread($thread_info) { $title = ''; } - $THREADNAME = "{$thread_name}"; + $THREADNAME = "{$thread_name}"; $pages = ceil(($REPLIES+1)/$pref['forum_postspage']); if ($pages > 1) @@ -439,25 +441,23 @@ function parse_thread($thread_info) if (MODERATOR) { -// $thread_id = $thread_info['thread_id']; -// $e107->url->getUrl('forum', 'thread', array('func' => 'last', 'id' => $tmp[1])) $ADMIN_ICONS = "
- ".($thread_info['thread_s'] == 1 ? " " : " ")." + ".($thread_info['thread_sticky'] == 1 ? " " : " ")." ".($thread_info['thread_active'] ? " " : " "). " - ".IMAGE_admin_move." + ".IMAGE_admin_move.'
- "; + '; } $text .= " ".$THREADDATE.'
'; - $tmp = explode('.', $thread_info['thread_user'], 2); +// $tmp = explode('.', $thread_info['thread_user'], 2); if($thread_info['user_name']) { - $POSTER = "".$thread_info['user_name'].""; + $POSTER = "".$thread_info['user_name'].""; } else { @@ -471,12 +471,12 @@ function parse_thread($thread_info) } } - if ($thread_info['thread_s'] == 1 && $FORUM_VIEW_FORUM_STICKY) + if ($thread_info['thread_sticky'] == 1 && $FORUM_VIEW_FORUM_STICKY) { return(preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_FORUM_STICKY)); } - if ($thread_info['thread_s'] == 2 && $FORUM_VIEW_FORUM_ANNOUNCE) + if ($thread_info['thread_sticky'] == 2 && $FORUM_VIEW_FORUM_ANNOUNCE) { return(preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_FORUM_ANNOUNCE)); } @@ -492,10 +492,11 @@ function parse_thread($thread_info) function parse_sub($subInfo) { - global $FORUM_VIEW_SUB, $gen, $tp, $newflag_list; + global $FORUM_VIEW_SUB, $gen, $newflag_list; $e107 = e107::getInstance(); - $SUB_FORUMTITLE = "{$subInfo['forum_name']}"; - $SUB_DESCRIPTION = $tp->toHTML($subInfo['forum_description'], false, 'no_hook'); + $forumName = $e107->tp->toHTML($subInfo['forum_name'], true); + $SUB_FORUMTITLE = "{$forumName}"; + $SUB_DESCRIPTION = $e107->tp->toHTML($subInfo['forum_description'], false, 'no_hook'); $SUB_THREADS = $subInfo['forum_threads']; $SUB_REPLIES = $subInfo['forum_replies']; if(USER && is_array($newflag_list) && in_array($subInfo['forum_id'], $newflag_list)) @@ -510,26 +511,22 @@ function parse_sub($subInfo) if($subInfo['forum_lastpost_info']) { $tmp = explode('.', $subInfo['forum_lastpost_info']); - -// $e107->url->getUrl('forum', 'thread', array('func' => 'last', 'id' => $tmp[1])); - $lp_thread = " 'last', 'id' => $tmp[1]))."'>".IMAGE_post2.''; $lp_date = $gen->convert_date($tmp[0], 'forum'); - $tmp = explode('.', $subInfo['forum_lastpost_user'],2); if($subInfo['user_name']) { - $lp_name = "{$subInfo['user_name']}"; + $lp_name = "{$subInfo['user_name']}"; } else { - $lp_name = $tmp[1]; + $lp_name = $subInfo['forum_lastpost_user_anon']; } - $SUB_LASTPOST = $lp_date."
".$lp_name." ".$lp_thread; + $SUB_LASTPOST = $lp_date.'
'.$lp_name.' '.$lp_thread; } else { - $SUB_LASTPOST = "-"; + $SUB_LASTPOST = '-'; } return (preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_SUB)); } diff --git a/e107_plugins/forum/forum_viewtopic.php b/e107_plugins/forum/forum_viewtopic.php index 27611fb7b..be19573c1 100644 --- a/e107_plugins/forum/forum_viewtopic.php +++ b/e107_plugins/forum/forum_viewtopic.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_viewtopic.php,v $ -| $Revision: 1.15 $ -| $Date: 2008-12-14 03:18:45 $ +| $Revision: 1.16 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -68,7 +68,7 @@ $pm_installed = plugInstalled('pm'); //Only increment thread views if not being viewed by thread starter -if (USER || USER != $threadInfo['thread_user'] || !$thread->noInc) +if (USER && (USERID != $threadInfo['thread_user'] || $threadInfo['thread_total_replies'] > 0) || !$thread->noInc) { $forum->threadIncview($threadId); } @@ -215,7 +215,7 @@ foreach ($postList as $postInfo) $postInfo['thread_start'] = false; $alt = !$alt; - if($postInfo['post_s']) + if($postInfo['post_status']) { $_style = (isset($FORUMDELETEDSTYLE_ALT) && $alt ? $FORUMDELETEDSTYLE_ALT : $FORUMDELETEDSTYLE); } @@ -259,7 +259,8 @@ $forumstring = $forstr . $forthr . $forrep . $forend; require_once (HEADERF); //If last post came after USERLV and not yet marked as read, mark the thread id as read -if ($thread->threadInfo['thread_lastpost'] > USERLV && (strpos($currentUser['user_plugin_forum_viewed'], '.' . $thread->threadId . '.') === false)) +$threadsViewed = explode(',', $currentUser['user_plugin_forum_viewed']); +if ($thread->threadInfo['thread_lastpost'] > USERLV && !in_array($thread->threadId, $threadsViewed)) { $tst = $forum->threadMarkAsRead($thread->threadId); } @@ -319,6 +320,11 @@ function showmodoptions() { $ret .= " 'move', 'id' => $postInfo['post_id']))."'>" . IMAGE_admin_move2 . ""; } + else + { + $ret .= " 'split', 'id' => $postInfo['post_id']))."'>" . IMAGE_admin_split . ''; + + } $ret .= " "; @@ -523,7 +529,7 @@ class e107ForumThread // $pref['forum_postspage'] = ($pref['forum_postspage'] ? $pref['forum_postspage'] : 10); // var_dump($thread); $pages = ceil(($thread->threadInfo['thread_total_replies'] + 1) / $thread->perPage); - echo "pages = $pages
"; +// echo "pages = $pages
"; $thread->page = ($pages - 1); break; diff --git a/e107_plugins/forum/images/dark/admin_split.png b/e107_plugins/forum/images/dark/admin_split.png new file mode 100644 index 000000000..21fdb4dc3 Binary files /dev/null and b/e107_plugins/forum/images/dark/admin_split.png differ diff --git a/e107_plugins/forum/images/lite/admin_split.png b/e107_plugins/forum/images/lite/admin_split.png new file mode 100644 index 000000000..21fdb4dc3 Binary files /dev/null and b/e107_plugins/forum/images/lite/admin_split.png differ diff --git a/e107_plugins/forum/languages/English/lan_forum_admin.php b/e107_plugins/forum/languages/English/lan_forum_admin.php index 32f599232..5b27a53ae 100644 --- a/e107_plugins/forum/languages/English/lan_forum_admin.php +++ b/e107_plugins/forum/languages/English/lan_forum_admin.php @@ -4,8 +4,8 @@ | e107 website system - Language File. | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_forum_admin.php,v $ -| $Revision: 1.5 $ -| $Date: 2008-12-10 15:29:31 $ +| $Revision: 1.6 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -209,4 +209,8 @@ define("FORLAN_183", "(this function is not allowed when selecting 'all forums' define('FORLAN_184', 'Thread Creation permission'); define('FORLAN_185', 'Indicates who can create new threads'); +define('FORLAN_186', 'Threads per page'); +define('FORLAN_187', 'Number of threads displayed per page'); + + ?> \ No newline at end of file diff --git a/e107_plugins/forum/languages/English/lan_forum_viewtopic.php b/e107_plugins/forum/languages/English/lan_forum_viewtopic.php index c5b222575..afbf86cd6 100644 --- a/e107_plugins/forum/languages/English/lan_forum_viewtopic.php +++ b/e107_plugins/forum/languages/English/lan_forum_viewtopic.php @@ -4,8 +4,8 @@ | e107 website system - Language File. | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/languages/English/lan_forum_viewtopic.php,v $ -| $Revision: 1.2 $ -| $Date: 2008-12-13 21:52:19 $ +| $Revision: 1.3 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ @@ -85,6 +85,7 @@ define("FORLAN_101", "Email Thread"); define("FORLAN_102", "Print View"); define('FORLAN_103', '[user deleted]'); define('FORLAN_104', 'Thread not found'); +define('FORLAN_105', 'Moderator: Split'); define('FORLAN_BY', 'by'); define("FORLAN_HIDDEN", "HIDDEN - LOGIN AND REPLY TO REVEAL"); ?> diff --git a/e107_plugins/forum/plugin.xml b/e107_plugins/forum/plugin.xml index 94da94951..3339d511b 100755 --- a/e107_plugins/forum/plugin.xml +++ b/e107_plugins/forum/plugin.xml @@ -1,5 +1,5 @@ - + This plugin is a fully featured Forum system @@ -22,6 +22,7 @@ + diff --git a/e107_plugins/forum/templates/forum_icons_template.php b/e107_plugins/forum/templates/forum_icons_template.php index 314585b98..64d8a1222 100644 --- a/e107_plugins/forum/templates/forum_icons_template.php +++ b/e107_plugins/forum/templates/forum_icons_template.php @@ -11,12 +11,12 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/forum/templates/forum_icons_template.php,v $ -| $Revision: 1.5 $ -| $Date: 2008-12-08 02:33:34 $ +| $Revision: 1.6 $ +| $Date: 2008-12-15 00:29:20 $ | $Author: mcfly_e107 $ +----------------------------------------------------------------------------+ */ - + if (!defined('e107_INIT')) { exit; } @include_once(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_viewforum.php'); @@ -47,6 +47,7 @@ define("IMAGE_edit", "".LAN_400.""); define("IMAGE_admin_edit", "".LAN_406.""); define("IMAGE_admin_move", "".LAN_402.""); +define("IMAGE_admin_split", "".FORLAN_105.""); define("IMAGE_admin_move2", "".LAN_408.""); define("IMAGE_post", ""); define("IMAGE_post2", ""); @@ -55,21 +56,21 @@ define("IMAGE_attachment", ""); define("IMAGE_untrack", "".LAN_391.""); - + // Admin Icons - + define("IMAGE_admin_delete", "src='".img_path('admin_delete.png')."' alt='".LAN_435."' title='".LAN_435."' style='border:0' "); define("IMAGE_admin_unstick", "src='".img_path('admin_unstick.png')."' alt='".LAN_398."' title='".LAN_398."' style='border:0' "); define("IMAGE_admin_stick", "src='".img_path('sticky_small.png')."' alt='".LAN_401."' title='".LAN_401."' style='border:0' "); define("IMAGE_admin_lock", "src='".img_path('admin_lock.png')."' alt='".LAN_399."' title='".LAN_399."' style='border:0' "); define("IMAGE_admin_unlock", "src='".img_path('admin_unlock.png')."' alt='".LAN_400."' title='".LAN_400."' style='border:0' "); - + // Multi Language Images - + define("IMAGE_newthread", "".FORLAN_10.""); define("IMAGE_reply", ""); define("IMAGE_rank_moderator_image", ""); define("IMAGE_rank_main_admin_image", ""); define("IMAGE_rank_admin_image", ""); - + ?> \ No newline at end of file diff --git a/e107_plugins/forum/viewforum.php b/e107_plugins/forum/viewforum.php deleted file mode 100755 index c057c8a26..000000000 --- a/e107_plugins/forum/viewforum.php +++ /dev/null @@ -1,553 +0,0 @@ -url->getUrl('forum', 'forum', array('func' => 'view', 'id'=>$_POST['forumjump']))); - exit; -} - -if (!e_QUERY) -{ - header('Location:'.$e107->url->getUrl('forum', 'forum', array('func' => 'main'))); - exit; -} - -$view = 25; -$threadFrom = (isset($_REQUEST['p']) ? $_REQUEST['p'] * $view : 0); - -/* -else -{ - $tmp = explode('.', e_QUERY); - $forum_id = (int)$tmp[0]; - $thread_from = (isset($tmp[1]) ? (int)$tmp[1] : 0); -} - -if(is_numeric(e_MENU)) -{ - $thread_from = (intval(e_MENU)-1)*$view; -} -*/ - -require_once(e_PLUGIN.'forum/forum_class.php'); -$forum = new e107forum; - -$STARTERTITLE = LAN_54; -$THREADTITLE = LAN_53; -$REPLYTITLE = LAN_55; -$LASTPOSTITLE = LAN_57; -$VIEWTITLE = LAN_56; - -global $forum_info, $FORUM_CRUMB; - -$forumId = (int)$_REQUEST['id']; - -if (!$forum->checkPerm($forumId, 'view')) -{ - header('Location:'.$e107->url->getUrl('forum', 'forum', array('func' => 'main'))); - exit; -} - -$forumInfo = $forum->forum_get($forumId); - -if (!$FORUM_VIEW_START) -{ - if (file_exists(THEME.'forum_viewforum_template.php')) - { - require_once(THEME.'forum_viewforum_template.php'); - } - elseif (file_exists(THEME.'forum_template.php')) - { - require_once(THEME.'forum_template.php'); - } - else - { - require_once(e_PLUGIN.'forum/templates/forum_viewforum_template.php'); - } -} - -$forumInfo['forum_name'] = $e107->tp->toHTML($forumInfo['forum_name'], true, 'no_hook, emotes_off'); -$forumInfo['forum_description'] = $e107->tp->toHTML($forumInfo['forum_description'], true, 'no_hook'); - -$_forum_name = (substr($forumInfo['forum_name'], 0, 1) == '*' ? substr($forumInfo['forum_name'], 1) : $forumInfo['forum_name']); -define('e_PAGETITLE', LAN_01.' / '.$_forum_name); -//define('MODERATOR', $forum_info['forum_moderators'] != '' && check_class($forum_info['forum_moderators'])); -//$modArray = $forum->forum_getmods($forum_info['forum_moderators']); - -$modArray = $forum->forum_getmods($thread->forum_info['forum_moderators']); -define('MODERATOR', (USER && is_array($modArray) && in_array(USERID, array_keys($modArray)))); - -$message = ''; -if (MODERATOR) -{ - if ($_POST) - { - require_once(e_PLUGIN.'forum/forum_mod.php'); - $message = forum_thread_moderate($_POST); - } -} - -if(varset($pref['track_online'])) -{ - $member_users = $sql->db_Count('online', '(*)', "WHERE online_location REGEXP('viewforum.php.id=$forumId\$') AND online_user_id != 0"); - $guest_users = $sql->db_Count('online', '(*)', "WHERE online_location REGEXP('viewforum.php.id=$forumId\$') AND online_user_id = 0"); - $users = $member_users+$guest_users; -} - -require_once(HEADERF); -$text=''; -if ($message) -{ - $ns->tablerender('', $message, array('forum_viewforum', 'msg')); -} - -$threadCount = $forumInfo['forum_threads']; - -if ($threadCount > $view) -{ - $pages = ceil($threadCount/$view); -} -else -{ - $pages = false; -} - -//echo "pages = $pages
"; - -if ($pages) -{ - if(strpos($FORUM_VIEW_START, 'THREADPAGES') !== false || strpos($FORUM_VIEW_END, 'THREADPAGES') !== false) - { - $parms = "{$threadCount},{$view},{$threadFrom},".e_SELF.'?'.$forumId.'.[FROM],off'; - $THREADPAGES = $tp->parseTemplate("{NEXTPREV={$parms}}"); - } -} - -if($forum->checkPerm($forumId, 'post')) -{ - $NEWTHREADBUTTON = " 'nt', 'id' => $forumId))."'>".IMAGE_newthread.''; -} - -if(substr($forumInfo['forum_name'], 0, 1) == '*') -{ - $forum_info['forum_name'] = substr($forum_info['forum_name'], 1); - $container_only = true; -} -else -{ - $container_only = false; -} - -if(substr($forum_info['sub_parent'], 0, 1) == '*') -{ - $forum_info['sub_parent'] = substr($forum_info['sub_parent'], 1); -} - -$forum->set_crumb(); // set $BREADCRUMB (and $BACKLINK) - -$FORUMTITLE = $forumInfo['forum_name']; -$MODERATORS = LAN_404.': '.implode(', ', $modArray); -$BROWSERS = ''; -if(varset($pref['track_online'])) -{ - $BROWSERS = $users.' '.($users == 1 ? LAN_405 : LAN_406).' ('.$member_users.' '.($member_users == 1 ? LAN_407 : LAN_409).", ".$guest_users." ".($guest_users == 1 ? LAN_408 : LAN_410).')'; -} - - -$ICONKEY = " - - - - - - - - - - - - - - - - - - - - - -
".IMAGE_new_small."".LAN_79."".IMAGE_nonew_small."".LAN_80."".IMAGE_sticky_small."".LAN_202."".IMAGE_announce_small."".LAN_396."
".IMAGE_new_popular_small."".LAN_79." ".LAN_395."".IMAGE_nonew_popular_small."".LAN_80." ".LAN_395."".IMAGE_stickyclosed_small."".LAN_203."".IMAGE_closed_small."".LAN_81."
"; - -$SEARCH = " -
-

- - - - -

-
"; - -if($forum->checkPerm($forumId, 'post')) -{ - $PERMS = LAN_204.' - '.LAN_206.' - '.LAN_208; -} -else -{ - $PERMS = LAN_205.' - '.LAN_207.' - '.LAN_209; -} - -$sticky_threads = 0; -$stuck = false; -$reg_threads = 0; -$unstuck = false; - -$threadList = $forum->forumGetThreads($forumId, $threadFrom, $view); -$subList = $forum->forum_getsubs($forum_id); -//print_a($sub_list); -$gen = new convert; - -$SUBFORUMS = ''; -if(is_array($sub_list)) -{ - $newflag_list = $forum->forum_newflag_list(); - $sub_info = ''; - foreach($sub_list as $sub) - { - $sub_info .= parse_sub($sub); - } - $SUBFORUMS = $FORUM_VIEW_SUB_START.$sub_info.$FORUM_VIEW_SUB_END; -} - -if (count($threadList) ) -{ - foreach($threadList as $thread_info) - { - $idArray[] = $thread_info['thread_id']; - } - $inList = '('.implode(',', $idArray).')'; - foreach($threadList as $thread_info) - { - if ($thread_info['thread_s']) - { - $sticky_threads ++; - } - if ($sticky_threads > 0 && !$stuck && $pref['forum_hilightsticky']) - { - if($FORUM_IMPORTANT_ROW) - { - $forum_view_forum .= $FORUM_IMPORTANT_ROW; - } - else - { - $forum_view_forum .= " ".LAN_411.""; - } - $stuck = true; - } - if (!$thread_info['thread_s']) - { - $reg_threads ++; - } - if ($reg_threads == '1' && !$unstuck && $stuck) - { - if($FORUM_NORMAL_ROW) - { - $forum_view_forum .= $FORUM_NORMAL_ROW; - } - else - { - $forum_view_forum .= " ".LAN_412.""; - } - $unstuck = true; - } - $forum_view_forum .= parse_thread($thread_info); - } -} -else -{ - $forum_view_forum .= "".LAN_58.""; -} - -//$sql->db_Select('forum', '*', "forum_parent !=0 AND forum_class != '255' "); -$FORUMJUMP = forumjump(); -$TOPLINK = "".LAN_02.''; - -if($container_only) -{ - $FORUM_VIEW_START = ($FORUM_VIEW_START_CONTAINER ? $FORUM_VIEW_START_CONTAINER : $FORUM_VIEW_START); - $FORUM_VIEW_END = ($FORUM_VIEW_END_CONTAINER ? $FORUM_VIEW_END_CONTAINER : $FORUM_VIEW_END); - $forum_view_forum = ''; -} - -$forum_view_start = preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_START); -$forum_view_end = preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_END); - - -if ($pref['forum_enclose']) -{ - $ns->tablerender($pref['forum_title'], $forum_view_start.$forum_view_subs.$forum_view_forum.$forum_view_end, array('forum_viewforum', 'main1')); -} -else -{ - echo $forum_view_start.$forum_view_forum.$forum_view_end; -} - -echo ""; - -require_once(FOOTERF); - - -function parse_thread($thread_info) -{ - global $forum, $tp, $FORUM_VIEW_FORUM, $FORUM_VIEW_FORUM_STICKY, $FORUM_VIEW_FORUM_ANNOUNCE, $gen, $pref, $forum_id, $menu_pref; - $e107 = e107::getInstance(); - $text = ''; - $VIEWS = $thread_info['thread_views']; - $REPLIES = $thread_info['thread_total_replies']; - - if ($REPLIES) - { - $lastpost_datestamp = $gen->convert_date($thread_info['thread_lastpost'], 'forum'); - if($thread_info['lastpost_username']) - { - $LASTPOST = "".$thread_info['lastpost_username'].""; - } - else - { - if(!$thread_info['thread_lastuser']) - { - $LASTPOST = $tp->toHTML($thread_info['thread_lastuser_anon']); - } - else - { - $LASTPOST = FORLAN_19; - } - } - $LASTPOST .= '
'.$lastpost_datestamp; - } - - $newflag = false; - if (USER) - { - if ($thread_info['thread_lastpost'] > USERLV && !$forum->threadViewed($thread_info['thread_id'])) - { - $newflag = true; - } - } - - $THREADDATE = $gen->convert_date($thread_info['thread_datestamp'], 'forum'); - $ICON = ($newflag ? IMAGE_new : IMAGE_nonew); - if ($REPLIES >= $pref['forum_popular']) - { - $ICON = ($newflag ? IMAGE_new_popular : IMAGE_nonew_popular); - } - - $THREADTYPE = ''; - if ($thread_info['thread_s'] == 1) - { - $ICON = ($thread_info['thread_active'] ? IMAGE_sticky : IMAGE_stickyclosed); - $THREADTYPE = '['.LAN_202.']
'; - } - elseif($thread_info['thread_s'] == 2) - { - $ICON = IMAGE_announce; - $THREADTYPE = '['.LAN_396.']
'; - } - elseif(!$thread_info['thread_active']) - { - $ICON = IMAGE_closed; - } - - $thread_name = strip_tags($tp->toHTML($thread_info['thread_name'], false, 'no_hook, emotes_off')); - if (strtoupper($THREADTYPE) == strtoupper(substr($thread_name, 0, strlen($THREADTYPE)))) - { - $thread_name = substr($thread_name, strlen($THREADTYPE)); - } - if ($pref['forum_tooltip']) - { - $thread_thread = strip_tags($tp->toHTML($thread_info['thread_thread'], true, 'no_hook')); - $tip_length = ($pref['forum_tiplength'] ? $pref['forum_tiplength'] : 400); - if (strlen($thread_thread) > $tip_length) - { - $thread_thread = substr($thread_thread, 0, $tip_length)." ".$menu_pref['newforumposts_postfix']; - } - $thread_thread = str_replace("'", ''', $thread_thread); - $title = "title='".$thread_thread."'"; - } - else - { - $title = ''; - } - $THREADNAME = "{$thread_name}"; - - $pages = ceil(($REPLIES+1)/$pref['forum_postspage']); - if ($pages > 1) - { - if($pages > 6) - { - for($a = 0; $a <= 2; $a++) - { - $PAGES .= $PAGES ? ' ' : ''; - $PAGES .= "".($a+1).""; - } - $PAGES .= ' ... '; - for($a = $pages-3; $a <= $pages-1; $a++) - { - $PAGES .= $PAGES ? " " : ""; - $PAGES .= "".($a+1).""; - } - } - else - { - for($a = 0; $a <= ($pages-1); $a++) - { - $PAGES .= $PAGES ? ' ' : ''; - $PAGES .= "".($a+1).""; - } - } - $PAGES = LAN_316.' [ '.$PAGES.' ]'; - } - else - { - $PAGES = ''; - } - - if (MODERATOR) - { - $thread_id = $thread_info['thread_id']; - $ADMIN_ICONS = " -
- "; - - $ADMIN_ICONS .= " \n"; - - $ADMIN_ICONS .= ($thread_info['thread_s'] == 1) ? " " : - " "; - $ADMIN_ICONS .= ($thread_info['thread_active']) ? " " : - " "; - $ADMIN_ICONS .= "".IMAGE_admin_move.""; - $ADMIN_ICONS .= " -
- "; - } - - $text .= " - ".$THREADDATE.'
'; - $tmp = explode('.', $thread_info['thread_user'], 2); - - if($thread_info['user_name']) - { - $POSTER = "".$thread_info['user_name'].""; - } - else - { - if($thread_info['thread_user_anon']) - { - $POSTER = $e107->tp->toHTML($thread_info['thread_user_anon']); - } - else - { - $POSTER = FORLAN_19; - } - } - - if ($thread_info['thread_s'] == 1 && $FORUM_VIEW_FORUM_STICKY) - { - return(preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_FORUM_STICKY)); - } - - if ($thread_info['thread_s'] == 2 && $FORUM_VIEW_FORUM_ANNOUNCE) - { - return(preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_FORUM_ANNOUNCE)); - } - - if (!$REPLIES) - { - $REPLIES = LAN_317; // 'None' - $LASTPOST = ' - '; - } - - return(preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_FORUM)); -} - -function parse_sub($subInfo) -{ - global $FORUM_VIEW_SUB, $gen, $tp, $newflag_list; - $e107 = e107::getInstance(); - $SUB_FORUMTITLE = "{$subInfo['forum_name']}"; - $SUB_DESCRIPTION = $tp->toHTML($subInfo['forum_description'], false, 'no_hook'); - $SUB_THREADS = $subInfo['forum_threads']; - $SUB_REPLIES = $subInfo['forum_replies']; - if(USER && is_array($newflag_list) && in_array($subInfo['forum_id'], $newflag_list)) - { - $NEWFLAG = "".IMAGE_new.""; - } - else - { - $NEWFLAG = IMAGE_nonew; - } - - if($subInfo['forum_lastpost_info']) - { - $tmp = explode('.', $subInfo['forum_lastpost_info']); - -// $e107->url->getUrl('forum', 'thread', array('func' => 'last', 'id' => $tmp[1])); - - $lp_thread = " 'last', 'id' => $tmp[1]))."'>".IMAGE_post2.''; - $lp_date = $gen->convert_date($tmp[0], 'forum'); - $tmp = explode('.', $subInfo['forum_lastpost_user'],2); - - if($subInfo['user_name']) - { - $lp_name = "{$subInfo['user_name']}"; - } - else - { - $lp_name = $tmp[1]; - } - $SUB_LASTPOST = $lp_date."
".$lp_name." ".$lp_thread; - } - else - { - $SUB_LASTPOST = "-"; - } - return (preg_replace("/\{(.*?)\}/e", '$\1', $FORUM_VIEW_SUB)); -} - -function forumjump() -{ - global $forum; - $jumpList = $forum->forum_get_allowed(); - $text = "

".LAN_403.":     ".LAN_02."

"; - return $text; -} - -?> \ No newline at end of file