|
From: Josh G. <os...@us...> - 2004-12-23 05:37:18
|
Update of /cvsroot/nanuke/nanuke0.x/modules/forum In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27920/modules/forum Modified Files: module.php posting.php viewtopic.php Log Message: - More minor forum module stuff - Initial posting (and it works... YESSSSSSSSS!!!!!) Index: module.php =================================================================== RCS file: /cvsroot/nanuke/nanuke0.x/modules/forum/module.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** module.php 23 Dec 2004 03:09:23 -0000 1.4 --- module.php 23 Dec 2004 05:37:06 -0000 1.5 *************** *** 259,263 **** )); $db->create_table(MODULE_FORUM_POSTS_TABLE, array( ! array('field' => 'post_id', 'type' => 'mediumint(8)', 'null' => false), array('field' => 'topic_id', 'type' => 'mediumint(8)', 'null' => false), array('field' => 'forum_id', 'type' => 'mediumint(5)', 'null' => false), --- 259,263 ---- )); $db->create_table(MODULE_FORUM_POSTS_TABLE, array( ! array('field' => 'post_id', 'type' => 'mediumint(8)', 'null' => false, 'auto_increment' => true), array('field' => 'topic_id', 'type' => 'mediumint(8)', 'null' => false), array('field' => 'forum_id', 'type' => 'mediumint(5)', 'null' => false), Index: posting.php =================================================================== RCS file: /cvsroot/nanuke/nanuke0.x/modules/forum/posting.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** posting.php 23 Dec 2004 03:09:23 -0000 1.1 --- posting.php 23 Dec 2004 05:37:06 -0000 1.2 *************** *** 76,86 **** } ! $sql = 'SELECT t.*, f.* FROM ' . MODULE_FORUM_TOPICS_TABLE . ' t, ' . MODULE_FORUM_FORUMS_TABLE . " f WHERE t.topic_id = $topic_id ! AND (f.forum_id = t.forum_id OR f.forum_id = $forum_id)"; break; ! case 'quote': [...2067 lines suppressed...] ! $url = (!$auth->acl_get('f_moderate', $data['forum_id'])) ? "{$nanuke_root_path}viewtopic.$phpEx$SID&f=" . $data['forum_id'] . '&t=' . $data['topic_id'] : "{$nanuke_root_path}viewforum.$phpEx$SID&f=" . $data['forum_id']; ! } ! else ! { ! $url = (!$auth->acl_get('f_moderate', $data['forum_id'])) ? "{$nanuke_root_path}viewtopic.$phpEx$SID&f={$data['forum_id']}&t={$data['topic_id']}&p={$data['post_id']}#{$data['post_id']}" : "{$nanuke_root_path}viewtopic.$phpEx$SID&f={$data['forum_id']}&t={$data['topic_id']}"; ! } ! meta_refresh(3, $url); ! ! $message = ($auth->acl_get('f_moderate', $data['forum_id'])) ? (($mode == 'edit') ? 'POST_EDITED_MOD' : 'POST_STORED_MOD') : (($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED'); ! $message = $user->lang[$message] . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $url . '">', '</a>') : '') . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="viewforum.' . $phpEx . $SID .'&f=' . $data['forum_id'] . '">', '</a>'); trigger_error($message); } *************** *** 2031,2034 **** // FUNCTIONS // --------- - ?> --- 1866,1868 ---- Index: viewtopic.php =================================================================== RCS file: /cvsroot/nanuke/nanuke0.x/modules/forum/viewtopic.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** viewtopic.php 23 Dec 2004 03:09:23 -0000 1.1 --- viewtopic.php 23 Dec 2004 05:37:06 -0000 1.2 *************** *** 456,460 **** 'FORUM_LOCKED' => ($forum_status == ITEM_LOCKED) ? true : false, ! 'TOPIC_LOCKED' => ($forum_status == ITEM_LOCKED || $topic_status == ITEM_LOCKED) ? false : true, /* 'POST_IMG' => ($forum_status == ITEM_LOCKED) ? $user->img('btn_locked', 'FORUM_LOCKED') : $user->img('btn_post', 'POST_NEW_TOPIC'), 'QUOTE_IMG' => $user->img('btn_quote', 'REPLY_WITH_QUOTE'), --- 456,461 ---- 'FORUM_LOCKED' => ($forum_status == ITEM_LOCKED) ? true : false, ! 'TOPIC_LOCKED' => ($forum_status == ITEM_LOCKED || $topic_status == ITEM_LOCKED) ? true : false, ! /* 'POST_IMG' => ($forum_status == ITEM_LOCKED) ? $user->img('btn_locked', 'FORUM_LOCKED') : $user->img('btn_post', 'POST_NEW_TOPIC'), 'QUOTE_IMG' => $user->img('btn_quote', 'REPLY_WITH_QUOTE'), *************** *** 487,491 **** 'S_SEARCHBOX_ACTION' => "search.$phpEx$SID&f=$forum_id", ! 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_FORUM' => $server_path, 'U_VIEW_UNREAD_POST' => "index.$phpEx$SID&mod=forum&com=viewtopic&f=$forum_id&t=$topic_id&view=unread#unread", --- 488,492 ---- 'S_SEARCHBOX_ACTION' => "search.$phpEx$SID&f=$forum_id", ! 'U_TOPIC' => "{$server_path}index.$phpEx$SID&mod=forum&com=viewtopic&f=$forum_id&t=$topic_id", 'U_FORUM' => $server_path, 'U_VIEW_UNREAD_POST' => "index.$phpEx$SID&mod=forum&com=viewtopic&f=$forum_id&t=$topic_id&view=unread#unread", *************** *** 721,725 **** if (empty($post_list)) { ! // trigger_error($user->lang['NO_TOPIC']); } --- 722,726 ---- if (empty($post_list)) { ! trigger_error($user->lang['NO_TOPIC']); } *************** *** 1054,1058 **** // i) The posters karma is below the minimum of the user ... not in 2.2.x // ii) The poster is on the users ignore list ! // iii) The post was made in a codepage different from the users if (isset($row['foe']) && $row['foe']) { --- 1055,1059 ---- // i) The posters karma is below the minimum of the user ... not in 2.2.x // ii) The poster is on the users ignore list ! // iii) The post was made in an encoding different from the users if (isset($row['foe']) && $row['foe']) { *************** *** 1078,1082 **** 'S_ROW_COUNT' => $i, ! 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '&view=encoding#' . $row['post_id'] . '">', '</a>')) ); --- 1079,1083 ---- 'S_ROW_COUNT' => $i, ! 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="index.' . $phpEx . $SID . '&mod=forum&com=viewtopic&p=' . $row['post_id'] . '&view=encoding#' . $row['post_id'] . '">', '</a>')) ); |