You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:29
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/templates/subSilver/admin Modified Files: pa_admin_settings.tpl Removed Files: pa_admin_file.tpl pa_admin_file_delete.tpl pa_admin_file_edit.tpl Log Message: massive update Index: pa_admin_settings.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin/pa_admin_settings.tpl,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pa_admin_settings.tpl 5 Jul 2006 22:50:22 -0000 1.11 --- pa_admin_settings.tpl 1 Aug 2006 21:03:25 -0000 1.12 *************** *** 74,78 **** </tr> <tr> ! <td class="row1"><span class="genmed">{L_CAT_COL}</span></td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> --- 74,82 ---- </tr> <tr> ! <td class="row1">{L_USE_SIMPLE_NAVIGATION}<br /><span class="gensmall">{L_USE_SIMPLE_NAVIGATION_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="use_simple_navigation" value="1" {S_USE_SIMPLE_NAVIGATION_YES} /> {L_YES} <input type="radio" name="use_simple_navigation" value="0" {S_USE_SIMPLE_NAVIGATION_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_CAT_COL}</td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> --- pa_admin_file_edit.tpl DELETED --- --- pa_admin_file.tpl DELETED --- --- pa_admin_file_delete.tpl DELETED --- |
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/pafiledb/admin Modified Files: admin_catauth_manage.php admin_custom_manage.php admin_settings.php admin_ug_auth_manage.php Removed Files: admin_file_manage.php Log Message: massive update Index: admin_custom_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_custom_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_custom_manage.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_custom_manage.php 1 Aug 2006 21:03:24 -0000 1.3 *************** *** 24,28 **** // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); // --- 24,27 ---- Index: admin_catauth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_catauth_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_catauth_manage.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_catauth_manage.php 1 Aug 2006 21:03:24 -0000 1.3 *************** *** 19,23 **** { global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; // --- 19,24 ---- { global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $global_auth_fields; ! global $cat_auth_approval_fields, $cat_auth_approval_const, $cat_auth_approval_levels; // *************** *** 26,32 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval' ); ! $field_names = array( 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], --- 27,38 ---- include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! $custom_auth_approval = array(); ! $custom_auth = array(); ! $cat_auth_fields = array( 'auth_view', 'auth_read', 'auth_view_file', 'auth_edit_file', 'auth_delete_file', 'auth_upload', 'auth_download', 'auth_rate', 'auth_email', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); ! $cat_auth_approval_fields = array( 'auth_approval', 'auth_approval_edit' ); ! ! $field_names = array( ! 'auth_view' => $lang['View'], 'auth_read' => $lang['Read'], 'auth_view_file' => $lang['View_file'], *************** *** 35,38 **** --- 41,45 ---- 'auth_upload' => $lang['Upload'], 'auth_approval' => $lang['Approval'], + 'auth_approval_edit' => $lang['Approval_edit'], 'auth_download' => $lang['Download_file'], 'auth_rate' => $lang['Rate'], *************** *** 46,49 **** --- 53,59 ---- $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); + $cat_auth_approval_levels = array( 'NONE', 'MOD', 'ADMIN' ); + $cat_auth_approval_const = array( AUTH_ALL, AUTH_MOD, AUTH_ADMIN ); + $cat_parent = ( isset( $_REQUEST['cat_parent'] ) ) ? intval( $_REQUEST['cat_parent'] ) : 0; *************** *** 130,133 **** --- 140,150 ---- } + for( $j = 0; $j < count( $cat_auth_approval_fields ); $j++ ) + { + $cell_title = $field_names[$cat_auth_approval_fields[$j]]; + + $pafiledb_template->assign_block_vars( 'cat_auth_titles', array( 'CELL_TITLE' => $cell_title ) ); + } + if ( empty( $cat_id ) ) { *************** *** 143,146 **** --- 160,166 ---- )); + // + // Standard auth fields + // for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) { *************** *** 157,165 **** } $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; $cat_name = $this->cat_rowset[$cat_id]['cat_name']; } ! $s_column_span = count( $cat_auth_fields ) + 2; $pafiledb_template->assign_vars( array( --- 177,202 ---- } + // + // Standard auth fields + // + for( $j = 0; $j < count( $cat_auth_approval_fields ); $j++ ) + { + $custom_auth_approval[$j] = ' <select name="' . $cat_auth_approval_fields[$j] . '[' . $cat_id . ']' . '">'; + + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $this->cat_rowset[$cat_id][$cat_auth_approval_fields[$j]] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $custom_auth_approval[$j] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Category_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $custom_auth_approval[$j] .= '</select> '; + + $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth_approval[$j] ) ); + } + $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; $cat_name = $this->cat_rowset[$cat_id]['cat_name']; } ! $s_column_span = count( $cat_auth_fields ) + count( $cat_auth_approval_fields ) + 2; $pafiledb_template->assign_vars( array( --- admin_file_manage.php DELETED --- Index: admin_ug_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_ug_auth_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_ug_auth_manage.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_ug_auth_manage.php 1 Aug 2006 21:03:24 -0000 1.3 *************** *** 19,23 **** { global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; // --- 19,24 ---- { global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $global_auth_fields; ! global $optionlist_mod, $optionlist_acl_adv; // *************** *** 541,546 **** $cell_title = $field_names[$cat_auth_fields[$i]]; ! $pafiledb_template->assign_block_vars( 'acltype', array( 'L_UG_ACL_TYPE' => $cell_title ) ! ); $s_column_span++; } --- 542,546 ---- $cell_title = $field_names[$cat_auth_fields[$i]]; ! $pafiledb_template->assign_block_vars( 'acltype', array( 'L_UG_ACL_TYPE' => $cell_title ) ); $s_column_span++; } *************** *** 549,554 **** $s_hidden_fields .= ( $mode == 'user' ) ? '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $user_id . '" />' : '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); - $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_ug_body.tpl' ) ); --- 549,552 ---- *************** *** 775,780 **** $s_hidden_fields .= ( $mode == 'global_user' ) ? '<input type="hidden" name="' . POST_USERS_URL . '" value="' . $user_id . '" />' : '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); - $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_ug_body.tpl' ) ); --- 773,776 ---- *************** *** 820,825 **** // Select a user/group - include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); - $pafiledb_template->set_filenames( array( 'body' => ( $mode == 'user' || $mode == 'global_user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl' ) ); --- 816,819 ---- *************** *** 852,857 **** } ! $pafiledb_template->assign_vars( array( 'S_AUTH_SELECT' => $select_list ) ! ); } --- 846,850 ---- } ! $pafiledb_template->assign_vars( array( 'S_AUTH_SELECT' => $select_list ) ); } Index: admin_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_settings.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_settings.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_settings.php 1 Aug 2006 21:03:24 -0000 1.3 *************** *** 181,184 **** --- 181,187 ---- $cat_col = $new['cat_col']; + $use_simple_navigation_yes = ( $new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + $use_simple_navigation_no = ( !$new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + // // Instructions *************** *** 354,358 **** 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['cat_col'], 'L_NFDAYS' => $lang['Nfdays'], --- 357,366 ---- 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['Cat_col'], ! ! 'S_USE_SIMPLE_NAVIGATION_YES' => $use_simple_navigation_yes, ! 'S_USE_SIMPLE_NAVIGATION_NO' => $use_simple_navigation_no, ! 'L_USE_SIMPLE_NAVIGATION' => $lang['Use_simple_navigation'], ! 'L_USE_SIMPLE_NAVIGATION_EXPLAIN' => $lang['Use_simple_navigation_explain'], 'L_NFDAYS' => $lang['Nfdays'], |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:28
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/pafiledb Modified Files: pafiledb_common.php Log Message: massive update Index: pafiledb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/pafiledb_common.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pafiledb_common.php 8 Jul 2006 10:23:34 -0000 1.17 --- pafiledb_common.php 1 Aug 2006 21:03:25 -0000 1.18 *************** *** 32,35 **** --- 32,36 ---- } } + // =================================================== // to make it work with php version under 4.1 and other stuff *************** *** 61,76 **** // =================================================== ! // Include pafiledb data file // =================================================== - include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); - include_once( $module_root_path . 'pafiledb/includes/functions_cache.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/template.' . $phpEx ); ! $pafiledb_cache = new pafiledb_cache(); $pafiledb_functions = new pafiledb_functions(); --- 62,90 ---- // =================================================== ! // Include Files // =================================================== include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); + + // + // Load addon tools + // + // - Class module_cache + // - Class mx_custom_fields (pafiledb needs its own class version in functions.php) + // - Class mx_notification + // - Class mx_text + // - Class mx_text_formatting + // + include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); + include_once( $module_root_path . 'pafiledb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); ! //include_once( $module_root_path . 'pafiledb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); include_once( $module_root_path . 'pafiledb/includes/template.' . $phpEx ); ! // =================================================== ! // Load classes ! // =================================================== ! $pafiledb_cache = new module_cache($module_root_path . 'pafiledb/'); $pafiledb_functions = new pafiledb_functions(); |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:28
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb Modified Files: db_install.php db_upgrade.php dload_lists.php Log Message: massive update Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** db_upgrade.php 5 Jul 2006 22:50:21 -0000 1.17 --- db_upgrade.php 1 Aug 2006 21:03:24 -0000 1.18 *************** *** 216,221 **** --- 216,225 ---- // Appearance + $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_simple_navigation', '1') "; $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('cat_col', '2') "; + // Auth + $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_cat CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_auth CHANGE auth_approval_groups auth_approval_edit tinyint(2) NOT NULL default '0' "; } else Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** db_install.php 5 Jul 2006 22:50:21 -0000 1.25 --- db_install.php 1 Aug 2006 21:03:24 -0000 1.26 *************** *** 100,104 **** auth_delete_comment tinyint(2) NOT NULL default '0', auth_approval tinyint(2) NOT NULL default '0', ! auth_approval_groups tinyint(2) NOT NULL default '0', PRIMARY KEY (cat_id), --- 100,104 ---- auth_delete_comment tinyint(2) NOT NULL default '0', auth_approval tinyint(2) NOT NULL default '0', ! auth_approval_edit tinyint(2) NOT NULL default '0', PRIMARY KEY (cat_id), *************** *** 260,264 **** auth_delete_comment tinyint(1) DEFAULT '0' NOT NULL, auth_approval tinyint(1) DEFAULT '0' NOT NULL, ! auth_approval_groups tinyint(1) DEFAULT '0' NOT NULL, auth_mod tinyint(1) DEFAULT '1' NOT NULL, auth_search tinyint(1) DEFAULT '1' NOT NULL, --- 260,264 ---- auth_delete_comment tinyint(1) DEFAULT '0' NOT NULL, auth_approval tinyint(1) DEFAULT '0' NOT NULL, ! auth_approval_edit tinyint(1) DEFAULT '0' NOT NULL, auth_mod tinyint(1) DEFAULT '1' NOT NULL, auth_search tinyint(1) DEFAULT '1' NOT NULL, *************** *** 298,301 **** --- 298,302 ---- "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('settings_topnumber', '10')", + "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_simple_navigation', '1')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('cat_col', '2')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('settings_newdays', '1')", Index: dload_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_lists.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dload_lists.php 5 Jul 2006 22:50:21 -0000 1.21 --- dload_lists.php 1 Aug 2006 21:03:24 -0000 1.22 *************** *** 109,113 **** { // $album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW ! if ( $pafiledb->auth[$row['cat_id']]['auth_view'] ) { $catrows[] = $row; --- 109,113 ---- { // $album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW ! if ( $pafiledb->auth_user[$row['cat_id']]['auth_read'] ) { $catrows[] = $row; |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:27
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/admin Modified Files: admin_pafiledb.php Log Message: massive update Index: admin_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pafiledb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_pafiledb.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_pafiledb.php 1 Aug 2006 21:03:24 -0000 1.3 *************** *** 43,47 **** // Left Pane Paths // ! $setmodules_module_path = './../modules/mx_pafiledb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; --- 43,48 ---- // Left Pane Paths // ! $setmodules_root_path = './../'; ! $setmodules_module_path = 'modules/mx_pafiledb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; *************** *** 53,57 **** if ( !empty( $setmodules ) ) { ! include_once( $setmodules_module_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $filename = basename( __FILE__ ); --- 54,58 ---- if ( !empty( $setmodules ) ) { ! include_once( $setmodules_root_path . $setmodules_module_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $filename = basename( __FILE__ ); |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:26
|
Update of /cvsroot/mxbb/mx_linkdb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/templates/subSilver Modified Files: link_add.tpl link_category_body.tpl link_header.tpl link_main_body.tpl subSilver.cfg Added Files: link_comment_posting.tpl link_link_body.tpl link_mcp.tpl Log Message: massive update --- NEW FILE: link_mcp.tpl --- <script language='javascript'> <!-- var addItem = false; var deleteItem = false; function set_add_item(status) { addItem = status; } function set_delete_item(status) { deleteItem = status; } function delete_item(theURL) { if (confirm('Are you sure you want to delete this item??')) { window.location.href=theURL; } else { alert ('No Action has been taken.'); } } function disable_cat_list() { if(document.form.mode_mcp.options[document.form.mode_mcp.selectedIndex].value != 'cat') { document.form.cat_id.selectedIndex = '0'; document.form.cat_id.disabled = true; } if(document.form.mode_mcp.options[document.form.mode_mcp.selectedIndex].value == 'cat') { document.form.cat_id.disabled = false; } } // // Taking from the Attachment MOD of Acyd Burn // function select(status) { for (i = 0; i < document.ids.length; i++) { document.ids.elements[i].checked = status; } } function check() { if(addItem) { return true; } for (i = 0; i < document.ids.length; i++) { if(document.ids.elements[i].checked == true) { if(deleteItem) { if (confirm('Are you sure you want to delete these items??')) { return true; } else { return false; } } return true; } } alert('Please Select at least one item.'); return false; } --> </script> <body onLoad="disable_cat_list();"> <form method="post" action="{S_ACTION}" name="form"> <table width="100%" cellpadding="3" cellspacing="1"> <tr> <td> <br /><b><span class="genmed">{L_MODE}:</span></b> <select name="mode_mcp" onchange="disable_cat_list();">{S_MODE_SELECT}</select> <b><span class="genmed">{L_CATEGORY}:</span></b> {S_CAT_LIST} <input type="submit" class="liteoption" name="go" value="{L_GO}" /> </td> </tr> </table> {S_HIDDEN_FIELDS} </form> <form method="post" action="{S_ACTION}" name="ids" onsubmit="return check();"> <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom"> <span class="nav"><a href="{U_LINKS}" class="nav">{LINKS}</a> » {L_MCP_TITLE}</span> </td> </tr> </table> <!-- BEGIN mcp_mode --> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> <tr> <th colspan="6" class="thHead"> {mcp_mode.L_MODE}</span></th> </tr> <!-- BEGIN row --> <tr> <td class="row1" align="center" width="5%"><span class="genmed">{mcp_mode.row.NUMBER}</span></td> <td class="row1" width="50%"><span class="genmed">{mcp_mode.row.NAME}</span></td> <td class="row1" align="center" width="10%"><span class="gen"><a href="{mcp_mode.row.U_EDIT}">{L_EDIT}</a></span></td> <td class="row1" align="center" width="10%"><span class="gen"><a href="javascript:delete_item('{mcp_mode.row.U_DELETE}')">{L_DELETE}</a></span></td> <td class="row1" align="center" width="20%"><span class="gen"><a href="{mcp_mode.row.U_APPROVE}">{mcp_mode.row.L_APPROVE}</a></span></td> <td class="row1" align="center" width="5%"><span class="genmed"><input type="checkbox" name="ids[]" value="{mcp_mode.row.ID}" /></span></td> </tr> <!-- END row --> <!-- BEGIN no_data --> <tr> <td class="row1" align="center"><span class="gen">{L_NO_ITEMS}</span></td> </tr> <!-- END no_data --> </table> <br /> <!-- END mcp_mode --> <table width="100%" cellspacing="2" border="0" cellpadding="2"> <tr> <td align="right" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> </tr> <tr> <td align="right" nowrap="nowrap"><span class="nav">{PAGE_NUMBER}</span></td> </tr> </table> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <td class="cat" align="center"> {S_HIDDEN_FIELDS} <input type="submit" class="mainoption" name="do_approve" value="{L_APPROVE_ITEM}" onClick="set_add_item(true); set_delete_item(false);" /> <input type="submit" class="mainoption" name="do_unapprove" value="{L_UNAPPROVE_ITEM}" onClick="set_add_item(true); set_delete_item(false);" /> <input type="submit" class="liteoption" name="do_delete" value="{L_DELETE_ITEM}" onClick="set_add_item(false); set_delete_item(true);" /> </td> </tr> </table> </form> Index: link_header.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** link_header.tpl 1 Jul 2006 21:32:19 -0000 1.1 --- link_header.tpl 1 Aug 2006 21:02:20 -0000 1.2 *************** *** 4,8 **** <table width="100%" cellpadding="3" cellspacing="1" class="forumline" style="border-top:none;"> ! <tr> <td align="center" class="row1"> <span class="gen"> <a href="{U_PASEARCH}" class="gen">{L_SEARCH}</a> --- 4,8 ---- <table width="100%" cellpadding="3" cellspacing="1" class="forumline" style="border-top:none;"> ! <tr> <td align="center" class="row1"> <span class="gen"> <a href="{U_PASEARCH}" class="gen">{L_SEARCH}</a> *************** *** 10,25 **** • <a href="{U_UPLOAD}" class="gen"><b>{L_UPLOAD}</b></a> <!-- END ADD_LINK --> ! </span></br> <span class="genmed"> <a href="{U_VIEW_ALL}" class="gensmall">{L_VIEW_ALL}</a> • <a href="{U_DESCEND_BY_HITS}" class="gensmall">{L_STATS_MOST_POPULAR}</a> ! • <a href="{U_DESCEND_BY_JOIN}" class="gensmall">{L_STATS_LATEST}</a> • <a href="{U_DESCEND_BY_RATINGS}" class="gensmall">{L_STATS_TOPRATED}</a> </span> ! </br><hr> ! </td> </tr> </table> ! <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> --- 10,30 ---- • <a href="{U_UPLOAD}" class="gen"><b>{L_UPLOAD}</b></a> <!-- END ADD_LINK --> ! <!-- BEGIN MCP --> ! • <a href="{U_MCP}" class="gen"><b>{L_MCP}</b></a> ! <!-- END MCP --> ! </span><br /> <span class="genmed"> <a href="{U_VIEW_ALL}" class="gensmall">{L_VIEW_ALL}</a> • <a href="{U_DESCEND_BY_HITS}" class="gensmall">{L_STATS_MOST_POPULAR}</a> ! <!-- BEGIN switch_toprated --> • <a href="{U_DESCEND_BY_RATINGS}" class="gensmall">{L_STATS_TOPRATED}</a> + <!-- END switch_toprated --> + • <a href="{U_DESCEND_BY_JOIN}" class="gensmall">{L_STATS_LATEST}</a> </span> ! <br /><hr> ! </td> </tr> </table> ! <table width="100%" height="30" border="0" cellpadding="0" cellspacing="0" align="center"> <tr> Index: subSilver.cfg =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/subSilver.cfg,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** subSilver.cfg 5 Jul 2006 22:49:20 -0000 1.3 --- subSilver.cfg 1 Aug 2006 21:02:20 -0000 1.4 *************** *** 37,41 **** // Redefine phpBB images // ------------------------------------------------------------------------- ! $mx_images['linkdb_folder'] = $images['folder']; ! $mx_images['linkdb_folder_new'] = $images['folder_new']; ?> \ No newline at end of file --- 37,47 ---- // Redefine phpBB images // ------------------------------------------------------------------------- ! $mx_images['linkdb_folder'] = $images['folder']; ! $mx_images['linkdb_folder_new'] = $images['folder_new']; ! $mx_images['linkdb_icon_latest_reply'] = $images['icon_latest_reply']; ! ! $mx_images['linkdb_icon_minipost'] = $images['icon_minipost']; ! $mx_images['linkdb_icon_edit'] = $images['icon_edit']; ! $mx_images['linkdb_icon_delpost'] = $images['icon_delpost']; ! ?> \ No newline at end of file Index: link_add.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_add.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** link_add.tpl 5 Apr 2006 21:25:22 -0000 1.2 --- link_add.tpl 1 Aug 2006 21:02:20 -0000 1.3 *************** *** 1,5 **** <script language="JavaScript" type="text/javascript"> <!-- ! function checkAddForm() { error_msg = ""; --- 1,5 ---- <script language="JavaScript" type="text/javascript"> <!-- ! function checkAddForm() { error_msg = ""; *************** *** 17,21 **** error_msg += "{LINK_GUEST_FIELD}"; } ! if(document.form.name.value == "") { --- 17,21 ---- error_msg += "{LINK_GUEST_FIELD}"; } ! if(document.form.name.value == "") { *************** *** 26,30 **** error_msg += "{LINK_NAME_FIELD}"; } ! if(document.form.download_url.value == "") { --- 26,30 ---- error_msg += "{LINK_NAME_FIELD}"; } ! if(document.form.download_url.value == "") { *************** *** 35,39 **** error_msg += "{LINK_URL_FIELD}"; } ! if(document.form.link_logo_src.value == "") { --- 35,39 ---- error_msg += "{LINK_URL_FIELD}"; } ! if(document.form.link_logo_src.value == "") { *************** *** 47,51 **** } } ! if(document.form.long_desc.value == "") { --- 47,51 ---- } } ! if(document.form.long_desc.value == "") { *************** *** 56,60 **** error_msg += "{LINK_LONG_DES_FIELD}"; } ! if(error_msg != "") { --- 56,60 ---- error_msg += "{LINK_LONG_DES_FIELD}"; } ! if(error_msg != "") { *************** *** 85,89 **** </tr> <!-- BEGIN guestname --> ! <tr> <td class="row1"><span class="genmed">{L_GUESTNAME}</span></td> <td class="row2"><input type="text" class="post" name="post_username" size="25" maxlength="25" /></td> --- 85,89 ---- </tr> <!-- BEGIN guestname --> ! <tr> <td class="row1"><span class="genmed">{L_GUESTNAME}</span></td> <td class="row2"><input type="text" class="post" name="post_username" size="25" maxlength="25" /></td> *************** *** 116,119 **** --- 116,192 ---- </td> </tr> + + <!-- BEGIN custom_data_fields --> + <tr> + <td class="cat" colspan="2" align="center"><span class="cattitle">{custom_data_fields.L_ADDTIONAL_FIELD}</span></td> + </tr> + <!-- END custom_data_fields --> + + <!-- BEGIN input --> + <tr> + <td class="row1"><span class="genmed">{input.FIELD_NAME}</span><br><span class="gensmall">{input.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <input type="text" class="post" size="50" name="field[{input.FIELD_ID}]" value="{input.FIELD_VALUE}" /> + </td> + </tr> + <!-- END input --> + <!-- SPILT --> + <!-- BEGIN textarea --> + <tr> + <td class="row1"><span class="genmed">{textarea.FIELD_NAME}</span><br><span class="gensmall">{textarea.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <textarea rows="6" class="post" name="field[{textarea.FIELD_ID}]" cols="32">{textarea.FIELD_VALUE}</textarea> + </td> + </tr> + <!-- END textarea --> + <!-- SPILT --> + <!-- BEGIN radio --> + <tr> + <td class="row1"><span class="genmed">{radio.FIELD_NAME}</span><br><span class="gensmall">{radio.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <!-- BEGIN row --> + <input type="radio" name="field[{radio.FIELD_ID}]" value="{radio.row.FIELD_VALUE}" {radio.row.FIELD_SELECTED} /><span class="gensmall">{radio.row.FIELD_VALUE}</span> + <!-- END row --> + </td> + </tr> + <!-- END radio --> + <!-- SPILT --> + <!-- BEGIN select --> + <tr> + <td class="row1"><span class="genmed">{select.FIELD_NAME}</span><br><span class="gensmall">{select.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <select name="field[{select.FIELD_ID}]" class="post"> + <!-- BEGIN row --> + <option value="{select.row.FIELD_VALUE}"{radio.row.FIELD_SELECTED}>{select.row.FIELD_VALUE}</option> + <!-- END row --> + </select> + </td> + </tr> + <!-- END select --> + <!-- SPILT --> + <!-- BEGIN select_multiple --> + <tr> + <td class="row1"><span class="genmed">{select_multiple.FIELD_NAME}</span><br><span class="gensmall">{select_multiple.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <select name="field[{select_multiple.FIELD_ID}][]" multiple="multiple" size="4" class="post"> + <!-- BEGIN row --> + <option value="{select_multiple.row.FIELD_VALUE}"{select_multiple.row.FIELD_SELECTED}>{select_multiple.row.FIELD_VALUE}</option> + <!-- END row --> + </select> + </td> + </tr> + <!-- END select_multiple --> + <!-- SPILT --> + <!-- BEGIN checkbox --> + <tr> + <td class="row1"><span class="genmed">{checkbox.FIELD_NAME}</span><br><span class="gensmall">{checkbox.FIELD_DESCRIPTION}</span></td> + <td class="row2"> + <!-- BEGIN row --> + <input type="checkbox" name="field[{checkbox.FIELD_ID}][{checkbox.row.FIELD_VALUE}]" value="{checkbox.row.FIELD_VALUE}" {checkbox.row.FIELD_CHECKED}><span class="gensmall">{checkbox.row.FIELD_VALUE}</span> + <!-- END row --> + </td> + </tr> + <!-- END checkbox --> + <!-- BEGIN ADMIN --> <tr> Index: link_category_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_category_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** link_category_body.tpl 5 Apr 2006 21:25:22 -0000 1.2 --- link_category_body.tpl 1 Aug 2006 21:02:20 -0000 1.3 *************** *** 11,41 **** </table> ! <!-- BEGIN CAT_PARENT --> ! <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> ! <th class="thHead">{L_CATEGORY}</th> </tr> ! <tr><td class="row1"> ! <table border="0" cellpadding="5" cellspacing="1" width="100%"> ! <!-- BEGIN catcol --> ! <tr> ! <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td><a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}"><img src="{CAT_PARENT.catcol.no_cat_parent.CAT_IMAGE}" alt="{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a></td> ! <td width="100%" valign="middle" nowrap="nowrap"><a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}" class="cattitle">{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({CAT_PARENT.catcol.no_cat_parent.FILECAT})</span><br> ! {CAT_PARENT.catcol.no_cat_parent.SUB_CAT} ! </td> ! </tr></table> ! </td> ! <!-- END no_cat_parent --> ! </tr> ! <!-- END catcol --> ! </table> ! </td></tr> </table> <br /> ! <!-- END CAT_PARENT --> <!-- BEGIN FILELIST --> --- 11,85 ---- </table> ! <!-- BEGIN CAT_NAV_STANDARD --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" > ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> ! <th class="thCornerR" width="10%"> {L_LAST_LINK} </th> ! <th class="thCornerR" width="50" nowrap="nowrap"> {L_LINKS} </th> ! </tr> ! <!-- BEGIN catrow --> ! <!-- BEGIN catcol --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{CAT_NAV_STANDARD.catrow.catcol.CAT_IMAGE}" border="0" alt="{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';" ><a href="{CAT_NAV_STANDARD.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_STANDARD.catrow.catcol.CATEGORY}</a><br /><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.LAST_LINK}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_LINKS}</span></td> ! </tr> ! <!-- BEGIN show_subs --> ! <tr> ! <td class="row2" width="6%"> </td> ! <td class="row2" colspan="2"><span class="genmed"><b>{CAT_NAV_STANDARD.catrow.catcol.L_SUB_CAT}:</b> {CAT_NAV_STANDARD.catrow.catcol.SUB_CAT}</span></td> ! <td class="row2" align="center" valign="middle"> </td> ! </tr> ! <!-- END show_subs --> ! <!-- END catcol --> ! <!-- END catrow --> ! ! <!-- BEGIN no_cats --> <tr> ! <td class="row1" align="center" colspan="4" height="50"><span class="genmed">{CAT_NAV_STANDARD.no_cats.COMMENT}</span></td> ! </tr> ! <!-- END no_cats --> ! <tr> ! <td class="cat" colspan="4"> </td> </tr> ! </table> ! <br> ! <!-- END CAT_NAV_STANDARD --> ! ! <!-- BEGIN CAT_NAV_SIMPLE --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thHead" colspan="2">{L_CATEGORY}</th> ! </tr> ! <tr> ! <td class="row1" colspan="2"> ! <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catrow --> ! <tr> ! <!-- BEGIN catcol --> ! <td width="{LINK_WIDTH}%"> ! <table border="0" cellpadding="2" cellspacing="2" width="100%"> ! <tr> ! <td> ! <a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CAT}"><img src="{CAT_NAV_SIMPLE.catrow.catcol.CAT_IMAGE}" alt="{CAT_NAV_SIMPLE.catrow.catcol.CAT_NAME}" align="absmiddle" border="0" /></a> ! </td> ! <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CAT}" class="cattitle">{CAT_NAV_SIMPLE.catrow.catcol.CAT_NAME}</a> <span class="gensmall">({CAT_NAV_SIMPLE.catrow.catcol.FILECAT})</span><br> ! {CAT_NAV_SIMPLE.catrow.catcol.SUB_CAT} ! </td> ! </tr> ! </table> ! </td> ! <!-- END catcol --> ! </tr> ! <!-- END catrow --> ! </table> ! </td> ! </tr> </table> <br /> ! <!-- END CAT_NAV_SIMPLE --> <!-- BEGIN FILELIST --> *************** *** 58,72 **** <td width="100%" class="{FILELIST.file_rows.COLOR}"> <a href="{FILELIST.file_rows.U_FILE}" class="topictitle" target="_blank">{FILELIST.file_rows.FILE_NAME}</a> ! <!-- BEGIN IS_NEW_FILE --> <img src="{FILELIST.file_rows.FILE_NEW_IMAGE}" border="0" alt="{L_NEW_FILE}"> ! <!-- END IS_NEW_FILE --> <br><span class="genmed">{FILELIST.file_rows.FILE_DESC}</span> </td> </tr> <tr> ! <td valign="top" align="left" class="{FILELIST.file_rows.COLOR}"><span class="gensmall">{L_DATE}: {FILELIST.file_rows.DATE}, {L_DOWNLOADS}: {FILELIST.file_rows.FILE_DLS}, {L_SUBMITED_BY} {FILELIST.file_rows.POSTER} ! <!-- BEGIN LINK_VOTE --> ! » {FILELIST.file_rows.L_RATING}: {FILELIST.file_rows.RATING} ({FILELIST.file_rows.FILE_VOTES} {L_VOTES}) ! <!-- END LINK_VOTE --> </span> </td> --- 102,117 ---- <td width="100%" class="{FILELIST.file_rows.COLOR}"> <a href="{FILELIST.file_rows.U_FILE}" class="topictitle" target="_blank">{FILELIST.file_rows.FILE_NAME}</a> ! <a href="{FILELIST.file_rows.U_FILE_MORE}" class="topictitle">[{FILELIST.file_rows.L_FILE_MORE}]</a> ! <!-- BEGIN is_new_file --> <img src="{FILELIST.file_rows.FILE_NEW_IMAGE}" border="0" alt="{L_NEW_FILE}"> ! <!-- END is_new_file --> <br><span class="genmed">{FILELIST.file_rows.FILE_DESC}</span> </td> </tr> <tr> ! <td valign="top" align="left" class="{FILELIST.file_rows.COLOR}"><span class="gensmall">{L_DATE}: {FILELIST.file_rows.DATE} • {L_DOWNLOADS}: {FILELIST.file_rows.FILE_DLS} • {L_SUBMITED_BY} {FILELIST.file_rows.POSTER} ! <!-- BEGIN show_ratings --> ! • {FILELIST.file_rows.L_RATING}: {FILELIST.file_rows.RATING} ({FILELIST.file_rows.FILE_VOTES} {L_VOTES}) {FILELIST.file_rows.DO_RATE} ! <!-- END show_ratings --> </span> </td> *************** *** 76,80 **** <!-- END split_links --> <!-- END file_rows --> ! <!-- BEGIN no_split_links --> </table> --- 121,125 ---- <!-- END split_links --> <!-- END file_rows --> ! <!-- BEGIN no_split_links --> </table> *************** *** 86,90 **** <input type="hidden" name="cat_id" value="{ID}"> <input type="hidden" name="start" value="{START}"> ! <tr> <td align="center" colspan="2" class="cat"><span class="genmed">{L_SELECT_SORT_METHOD}: <select name="sort_method"> --- 131,135 ---- <input type="hidden" name="cat_id" value="{ID}"> <input type="hidden" name="start" value="{START}"> ! <tr> <td align="center" colspan="2" class="cat"><span class="genmed">{L_SELECT_SORT_METHOD}: <select name="sort_method"> *************** *** 102,110 **** </span></td> </tr> ! </form> </table> <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> ! <tr> <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> --- 147,155 ---- </span></td> </tr> ! </form> </table> <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> ! <tr> <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> *************** *** 112,116 **** </table> <!-- END FILELIST --> ! <!-- BEGIN NO_FILE --> <table class="forumline" width="100%" cellspacing="1" cellpadding="3"> --- 157,161 ---- </table> <!-- END FILELIST --> ! <!-- BEGIN NO_FILE --> <table class="forumline" width="100%" cellspacing="1" cellpadding="3"> *************** *** 118,124 **** <th class="thHead">{L_NO_FILES}</th> </tr> ! <tr> <td class="row1" align="center" height="30"><span class="genmed">{L_NO_FILES_CAT}</span></td> </tr> ! </table> <!-- END NO_FILE --> \ No newline at end of file --- 163,169 ---- <th class="thHead">{L_NO_FILES}</th> </tr> ! <tr> <td class="row1" align="center" height="30"><span class="genmed">{L_NO_FILES_CAT}</span></td> </tr> ! </table> <!-- END NO_FILE --> \ No newline at end of file --- NEW FILE: link_link_body.tpl --- <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom" nowrap="nowrap"> <span class="nav"><a href="{U_LINK}" class="nav">{LINKS}</a> <!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> <!-- END navlinks --> </span> </td> </tr> </table> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> <tr> <th class="thCornerL" align="left" colspan="2"> {L_SITENAME} - {LINK_NAME} </th> </tr> <tr> <td class="row2" valign="middle" width="20%"><span class="genmed">{PIN_IMAGE}</span></td> <td class="row1" valign="middle" width="80%"><span class="genmed">{LINK_LONGDESC}</span><br /><br /><a href="{U_JUMP}" target="_blank">{L_JUMP}</a></td> </tr> <tr> <td class="row2" valign="middle" width="20%"><span class="genmed">{L_SUBMITED_BY}:</span></td> <td class="row1" valign="middle" width="80%"><span class="name">{LINK_SUBMITED_BY}</span></td> </tr> <tr> <td class="row2" valign="middle"><span class="genmed">{L_DATE}:</span></td> <td class="row1" valign="middle"><span class="genmed">{TIME}</span></td> </tr> <!-- BEGIN use_ratings --> <tr> <td class="row2" valign="middle"><span class="genmed">{use_ratings.L_RATING}:</span></td> <td class="row1" valign="middle"><span class="genmed">{use_ratings.RATING} ({use_ratings.FILE_VOTES} {use_ratings.L_VOTES})</span> <a href="{use_ratings.U_RATE}">[{use_ratings.L_RATE}]</a></td> </tr> <!-- END use_ratings --> <tr> <td class="row2" valign="middle"><span class="genmed">{L_HITS}:</span></td> <td class="row1" valign="middle"><span class="genmed">{LINK_HITS}</span></td> </tr> <!-- BEGIN custom_field --> <tr> <td class="row2" valign="middle"><span class="genmed">{custom_field.CUSTOM_NAME}:</span></td> <td class="row1" valign="middle"><span class="genmed">{custom_field.DATA}</span></td> </tr> <!-- END custom_field --> <tr> <td class="cat" align="center" colspan="2"> <!-- BEGIN AUTH_EDIT --> <a href="{U_EDIT}"><img src="{EDIT_IMG}" border="0" alt="{L_EDIT}" /></a> <!-- END AUTH_EDIT --> <!-- BEGIN AUTH_DELETE --> <a href="javascript:delete_file('{U_DELETE}')"><img src="{DELETE_IMG}" border="0" alt="{L_DELETE}" /></a> <!-- END AUTH_DELETE --> </td> </tr> </table> <br /> <!-- BEGIN use_comments --> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> <tr> <th class="thCornerL" colspan="2">{use_comments.L_COMMENTS}</th> </tr> <!-- BEGIN no_comments --> <tr> <td colspan="2" class="row1" align="center"><span class="genmed">{use_comments.no_comments.L_NO_COMMENTS}</span></td> </tr> <!-- END no_comments --> <!-- BEGIN text --> <tr> <td width="100" align="left" valign="top" class="row1"><span class="name"> <b>{use_comments.text.POSTER}</b></span><hr /><br /> <span class="postdetails">{use_comments.text.POSTER_RANK}<br /> {use_comments.text.RANK_IMAGE}{use_comments.text.POSTER_AVATAR}</span><br /> </td> <td class="row1" height="28" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="80%" valign="middle"><span class="genmed"><img src="{use_comments.text.ICON_MINIPOST_IMG}" width="12" height="9" border="0" /> <b>{use_comments.text.TITLE}</b> </span><span class="genmed">({use_comments.text.TIME})</span></td> <td align="right"> <!-- BEGIN auth_edit --> <a href="{use_comments.text.auth_edit.U_COMMENT_EDIT}"><img src="{use_comments.text.auth_edit.EDIT_IMG}" alt="{use_comments.text.auth_edit.L_COMMENT_EDIT}" title="{use_comments.text.auth_edit.L_COMMENT_EDIT}" border="0"></a> <!-- END auth_edit --> <!-- BEGIN auth_delete --> <a href="{use_comments.text.auth_delete.U_COMMENT_DELETE}"><img src="{use_comments.text.auth_delete.DELETE_IMG}" alt="{use_comments.text.auth_delete.L_COMMENT_DELETE}" title="{use_comments.text.auth_delete.L_COMMENT_DELETE}" border="0"></a> <!-- END auth_delete --> </td> </tr> <tr> <td colspan="2"><hr /></td> </tr> <tr> <td colspan="2"valign="top"><span class="postbody">{use_comments.text.TEXT}</span></td> </tr> </table> </td> </tr> <tr> <td class="spaceRow" colspan="2" height="1"><img src="{use_comments.text.ICON_SPACER}" alt="" width="1" height="1" /></td> </tr> <!-- END text --> </table> <!-- BEGIN comments_pag --> <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><span class="nav">{use_comments.comments_pag.PAGE_NUMBER}</span></td> <td align="right"><span class="nav">{use_comments.comments_pag.PAGINATION}</span></td> </tr> </table> <!-- END comments_pag --> <!-- BEGIN auth_post --> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> <td><a href="{use_comments.auth_post.U_COMMENT_POST}"><img src="{use_comments.auth_post.REPLY_IMG}" border="0" alt="{use_comments.auth_post.L_COMMENT_ADD}" align="middle" /></a></td> </tr> </table> <br clear="all" /> <!-- END auth_post --> <!-- END use_comments --> Index: link_main_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_main_body.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** link_main_body.tpl 4 Jul 2006 18:00:33 -0000 1.4 --- link_main_body.tpl 1 Aug 2006 21:02:20 -0000 1.5 *************** *** 7,11 **** </table> ! <!-- BEGIN CAT_PARENT --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 7,49 ---- </table> ! <!-- BEGIN CAT_NAV_STANDARD --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" > ! <tr> ! <th class="thCornerL" width="6%"> </th> ! <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> ! <th class="thCornerR" width="10%"> {L_LAST_LINK} </th> ! <th class="thCornerR" width="50" nowrap="nowrap"> {L_LINKS} </th> ! </tr> ! <!-- BEGIN catrow --> ! <!-- BEGIN catcol --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{CAT_NAV_STANDARD.catrow.catcol.CAT_IMAGE}" border="0" alt="{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';" ><a href="{CAT_NAV_STANDARD.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_STANDARD.catrow.catcol.CATEGORY}</a><br /><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.LAST_LINK}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_LINKS}</span></td> ! </tr> ! <!-- BEGIN show_subs --> ! <tr> ! <td class="row2" width="6%"> </td> ! <td class="row2" colspan="2"><span class="genmed"><b>{CAT_NAV_STANDARD.catrow.catcol.L_SUB_CAT}:</b> {CAT_NAV_STANDARD.catrow.catcol.SUB_CAT}</span></td> ! <td class="row2" align="center" valign="middle"> </td> ! </tr> ! <!-- END show_subs --> ! <!-- END catcol --> ! <!-- END catrow --> ! ! <!-- BEGIN no_cats --> ! <tr> ! <td class="row1" align="center" colspan="4" height="50"><span class="genmed">{CAT_NAV_STANDARD.no_cats.COMMENT}</span></td> ! </tr> ! <!-- END no_cats --> ! <tr> ! <td class="cat" colspan="4"> </td> ! </tr> ! </table> ! <br> ! <!-- END CAT_NAV_STANDARD --> ! ! <!-- BEGIN CAT_NAV_SIMPLE --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 15,37 **** <td class="row1" colspan="2"> <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catcol --> <tr> ! <!-- BEGIN no_cat_parent --> <td width="{LINK_WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> <td> ! <a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}"><img src="{CAT_PARENT.catcol.no_cat_parent.CAT_IMAGE}" alt="{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}" align="absmiddle" border="0" /></a> </td> <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{CAT_PARENT.catcol.no_cat_parent.U_CAT}" class="cattitle">{CAT_PARENT.catcol.no_cat_parent.CAT_NAME}</a> <span class="gensmall">({CAT_PARENT.catcol.no_cat_parent.FILECAT})</span><br> ! {CAT_PARENT.catcol.no_cat_parent.SUB_CAT} </td> </tr> </table> </td> ! <!-- END no_cat_parent --> </tr> ! <!-- END catcol --> </table> </td> --- 53,75 ---- <td class="row1" colspan="2"> <table border="0" cellpadding="2" cellspacing="1" width="100%" > ! <!-- BEGIN catrow --> <tr> ! <!-- BEGIN catcol --> <td width="{LINK_WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> <td> ! <a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CAT}"><img src="{CAT_NAV_SIMPLE.catrow.catcol.CAT_IMAGE}" alt="{CAT_NAV_SIMPLE.catrow.catcol.CAT_NAME}" align="absmiddle" border="0" /></a> </td> <td width="100%" valign="middle" nowrap="nowrap"> ! <a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CAT}" class="cattitle">{CAT_NAV_SIMPLE.catrow.catcol.CAT_NAME}</a> <span class="gensmall">({CAT_NAV_SIMPLE.catrow.catcol.FILECAT})</span><br> ! {CAT_NAV_SIMPLE.catrow.catcol.SUB_CAT} </td> </tr> </table> </td> ! <!-- END catcol --> </tr> ! <!-- END catrow --> </table> </td> *************** *** 39,43 **** </table> <br /> ! <!-- END CAT_PARENT --> --- 77,81 ---- </table> <br /> ! <!-- END CAT_NAV_SIMPLE --> --- NEW FILE: link_comment_posting.tpl --- <script language="JavaScript" type="text/javascript"> <!-- // bbCode control by // subBlue design // www.subBlue.com // Startup variables var imageTag = false; var theSelection = false; // Check for Browser & Platform for PC & IE specific bits // More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html var clientPC = navigator.userAgent.toLowerCase(); // Get client info var clientVer = parseInt(navigator.appVersion); // Get browser version var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1)); var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); var is_moz = 0; var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); var is_mac = (clientPC.indexOf("mac")!=-1); // Helpline messages b_help = "{L_BBCODE_B_HELP}"; i_help = "{L_BBCODE_I_HELP}"; u_help = "{L_BBCODE_U_HELP}"; q_help = "{L_BBCODE_Q_HELP}"; c_help = "{L_BBCODE_C_HELP}"; l_help = "{L_BBCODE_L_HELP}"; o_help = "{L_BBCODE_O_HELP}"; p_help = "{L_BBCODE_P_HELP}"; w_help = "{L_BBCODE_W_HELP}"; a_help = "{L_BBCODE_A_HELP}"; s_help = "{L_BBCODE_S_HELP}"; f_help = "{L_BBCODE_F_HELP}"; // Define the bbCode tags bbcode = new Array(); bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]'); imageTag = false; // Shows the help messages in the helpline window function helpline(help) { document.post.helpbox.value = eval(help + "_help"); } // Replacement for arrayname.length property function getarraysize(thearray) { for (i = 0; i < thearray.length; i++) { if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) return i; } return thearray.length; } // Replacement for arrayname.push(value) not implemented in IE until version 5.5 // Appends element to the array function arraypush(thearray,value) { thearray[ getarraysize(thearray) ] = value; } // Replacement for arrayname.pop() not implemented in IE until version 5.5 // Removes and returns the last element of an array function arraypop(thearray) { thearraysize = getarraysize(thearray); retval = thearray[thearraysize - 1]; delete thearray[thearraysize - 1]; return retval; } function checkForm() { formErrors = false; if (document.post.message.value.length < 2) { formErrors = "{L_EMPTY_MESSAGE}"; } if (formErrors) { alert(formErrors); return false; } else { bbstyle(-1); //formObj.preview.disabled = true; //formObj.submit.disabled = true; return true; } } function emoticon(text) { var txtarea = document.post.message; text = ' ' + text + ' '; if (txtarea.createTextRange && txtarea.caretPos) { var caretPos = txtarea.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; txtarea.focus(); } else { txtarea.value += text; txtarea.focus(); } } function bbfontstyle(bbopen, bbclose) { var txtarea = document.post.message; if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { txtarea.value += bbopen + bbclose; txtarea.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; txtarea.focus(); return; } else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) { mozWrap(txtarea, bbopen, bbclose); return; } else { txtarea.value += bbopen + bbclose; txtarea.focus(); } storeCaret(txtarea); } function bbstyle(bbnumber) { var txtarea = document.post.message; txtarea.focus(); donotinsert = false; theSelection = false; bblast = 0; if (bbnumber == -1) { // Close all open tags & default button names while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D txtarea.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; // Get text selection if (theSelection) { // Add tags around selection document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; txtarea.focus(); theSelection = ''; return; } } else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) { mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]); return; } // Find last occurance of an open tag the same as the one just clicked for (i = 0; i < bbcode.length; i++) { if (bbcode[i] == bbnumber+1) { bblast = i; donotinsert = true; } } if (donotinsert) { // Close all open tags up to the one just clicked & default button names while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } txtarea.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another txtarea.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.post.addbbcode14.value = "Img"; // Return button back to normal state imageTag = false; } // Open tag txtarea.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.post.addbbcode'+bbnumber+'.value += "*"'); txtarea.focus(); return; } storeCaret(txtarea); } // From http://www.massless.org/mozedit/ function mozWrap(txtarea, open, close) { var selLength = txtarea.textLength; var selStart = txtarea.selectionStart; var selEnd = txtarea.selectionEnd; if (selEnd == 1 || selEnd == 2) selEnd = selLength; var s1 = (txtarea.value).substring(0,selStart); var s2 = (txtarea.value).substring(selStart, selEnd) var s3 = (txtarea.value).substring(selEnd, selLength); txtarea.value = s1 + open + s2 + close + s3; return; } // Insert at Claret position. Code from // http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 function storeCaret(textEl) { if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); } //--> </script> <script language="javascript"> <!-- var postmaxchars = {MESSAGE_LENGTH}; function checklength(theform) { if (postmaxchars != 0) { message = ""; } else { message = ""; } alert("{L_MSG_LENGTH_1}"+theform.message.value.length+"{L_MSG_LENGTH_2}\n\r\n\r{L_MSG_LENGTH_3}"+postmaxchars+"{L_MSG_LENGTH_4}\n\r\n\r{L_MSG_LENGTH_5}"+(postmaxchars-theform.message.value.length)+"{L_MSG_LENGTH_6}"); } //--> </script> <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> <!-- BEGIN preview --> <br /> <table border="0" cellpadding="4" cellspacing="0" width="100%" class="forumline"> <tr> <th class="thHead" colspan="2" height="25">{L_PREVIEW}</th> </tr> <tr> <td class="row1" valign="top"><span class="postbody">{PRE_COMMENT}</span></td> </tr> </table> <br /> <!-- END preview --> <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom"> <span class="nav"><a href="{U_DOWNLOAD_HOME}" class="nav">{DOWNLOAD}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a><!-- END navlinks --> -> <a href="{U_FILE_NAME}" class="nav">{FILE_NAME}</a> » {L_COMMENT_ADD}</span> </td> </tr> </table> <table border="0" cellpadding="4" cellspacing="1" width="100%" class="forumline"> <tr> <th class="thHead" colspan="2" height="25"><b>{L_COMMENT_ADD}</b></th> </tr> <tr> <td class="row1" ><span class="gen"><b>{L_COMMENT_TITLE}</b></span></td> <td class="row2"><input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{TITLE}" /></span></td> </tr> <tr> <td class="row1" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td><span class="gen"><b>{L_COMMENT}</b></span></td> </tr> <tr> <td valign="middle" align="center"> <br /> <table width="100" border="0" cellspacing="0" cellpadding="5"> <tr align="center"> <td colspan="{S_SMILIES_COLSPAN}" class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_EMOTICONS}</a></td> </tr> <!-- BEGIN smilies_row --> <tr align="center" valign="middle"> <!-- BEGIN smilies_col --> <td><a href="javascript:emoticon('{smilies_row.smilies_col.SMILEY_CODE}')"><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></a></td> <!-- END smilies_col --> </tr> <!-- END smilies_row --> </table> </td> </tr> </table> </td> <td class="row2" valign="top"><span class="gen"> <span class="genmed"> </span> <table width="450" border="0" cellspacing="0" cellpadding="2"> <tr align="center" valign="middle"> <td><span class="genmed"> <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 30px" onClick="bbstyle(0)" onMouseOver="helpline('b')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 30px" onClick="bbstyle(2)" onMouseOver="helpline('i')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px" onClick="bbstyle(4)" onMouseOver="helpline('u')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px" onClick="bbstyle(6)" onMouseOver="helpline('q')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onClick="bbstyle(8)" onMouseOver="helpline('c')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onClick="bbstyle(10)" onMouseOver="helpline('l')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onClick="bbstyle(12)" onMouseOver="helpline('o')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onClick="bbstyle(14)" onMouseOver="helpline('p')" /> </span></td> <td><span class="genmed"> <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /> </span></td> </tr> <tr> <td colspan="9"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><span class="genmed"> {L_FONT_COLOR}: <select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]')" onMouseOver="helpline('s')"> <option style="color:black; background-color: #FFFFFF " value="{T_FONTCOLOR1}" class="genmed">{L_COLOR_DEFAULT}</option> <option style="color:darkred; background-color: #DEE3E7" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option> <option style="color:red; background-color: #DEE3E7" value="red" class="genmed">{L_COLOR_RED}</option> <option style="color:orange; background-color: #DEE3E7" value="orange" class="genmed">{L_COLOR_ORANGE}</option> <option style="color:brown; background-color: #DEE3E7" value="brown" class="genmed">{L_COLOR_BROWN}</option> <option style="color:yellow; background-color: #DEE3E7" value="yellow" class="genmed">{L_COLOR_YELLOW}</option> <option style="color:green; background-color: #DEE3E7" value="green" class="genmed">{L_COLOR_GREEN}</option> <option style="color:olive; background-color: #DEE3E7" value="olive" class="genmed">{L_COLOR_OLIVE}</option> <option style="color:cyan; background-color: #DEE3E7" value="cyan" class="genmed">{L_COLOR_CYAN}</option> <option style="color:blue; background-color: #DEE3E7" value="blue" class="genmed">{L_COLOR_BLUE}</option> <option style="color:darkblue; background-color: #DEE3E7" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option> <option style="color:indigo; background-color: #DEE3E7" value="indigo" class="genmed">{L_COLOR_INDIGO}</option> <option style="color:violet; background-color: #DEE3E7" value="violet" class="genmed">{L_COLOR_VIOLET}</option> <option style="color:white; background-color: #DEE3E7" value="white" class="genmed">{L_COLOR_WHITE}</option> <option style="color:black; background-color: #DEE3E7" value="black" class="genmed">{L_COLOR_BLACK}</option> </select> {L_FONT_SIZE}: <select name="addbbcode20" onChange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onMouseOver="helpline('f')"> <option value="7" class="genmed">{L_FONT_TINY}</option> <option value="9" class="genmed">{L_FONT_SMALL}</option> <option value="12" selected class="genmed">{L_FONT_NORMAL}</option> <option value="18" class="genmed">{L_FONT_LARGE}</option> <option value="24" class="genmed">{L_FONT_HUGE}</option> </select> </span></td> <td nowrap="nowrap" align="right"><span class="gensmall"><a href="javascript:bbstyle(-1)" class="genmed" onMouseOver="helpline('a')">{L_BBCODE_CLOSE_TAGS}</a></span></td> </tr> </table> </td> </tr> <tr> <td colspan="9"> <span class="gensmall"> <input type="text" name="helpbox" size="45" maxlength="100" style="width:450px; font-size:10px" class="helpline" value="{L_STYLES_TIP}" /> </span></td> </tr> <tr> <td colspan="9" class="row2"><span class="gen"> <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{COMMENT}</textarea> </td> </tr> </table> </td> </tr> <tr> <td class="row1"><span class="gen"><B>{L_OPTIONS}</b></span><br /><span class="gensmall">{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}<br />{LINKS_STATUS}<br />{IMAGES_STATUS}</span></td> <td class="row2"><span class="gen">{L_COMMENT_EXPLAIN}<br /><a href="javascript:checklength(document.post);">{L_CHECK_MSG_LENGTH}</a></span></td> </tr> <tr> <td class="cat" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" tabindex="6" name="submit" class="mainoption" value="{L_SUBMIT}" /></td> </form> </tr> </table> |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:24
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/linkdb/admin Modified Files: admin_auth_manage.php admin_cat_manage.php admin_setting.php Added Files: admin_custom_manage.php Removed Files: admin_link_manage.php Log Message: massive update --- NEW FILE: admin_custom_manage.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: admin_custom_manage.php,v 1.1 2006/08/01 21:02:19 jonohlsson Exp $ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) || !defined( 'IN_ADMIN' ) ) { die( "Hacking attempt" ); } class linkdb_custom_manage extends linkdb_admin { function main( $action ) { global $db, $images, $template, $lang, $phpEx, $linkdb_functions, $linkdb_cache, $link_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // // Includes // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); $this_custom_field = new mx_custom_field(LINK_CUSTOM_TABLE, LINK_CUSTOM_DATA_TABLE); $this_custom_field->init(); $mode = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : 'select'; $field_id = ( isset( $_REQUEST['field_id'] ) ) ? intval( $_REQUEST['field_id'] ) : 0; $field_type = ( isset( $_REQUEST['field_type'] ) ) ? intval( $_REQUEST['field_type'] ) : $this_custom_field->field_rowset[$field_id]['field_type']; $field_ids = ( isset( $_REQUEST['field_ids'] ) ) ? $_REQUEST['field_ids'] : ''; $submit = ( isset( $_POST['submit'] ) ) ? true : false; switch ( $mode ) { case 'addfield': $template_file = 'admin/linkdb_field_add.tpl'; break; case 'editfield': $template_file = 'admin/linkdb_field_add.tpl'; break; case 'edit': $template_file = 'admin/linkdb_select_field_edit.tpl'; break; case 'add': $template_file = 'admin/linkdb_select_field_type.tpl'; break; case 'delete': $template_file = 'admin/linkdb_select_field_delete.tpl'; break; case 'select': $template_file = 'admin/linkdb_select.tpl'; break; } if ( $submit ) { if ( $mode == 'do_add' && !$field_id ) { $this_custom_field->update_add_field( $field_type ); $message = $lang['Fieldadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } elseif ( $mode == 'do_add' && $field_id ) { $this_custom_field->update_add_field( $field_type, $field_id ); $message = $lang['Fieldedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } elseif ( $mode == 'do_delete' ) { foreach( $field_ids as $key => $value ) { $this_custom_field->delete_field( $key ); } $message = $lang['Fieldsdel'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( 'admin_linkdb.' . $phpEx . '?action=custom_manage' ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( 'index.' . $phpEx . '?pane=right' ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } $template->set_filenames( array( 'admin' => $template_file ) ); switch ( $mode ) { case 'add': case 'addfield': $l_title = $lang['Afieldtitle']; break; case 'edit': $l_title = $lang['Efieldtitle']; break; case 'editfield': $l_title = $lang['Efieldtitle']; break; case 'delete': $l_title = $lang['Dfieldtitle']; break; case 'select': $l_title = $lang['Mfieldtitle']; break; } if ( $mode == 'add' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="addfield">'; } elseif ( $mode == 'addfield' || $mode == 'editfield') { $s_hidden_fields = '<input type="hidden" name="field_type" value="' . $field_type . '">'; $s_hidden_fields .= '<input type="hidden" name="field_id" value="' . $field_id . '">'; $s_hidden_fields .= '<input type="hidden" name="mode" value="do_add">'; } elseif ( $mode == 'edit' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="editfield">'; } elseif ( $mode == 'delete' ) { $s_hidden_fields = '<input type="hidden" name="mode" value="do_delete">'; } $template->assign_vars( array( 'L_FIELD_TITLE' => $l_title, 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_FIELD_ACTION' => append_sid( "admin_linkdb.$phpEx?action=custom_manage" ) )); if ( $mode == 'addfield' || $mode == 'editfield') { if ( $field_id ) { $data = $this_custom_field->get_field_data( $field_id ); } $template->assign_vars( array( 'L_FIELD_NAME' => $lang['Fieldname'], 'L_FIELD_NAME_INFO' => $lang['Fieldnameinfo'], 'L_FIELD_DESC' => $lang['Fielddesc'], 'L_FIELD_DESC_INFO' => $lang['Fielddescinfo'], 'L_FIELD_DATA' => $lang['Field_data'], 'L_FIELD_DATA_INFO' => $lang['Field_data_info'], 'L_FIELD_REGEX' => $lang['Field_regex'], 'L_FIELD_REGEX_INFO' => sprintf( $lang['Field_regex_info'], '<a href="http://www.php.net/manual/en/function.preg-match.php" target="_blank">', '</a>' ), 'L_FIELD_ORDER' => $lang['Field_order'], //'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, //'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, //'ORDER' => ( $field_id ) ? true : false, 'FIELD_NAME' => $data['custom_name'], 'FIELD_DESC' => $data['custom_description'], 'FIELD_DATA' => $data['data'], 'FIELD_REGEX' => $data['regex'], 'FIELD_ORDER' => $data['field_order'] )); if ( $field_type != INPUT && $field_type != TEXTAREA ) { $template->assign_block_vars( 'data', array() ); } if ( $field_type == INPUT || $field_type == TEXTAREA ) { $template->assign_block_vars( 'regex', array() ); } if ( $field_id ) { $template->assign_block_vars( 'order', array() ); } } elseif ( $mode == 'add' ) { $field_types = array( INPUT => $lang['Field_Input'], TEXTAREA => $lang['Field_Textarea'], RADIO => $lang['Field_Radio'], SELECT => $lang['Field_Select'], SELECT_MULTIPLE => $lang['Field_Select_multiple'], CHECKBOX => $lang['Field_Checkbox'] ); $field_type_list = '<select name="field_type">'; foreach( $field_types as $key => $value ) { $field_type_list .= '<option value="' . $key . '">' . $value . '</option>'; } $field_type_list .= '</select>'; $template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ); } elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) { foreach( $this_custom_field->field_rowset as $field_id => $field_data ) { $template->assign_block_vars( 'field_row', array( 'FIELD_ID' => $field_id, 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_DESC' => $field_data['custom_description'] )); } } $template->pparse( 'admin' ); } } ?> Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_cat_manage.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_cat_manage.php 8 Jul 2006 10:22:38 -0000 1.8 --- admin_cat_manage.php 1 Aug 2006 21:02:19 -0000 1.9 *************** *** 189,199 **** // $this->cat_rowset[$cat_id]['auth_view'] = 0; - $this->cat_rowset[$cat_id]['auth_post'] = 1; - $this->cat_rowset[$cat_id]['auth_rate'] = 1; - $this->cat_rowset[$cat_id]['auth_comment'] = 1; $this->cat_rowset[$cat_id]['auth_edit'] = 1; $this->cat_rowset[$cat_id]['auth_delete'] = 2; ! $this->cat_rowset[$cat_id]['auth_approval'] = 5; ! $this->cat_rowset[$cat_id]['auth_approval_edit'] = 5; } else --- 189,203 ---- // $this->cat_rowset[$cat_id]['auth_view'] = 0; $this->cat_rowset[$cat_id]['auth_edit'] = 1; $this->cat_rowset[$cat_id]['auth_delete'] = 2; ! $this->cat_rowset[$cat_id]['auth_post'] = 1; ! $this->cat_rowset[$cat_id]['auth_approval'] = 0; ! $this->cat_rowset[$cat_id]['auth_approval_edit'] = 0; ! ! $this->cat_rowset[$cat_id]['auth_rate'] = 1; ! $this->cat_rowset[$cat_id]['auth_view_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_post_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_edit_comment'] = 1; ! $this->cat_rowset[$cat_id]['auth_delete_comment'] = 1; } else *************** *** 269,274 **** $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! $global_auth = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); $auth_select = array(); foreach( $global_auth as $auth ) --- 273,285 ---- $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! ! $cat_auth_approval_levels = array( 'NONE', 'MOD', 'ADMIN' ); ! $cat_auth_approval_const = array( AUTH_ALL, AUTH_MOD, AUTH_ADMIN ); ! ! $global_auth = array( 'auth_view', 'auth_edit', 'auth_delete', 'auth_post', 'auth_rate', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); ! $global_approval_auth = array( 'auth_approval', 'auth_approval_edit' ); ! $auth_select = array(); + $auth_select_approval = array(); foreach( $global_auth as $auth ) *************** *** 278,286 **** { $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } $template->assign_vars( array( 'CAT_NAME' => $cat_name, --- 289,308 ---- { $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } + foreach( $global_approval_auth as $auth ) + { + $auth_select_approval[$auth] = ' <select name="' . $auth . '">'; + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $cat_rowset[$auth] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $auth_select_approval[$auth] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $auth_select_approval[$auth] .= '</select> '; + } + $template->assign_vars( array( 'CAT_NAME' => $cat_name, *************** *** 288,291 **** --- 310,315 ---- 'CHECKED_YES' => $checked_yes, 'CHECKED_NO' => $checked_no, + 'L_CAT_ALLOWLINK' => $lang['Allow_link'], + 'L_CAT_ALLOWLINK_INFO' => $lang['Allow_link_info'], // *************** *** 368,373 **** 'L_CAT_PARENT' => $lang['Catparent'], 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], 'L_CAT_ALLOWCOMMENTS' => $lang['Allow_comments'], 'L_CAT_ALLOWCOMMENTS_INFO' => $lang['Allow_comments_info'], --- 392,396 ---- 'L_CAT_PARENT' => $lang['Catparent'], 'L_CAT_PARENT_INFO' => $lang['Catparentinfo'], ! 'L_CAT_ALLOWCOMMENTS' => $lang['Allow_comments'], 'L_CAT_ALLOWCOMMENTS_INFO' => $lang['Allow_comments_info'], *************** *** 390,402 **** 'S_VIEW_LEVEL' => $auth_select['auth_view'], - 'L_UPLOAD_LEVEL' => $lang['Upload_level'], - 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], - - 'L_RATE_LEVEL' => $lang['Rate_level'], - 'S_RATE_LEVEL' => $auth_select['auth_rate'], - - 'L_COMMENT_LEVEL' => $lang['Comment_level'], - 'S_COMMENT_LEVEL' => $auth_select['auth_comment'], - 'L_EDIT_LEVEL' => $lang['Edit_level'], 'S_EDIT_LEVEL' => $auth_select['auth_edit'], --- 413,416 ---- *************** *** 405,413 **** 'S_DELETE_LEVEL' => $auth_select['auth_delete'], 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select['auth_approval_edit'], 'L_DISABLED' => $lang['Disabled'], --- 419,445 ---- 'S_DELETE_LEVEL' => $auth_select['auth_delete'], + 'L_UPLOAD_LEVEL' => $lang['Upload_level'], + 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], + 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select_approval['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select_approval['auth_approval_edit'], ! ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'S_RATE_LEVEL' => $auth_select['auth_rate'], ! ! 'L_VIEW_COMMENT_LEVEL' => $lang['View_Comment_level'], ! 'S_VIEW_COMMENT_LEVEL' => $auth_select['auth_view_comment'], ! ! 'L_POST_COMMENT_LEVEL' => $lang['Post_Comment_level'], ! 'S_POST_COMMENT_LEVEL' => $auth_select['auth_post_comment'], ! ! 'L_EDIT_COMMENT_LEVEL' => $lang['Edit_Comment_level'], ! 'S_EDIT_COMMENT_LEVEL' => $auth_select['auth_edit_comment'], ! ! 'L_DELETE_COMMENT_LEVEL' => $lang['Delete_Comment_level'], ! 'S_DELETE_COMMENT_LEVEL' => $auth_select['auth_delete_comment'], 'L_DISABLED' => $lang['Disabled'], Index: admin_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_auth_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_auth_manage.php 8 Jul 2006 10:22:38 -0000 1.2 --- admin_auth_manage.php 1 Aug 2006 21:02:19 -0000 1.3 *************** *** 30,34 **** if ( !isset( $_POST['submit'] ) ) { ! $s_auth_cat_list = $this->generate_jumpbox( 0, 0, '', true ); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_select_body.tpl' ) ); --- 30,34 ---- if ( !isset( $_POST['submit'] ) ) { ! $s_auth_cat_list = $this->generate_jumpbox( 0, 0, '' ); $template->set_filenames( array( 'body' => 'admin/linkdb_admin_select_body.tpl' ) ); *************** *** 61,71 **** 'L_VIEW' => $lang['View'], - 'L_UPLOAD' => $lang['Upload'], - 'L_RATE' => $lang['Rate'], - 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! // 'L_APPROVAL' => $lang['Approval'], ! // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], --- 61,72 ---- 'L_VIEW' => $lang['View'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_VIEW_COMMENT' => $lang['View_Comment_level'], ! 'L_POST_COMMENT' => $lang['Post_Comment_level'], ! 'L_EDIT_COMMENT' => $lang['Edit_Comment_level'], ! 'L_DELETE_COMMENT' => $lang['Delete_Comment_level'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], *************** *** 93,97 **** // Get info of this cat // ! $sql = "SELECT cat_id, cat_name, auth_view_groups, auth_post_groups, auth_rate_groups, auth_comment_groups, auth_edit_groups, auth_delete_groups, auth_approval_groups, auth_approval_edit_groups, auth_moderator_groups FROM " . LINK_CATEGORIES_TABLE . " WHERE cat_id = '$cat_id'"; --- 94,98 ---- // Get info of this cat // ! $sql = "SELECT * FROM " . LINK_CATEGORIES_TABLE . " WHERE cat_id = '$cat_id'"; *************** *** 104,114 **** $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); - $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); - $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); - $comment_groups = @explode( ',', $thiscat['auth_comment_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! // $approval_groups = @explode( ',', $thiscat['auth_approval_groups'] ); ! // $approval_edit_groups = @explode( ',', $thiscat['auth_approval_edit_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); --- 105,116 ---- $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); ! $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); ! $comment_view_groups = @explode( ',', $thiscat['auth_view_comment_groups'] ); ! $comment_post_groups = @explode( ',', $thiscat['auth_post_comment_groups'] ); ! $comment_edit_groups = @explode( ',', $thiscat['auth_edit_comment_groups'] ); ! $comment_delete_groups = @explode( ',', $thiscat['auth_delete_comment_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); *************** *** 119,131 **** 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' )); } --- 121,135 ---- 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => $thiscat['auth_view'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : ''), ! 'EDIT_CHECKED' => $thiscat['auth_edit'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : ''), ! 'DELETE_CHECKED' => $thiscat['auth_delete'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : ''), ! 'POST_CHECKED' => $thiscat['auth_post'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : ''), ! 'RATE_CHECKED' => $thiscat['auth_rate'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_VIEW_CHECKED' => $thiscat['auth_view_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_view_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_POST_CHECKED' => $thiscat['auth_post_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_post_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_EDIT_CHECKED' => $thiscat['auth_edit_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_edit_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_DELETE_CHECKED' => $thiscat['auth_delete_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_delete_groups ) ) ? 'checked="checked"' : ''), ! ! 'MODERATOR_CHECKED' => (( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '') )); } *************** *** 138,152 **** $view_groups = @implode( ',', $_POST['view'] ); - $post_groups = @implode( ',', $_POST['post'] ); - $rate_groups = @implode( ',', $_POST['rate'] ); - $comment_groups = @implode( ',', $_POST['comment'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! // $approval_groups = @implode( ',', $_POST['approval'] ); ! // $approval_edit_groups = @implode( ',', $_POST['approval_edit'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . LINK_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_comment_groups = '$comment_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- 142,157 ---- $view_groups = @implode( ',', $_POST['view'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! $post_groups = @implode( ',', $_POST['post'] ); ! $rate_groups = @implode( ',', $_POST['rate'] ); ! $comment_view_groups = @implode( ',', $_POST['view_comment'] ); ! $comment_post_groups = @implode( ',', $_POST['post_comment'] ); ! $comment_edit_groups = @implode( ',', $_POST['edit_comment'] ); ! $comment_delete_groups = @implode( ',', $_POST['delete_comment'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . LINK_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_view_comment_groups = '$comment_view_groups', auth_post_comment_groups = '$comment_post_groups', auth_edit_comment_groups = '$comment_edit_groups', auth_delete_comment_groups = '$comment_delete_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE cat_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- admin_link_manage.php DELETED --- Index: admin_setting.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_setting.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** admin_setting.php 8 Jul 2006 10:22:38 -0000 1.11 --- admin_setting.php 1 Aug 2006 21:02:19 -0000 1.12 *************** *** 110,113 **** --- 110,116 ---- $cat_col = $new['cat_col']; + $use_simple_navigation_yes = ( $new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + $use_simple_navigation_no = ( !$new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + // // Instructions *************** *** 229,235 **** 'SITE_URL' => $new['site_url'], - 'L_SETTINGS_LINK_PAGE' => $lang['settings_link_page'], - 'SETTINGS_LINK_PAGE' => $new['settings_link_page'], - 'L_LOCK_SUBMIT_SITE' => $lang['lock_submit_site'], 'LOCK_SUBMIT_SITE_YES' => ( $new['lock_submit_site'] ) ? "checked=\"checked\"" : "", --- 232,235 ---- *************** *** 279,283 **** 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['cat_col'], 'L_NFDAYS' => $lang['Nfdays'], --- 279,288 ---- 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['Cat_col'], ! ! 'S_USE_SIMPLE_NAVIGATION_YES' => $use_simple_navigation_yes, ! 'S_USE_SIMPLE_NAVIGATION_NO' => $use_simple_navigation_no, ! 'L_USE_SIMPLE_NAVIGATION' => $lang['Use_simple_navigation'], ! 'L_USE_SIMPLE_NAVIGATION_EXPLAIN' => $lang['Use_simple_navigation_explain'], 'L_NFDAYS' => $lang['Nfdays'], |
Update of /cvsroot/mxbb/mx_linkdb/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/templates/subSilver/admin Modified Files: linkdb_admin_cat_edit.tpl linkdb_admin_settings.tpl Added Files: linkdb_admin_auth_body.tpl linkdb_admin_select_body.tpl linkdb_field_add.tpl linkdb_select.tpl linkdb_select_field_delete.tpl linkdb_select_field_edit.tpl linkdb_select_field_type.tpl Removed Files: linkdb_admin_link.tpl linkdb_admin_link_edit.tpl Log Message: massive update --- NEW FILE: linkdb_select_field_type.tpl --- <h1>{L_FIELD_TITLE}</h1> <p>{L_FIELD_EXPLAIN}</p> <form action="{S_FIELD_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <th colspan="2" class="thHead">{L_FIELD_TITLE}</th> </tr> <tr> <td class="row1" align="center"> {S_SELECT_FIELD_TYPE} </td> </tr> <tr> <td align="center" class="cat" colspan="2"> {S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{L_FIELD_TITLE}" name="submit"> </td> </tr> </table> </form> --- linkdb_admin_link_edit.tpl DELETED --- --- NEW FILE: linkdb_select_field_edit.tpl --- <h1>{L_FIELD_TITLE}</h1> <p>{L_FIELD_EXPLAIN}</p> <form action="{S_FIELD_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <th colspan="2" class="thHead">{L_FIELD_TITLE}</th> </tr> <!-- BEGIN field_row --> <tr> <td width="3%" class="row1" align="center" valign="middle"><input type="radio" name="field_id" value="{field_row.FIELD_ID}" /></td> <td width="97%" class="row1"><b>{field_row.FIELD_NAME}</b><br /><span class="gensmall">{field_row.FIELD_DESC}</span></td></tr> <!-- END field_row --> <td align="center" class="cat" colspan="2"> {S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{L_FIELD_TITLE}" name="submit"> </td> </tr> </table> </form> --- NEW FILE: linkdb_select_field_delete.tpl --- <h1>{L_FIELD_TITLE}</h1> <p>{L_FIELD_EXPLAIN}</p> <form action="{S_FIELD_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <th colspan="2" class="thHead">{L_FIELD_TITLE}</b></th> </tr> <!-- BEGIN field_row --> <tr> <td width="3%" class="row1" align="center" valign="middle"><input type="checkbox" name="field_ids[{field_row.FIELD_ID}]" value="yes"></td> <td width="97%" class="row1"><b>{field_row.FIELD_NAME}</b><br><span class="gensmall">{field_row.FIELD_DESC}</span></td> </tr> <!-- END field_row --> <tr> <td align="center" class="cat" colspan="2">{S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{L_FIELD_TITLE}" name="submit"></td> </tr> </table> </form> Index: linkdb_admin_settings.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/admin/linkdb_admin_settings.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** linkdb_admin_settings.tpl 3 Jul 2006 20:11:30 -0000 1.4 --- linkdb_admin_settings.tpl 1 Aug 2006 21:02:20 -0000 1.5 *************** *** 30,37 **** </tr> <tr> - <td class="row1"><span class="genmed">{L_SETTINGS_LINK_PAGE}</span></td> - <td class="row2"><input class="post" type="text" maxlength="9" size="5" name="settings_link_page" value="{SETTINGS_LINK_PAGE}" /></td> - </tr> - <tr> <td class="row1"><span class="genmed">{L_DISPLAY_INTERVAL}</span></td> <td class="row2"><input class="post" type="text" maxlength="9" size="5" name="display_interval" value="{INTERVAL}" /></td> --- 30,33 ---- *************** *** 82,86 **** </tr> <tr> ! <td class="row1"><span class="genmed">{L_CAT_COL}</span></td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> --- 78,86 ---- </tr> <tr> ! <td class="row1">{L_USE_SIMPLE_NAVIGATION}<br /><span class="gensmall">{L_USE_SIMPLE_NAVIGATION_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="use_simple_navigation" value="1" {S_USE_SIMPLE_NAVIGATION_YES} /> {L_YES} <input type="radio" name="use_simple_navigation" value="0" {S_USE_SIMPLE_NAVIGATION_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_CAT_COL}</td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> --- NEW FILE: linkdb_field_add.tpl --- <h1>{L_FIELD_TITLE}</h1> <p>{L_FIELD_EXPLAIN}</p> <form action="{S_FIELD_ACTION}" method="post"> <!-- BEGIN error --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <td class="row2" align="center">{ERROR}</td> </tr> </table> <br /> <!-- END error --> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <th colspan="2" class="thHead">{L_FIELD_TITLE}</th> </tr> <tr> <td width="50%" class="row1">{L_FIELD_NAME}<br><span class="gensmall">{L_FIELD_NAME_INFO}</span></td> <td class="row2"><input type="text" class="post" size="50" name="field_name" value="{FIELD_NAME}" /></td> </tr> <tr> <td class="row1">{L_FIELD_DESC}<br><span class="gensmall">{L_FIELD_DESC_INFO}</span></td> <td class="row2"><input type="text" class="post" size="50" name="field_desc" value="{FIELD_DESC}" /></td> </tr> <!-- BEGIN data --> <tr> <td class="row1">{L_FIELD_DATA}<br><span class="gensmall">{L_FIELD_DATA_INFO}</span></td> <td class="row2"><textarea rows="6" name="data" cols="32">{FIELD_DATA}</textarea></td> </tr> <!-- END data --> <!-- BEGIN regex --> <tr> <td class="row1">{L_FIELD_REGEX}<br><span class="gensmall">{L_FIELD_REGEX_INFO}</span></td> <td class="row2"><input type="text" class="post" size="50" name="regex" value="{FIELD_REGEX}" /></td> </tr> <!-- END regex --> <!-- BEGIN order --> <tr> <td width="50%" class="row1">{L_FIELD_ORDER}</td> <td class="row2"><input type="text" class="post" size="6" name="field_order" value="{FIELD_ORDER}" /></td> </tr> <!-- END order --> <tr> <td align="center" class="cat" colspan="2"> {S_HIDDEN_FIELDS}<input class="liteoption" type="submit" value="{L_FIELD_TITLE}" name="submit"> </td> </tr> </table> </form> --- NEW FILE: linkdb_admin_auth_body.tpl --- <h1>{L_LINKDB_AUTH_TITLE}</h1> <p>{L_LINKDB_AUTH_EXPLAIN}</p> <form action="{S_ALBUM_ACTION}" method="post"> <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> <th class="thCornerL" height="25" nowrap="nowrap">{L_GROUPS}</th> <th class="thTop" nowrap="nowrap">{L_VIEW}</th> <th class="thTop" nowrap="nowrap">{L_EDIT}</th> <th class="thTop" nowrap="nowrap">{L_DELETE}</th> <th class="thTop" nowrap="nowrap">{L_UPLOAD}</th> <th class="thTop" nowrap="nowrap">{L_RATE}</th> <th class="thTop" nowrap="nowrap">{L_VIEW_COMMENT}</th> <th class="thTop" nowrap="nowrap">{L_POST_COMMENT}</th> <th class="thTop" nowrap="nowrap">{L_EDIT_COMMENT}</th> <th class="thTop" nowrap="nowrap">{L_DELETE_COMMENT}</th> <th class="thCornerR" nowrap="nowrap">{L_IS_MODERATOR}</th> </tr> <!-- BEGIN grouprow --> <tr> <td class="row1" align="center" height="28"><span class="gen">{grouprow.GROUP_NAME}</span></td> <td class="row2" align="center"> <input name="view[]" type="checkbox" {grouprow.VIEW_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="edit[]" type="checkbox" {grouprow.EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="delete[]" type="checkbox" {grouprow.DELETE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="post[]" type="checkbox" {grouprow.POST_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="rate[]" type="checkbox" {grouprow.RATE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="view_comment[]" type="checkbox" {grouprow.COMMENT_VIEW_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="post_comment[]" type="checkbox" {grouprow.COMMENT_POST_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="edit_comment[]" type="checkbox" {grouprow.COMMENT_EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="delete_comment[]" type="checkbox" {grouprow.COMMENT_DELETE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="moderator[]" type="checkbox" {grouprow.MODERATOR_CHECKED} value="{grouprow.GROUP_ID}" /> </td> </tr> <!-- END grouprow --> <tr> <td class="cat" height="25" align="center" colspan="11"><input type="reset" value="{L_RESET}" class="liteoption" /> <input name="submit" type="submit" value="{L_SUBMIT}" class="mainoption" /></td> </tr> </table> </form> <br /> --- NEW FILE: linkdb_select.tpl --- <h1>{L_FIELD_TITLE}</h1> <p>{L_FIELD_EXPLAIN}</p> <form action="{S_FIELD_ACTION}" method="post"> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <th class="thHead">{L_SELECT_TITLE}</b></th> </tr> <tr> <td align="center" class="row1" > <input class="liteoption" type="submit" value="add" name="mode"> <input class="liteoption" type="submit" value="edit" name="mode"> <input class="liteoption" type="submit" value="delete" name="mode"></td> </tr> <tr> <th class="thHead">{L_FIELD_TITLE}</b></th> </tr> <!-- BEGIN field_row --> <tr> <td width="97%" class="row1" align="center"><b>{field_row.FIELD_NAME}</b><br><span class="gensmall">{field_row.FIELD_DESC}</span></td> </tr> <!-- END field_row --> </table> </form> --- NEW FILE: linkdb_admin_select_body.tpl --- <h1>{L_LINKDB_AUTH_TITLE}</h1> <p>{L_LINKDB_AUTH_EXPLAIN}</p> <form action="{S_LINKDB_ACTION}" method="post"> <table width="50%" align="center" cellpadding="3" cellspacing="1" border="0" class="forumline"> <tr> <th class="thHead" colspan="2" height="28">{L_SELECT_CAT}</th> </tr> <tr> <td class="row1" height="25"><select name="cat_id">{CAT_SELECT_TITLE}</select></td> <td class="row1" width="100%" align="center"><input name="submit" type="submit" value="{L_LOOK_UP_CAT}" class="liteoption" /> </td> </tr> </table> </form> <br /> --- linkdb_admin_link.tpl DELETED --- Index: linkdb_admin_cat_edit.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/admin/linkdb_admin_cat_edit.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** linkdb_admin_cat_edit.tpl 3 Jul 2006 12:23:30 -0000 1.2 --- linkdb_admin_cat_edit.tpl 1 Aug 2006 21:02:20 -0000 1.3 *************** *** 25,30 **** </script> - - <h1>{L_CAT_TITLE}</h1> --- 25,28 ---- *************** *** 121,136 **** </tr> <tr> - <td class="row1" width="50%">{L_UPLOAD_LEVEL}<br><span class="gensmall">{L_UPLOAD_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_UPLOAD_LEVEL}</td> - </tr> - <tr> - <td class="row1" width="50%">{L_RATE_LEVEL}<br><span class="gensmall">{L_RATE_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_RATE_LEVEL}</td> - </tr> - <tr> - <td class="row1" width="50%">{L_COMMENT_LEVEL}<br><span class="gensmall">{L_COMMENT_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_COMMENT_LEVEL}</td> - </tr> - <tr> <td class="row1" width="50%">{L_EDIT_LEVEL}<br><span class="gensmall">{L_EDIT_LEVEL_INFO}</span></td> <td class="row2" width="50%">{S_EDIT_LEVEL}</td> --- 119,122 ---- *************** *** 141,144 **** --- 127,134 ---- </tr> <tr> + <td class="row1" width="50%">{L_UPLOAD_LEVEL}<br><span class="gensmall">{L_UPLOAD_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_UPLOAD_LEVEL}</td> + </tr> + <tr> <td class="row1" width="50%">{L_APPROVAL_LEVEL}<br><span class="gensmall">{L_APPROVAL_LEVEL_INFO}</span></td> <td class="row2" width="50%">{S_APPROVAL_LEVEL}</td> *************** *** 148,151 **** --- 138,161 ---- <td class="row2" width="50%">{S_APPROVAL_EDIT_LEVEL}</td> </tr> + <tr> + <td class="row1" width="50%">{L_RATE_LEVEL}<br><span class="gensmall">{L_RATE_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_RATE_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_VIEW_COMMENT_LEVEL}<br><span class="gensmall">{L_VIEW_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_VIEW_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_POST_COMMENT_LEVEL}<br><span class="gensmall">{L_POST_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_POST_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_EDIT_COMMENT_LEVEL}<br><span class="gensmall">{L_EDIT_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_EDIT_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_DELETE_COMMENT_LEVEL}<br><span class="gensmall">{L_DELETE_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_DELETE_COMMENT_LEVEL}</td> + </tr> <tr> <td align="center" class="cat" colspan="2"> |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:23
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/linkdb/modules Modified Files: link_category.php link_link.php link_main.php link_search.php link_user_upload.php link_viewall.php Added Files: link_jump.php link_mcp.php link_post_comment.php Log Message: massive update --- NEW FILE: link_mcp.php --- <?php /** * * @package mxBB Portal Module - mx_linkdb * @version $Id: link_mcp.php,v 1.1 2006/08/01 21:02:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, linkdb, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Enter description here... * */ class linkdb_mcp extends linkdb_public { /** * Enter description here... * * @param unknown_type $action */ function main( $action ) { global $db, $lang, $userdata, $board_config, $phpEx, $images, $debug; global $mx_root_path, $phpbb_root_path, $module_root_path, $is_block, $phpEx; global $linkdb_functions, $template, $linkdb_config; $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $id = ( isset( $_REQUEST['id'] ) ) ? intval( $_REQUEST['id'] ) : 0; $ids = ( isset( $_POST['ids'] ) ) ? array_map( 'intval', $_POST['ids'] ) : array(); $start = ( isset( $_REQUEST['start'] ) ) ? intval( $_REQUEST['start'] ) : 0; $mode = $mode_notification = ( isset( $_REQUEST['mode_mcp'] ) ) ? htmlspecialchars( $_REQUEST['mode_mcp'] ) : 'all'; $do_mode = ( isset( $_REQUEST['do_mode'] ) ) ? htmlspecialchars( $_REQUEST['do_mode'] ) : ''; $do_mode = ( isset( $_POST['do_approve'] ) ) ? 'do_approve' : $do_mode; $do_mode = ( isset( $_POST['do_unapprove'] ) ) ? 'do_unapprove' : $do_mode; $do_mode = ( isset( $_POST['do_delete'] ) ) ? 'do_delete' : $do_mode; // =================================================== // Auth for mcp // =================================================== if ( !($this->auth_user[$cat_id]['auth_mod']) && $mode == 'cat') { $message = sprintf( $lang['Sorry_auth_mcp'], $this->auth_user[$cat_id]['auth_mod'] ); mx_message_die( GENERAL_MESSAGE, $message ); } // // Determine all categories in which user is moderator // $moderator_cat_ids = ''; if ( isset( $this->cat_rowset ) ) { foreach( $this->cat_rowset as $auth_cat_id => $cat_row ) { if ($this->auth_user[$auth_cat_id]['auth_mod']) { $moderator_cat_ids .= !empty($moderator_cat_ids) ? ',' . $auth_cat_id : $auth_cat_id; } } } if (empty($moderator_cat_ids)) { mx_message_die( GENERAL_MESSAGE, 'Sorry, you have no moderator permissions...' ); } if ( isset( $_REQUEST['sort_method'] ) ) { switch ( $_REQUEST['sort_method'] ) { case 'Alphabetic': $sort_method = 'link_name'; break; case 'Latest': $sort_method = 'link_time'; break; case 'Hits': $sort_method = 'link_hits'; break; case 'Rating': $sort_method = 'rating'; break; default: $sort_method = $linkdb_config['sort_method']; } } else { $sort_method = $linkdb_config['sort_method']; } if ( isset( $_REQUEST['sort_order'] ) ) { switch ( $_REQUEST['sort_order'] ) { case 'ASC': $sort_order = 'ASC'; break; case 'DESC': $sort_order = 'DESC'; break; default: $sort_order = $linkdb_config['sort_order']; } } else { $sort_order = $linkdb_config['sort_order']; } $s_actions = array( 'unapproved' => $lang['Unapproved_items'], 'cat' => $lang['Item_cat'], 'all' => $lang['All_items'] ); switch ( $mode ) { case '': case 'unapproved': case 'cat': case 'all': default: $template_item = 'link_mcp.tpl'; $l_title = $lang['MCP_title']; $l_explain = $lang['MCP_title_explain']; break; } // // Approve/Unapprove // if ( $do_mode == 'do_approve' || $do_mode == 'do_unapprove' ) { if ( is_array( $ids ) && !empty( $ids ) ) { foreach( $ids as $temp_id ) { $this->approve_item( $do_mode, $temp_id ); } // // Notification // $this->update_add_item_notify($ids, $do_mode); } else { $this->approve_item( $do_mode, $id ); // // Notification // $this->update_add_item_notify($id, $do_mode); } $this->_linkdb(); } // // Delete // else if ( $do_mode == 'do_delete' ) { if ( is_array( $ids ) && !empty( $ids ) ) { foreach( $ids as $temp_id ) { $sql = 'SELECT * FROM ' . LINKS_TABLE . " WHERE link_id = $temp_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $item_info = $db->sql_fetchrow( $result ); // // Notification // $this->update_add_item_notify($temp_id, 'delete'); // // Comments // if ($this->comments[$item_info['link_catid']]['activated'] && $linkdb_config['del_topic']) { if ( $this->comments[$item_info['link_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . LINK_COMMENTS_TABLE . " WHERE link_id = '" . $temp_id . "'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); } } else { if ( $item_info['topic_id'] ) { include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); $linkdb_comments = new linkdb_comments(); $linkdb_comments->init( $item_info, 'phpbb'); $linkdb_comments->post('delete_all', $item_info['topic_id']); } } } $this->delete_items( $temp_id ); } } else { $sql = 'SELECT * FROM ' . LINKS_TABLE . " WHERE link_id = $id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } $item_info = $db->sql_fetchrow( $result ); // // Notification // $this->update_add_item_notify($id, 'delete'); // // Comments // if ($this->comments[$item_info['link_catid']]['activated'] && $linkdb_config['del_topic']) { if ( $this->comments[$item_info['link_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . LINKS_COMMENTS_TABLE . " WHERE link_id = '" . $id . "'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); } } else { if ( $item_info['topic_id'] ) { include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); $linkdb_comments = new linkdb_comments(); $linkdb_comments->init( $item_info, 'phpbb'); $linkdb_comments->post('delete_all', $item_info['topic_id']); } } } $this->delete_items( $id ); } $this->_linkdb(); } $template->set_filenames( array( 'admin' => $template_item ) ); if ($mode == 'cat') { //$s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; } $template->assign_vars( array( 'LINKS' => $linkdb_config['module_name'], 'U_LINKS' => append_sid( $this->this_mxurl() ), 'L_MCP_TITLE' => $l_title, 'L_MCP_EXPLAIN' => $l_explain, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ACTION' => append_sid( $this->this_mxurl( "action=mcp" ) ) )); // // Lets start displaying... // if ( in_array( $mode, array( 'unapproved', 'cat', 'all' ) ) ) { // // All items (or all items in cat) // if ( $mode == 'all' || $mode == 'cat' ) { $where_sql = ($mode == 'cat') ? "AND link_catid = '$cat_id'" : ''; $sql = "SELECT link_name, link_approved, link_id FROM " . LINKS_TABLE . " as f1 WHERE link_approved = '1' ".$where_sql." AND link_catid IN (".$moderator_cat_ids.") ORDER BY link_time DESC"; if ( ( !$result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $total_num = $db->sql_numrows( $result ); if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { $all_rowset[] = $row; } } // // Unapproved files only // if ( $mode == 'unapproved' || $mode == 'all' || $mode == 'cat') { $sql = "SELECT link_name, link_approved, link_id FROM " . LINKS_TABLE . " WHERE link_approved = '0' AND link_catid IN (".$moderator_cat_ids.") ORDER BY link_time DESC"; if ($mode == 'unapproved') { if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $total_num = $db->sql_numrows( $result ); } else { if ( ( !$result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } } while ( $row = $db->sql_fetchrow( $result ) ) { $unapproved_rowset[] = $row; } } // // Ensure $total_num nonzero to validate pagination // $total_num = empty($total_num) ? 1 : $total_num; // // Define display sets // if ( $mode == '' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'all' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'unapproved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ) ); } // // Generate Select dropdown navigation // $s_list = ''; foreach( $s_actions as $item_mode => $lang_var ) { $s = ''; if ( $mode == $item_mode ) { $s = ' selected="selected"'; } $s_list .= '<option value="' . $item_mode . '"' . $s . '>' . $lang_var . '</option>'; } $cat_list = '<select name="cat_id">'; if ( !$this->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; } else { $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } $cat_list .= $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), false, true, 'auth_mod' ); $cat_list .= '</select>'; $template->assign_vars( array( 'L_EDIT' => $lang['Elinktitle'], // Module specific 'L_DELETE' => $lang['Dlinktitle'], // Module specific 'L_CATEGORY' => $lang['Category'], 'L_MODE' => $lang['View'], 'L_GO' => $lang['Go'], 'L_DELETE_ITEM' => $lang['Delete_selected'], 'L_APPROVE' => $lang['Approve'], 'L_UNAPPROVE' => $lang['Unapprove'], 'L_APPROVE_ITEM' => $lang['Approve_selected'], 'L_UNAPPROVE_ITEM' => $lang['Unapprove_selected'], 'L_NO_ITEMS' => $lang['No_item'], 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "action=mcp&mode_mcp=$mode&sort_method=$sort_method&sort_order=$sort_order" ) . ($mode == 'cat' ? "&cat_id=$cat_id" : '') ), $total_num, $linkdb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['pagination'] ) + 1 ), ceil( $total_num / $linkdb_config['pagination'] ) ), 'S_CAT_LIST' => $cat_list, 'S_MODE_SELECT' => $s_list ) ); foreach( $global_array as $data ) { $approve = false; $unapprove = false; if ( $data['approval'] == 'both' ) { $approve = $unapprove = true; } elseif ( $data['approval'] == 'approve' ) { $approve = true; } elseif ( $data['approval'] == 'unapprove' ) { $unapprove = true; } $template->assign_block_vars( 'mcp_mode', array( 'L_MODE' => $data['lang_var'], 'DATA' => ( isset( $data['row_set'] ) ) ? true : false, 'APPROVE' => $approve, 'UNAPPROVE' => $unapprove ) ); if ( isset( $data['row_set'] ) ) { $i = ( $mode == 'unapproved' || ( count($global_array) > 1 && $data['approval'] == 'unapprove' ) ) ? $start + 1 : '1'; foreach( $data['row_set'] as $item_data ) { $approve_mode = ( $item_data['link_approved'] ) ? 'do_unapprove' : 'do_approve'; $template->assign_block_vars( 'mcp_mode.row', array( 'NAME' => $item_data['link_name'], 'NUMBER' => $i++, 'ID' => $item_data['link_id'], 'U_EDIT' => append_sid( $this->this_mxurl( "action=user_upload&mode_mcp=edit&link_id={$item_data['link_id']}" ) ), 'U_DELETE' => append_sid( $this->this_mxurl( "action=mcp&mode_mcp=$mode&do_mode=do_delete&id={$item_data['link_id']}" ) ), 'U_APPROVE' => append_sid( $this->this_mxurl( "action=mcp&mode_mcp=$mode&do_mode=$approve_mode&id={$item_data['link_id']}" ) . ($mode == 'cat' ? "&cat_id=$cat_id" : '') ), 'L_APPROVE' => ( $item_data['link_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ) ); } } else { $template->assign_block_vars( 'mcp_mode.no_data', array()); } } } // // Notification // $itemId = !empty($id) ? $id : $ids; $this->update_add_item_notify($itemId, $mode_notification); $template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ); $this->display( $lang['MCP'], $template_item ); $this->_linkdb(); } } ?> Index: link_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_category.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** link_category.php 5 Jul 2006 22:49:20 -0000 1.10 --- link_category.php 1 Aug 2006 21:02:19 -0000 1.11 *************** *** 27,46 **** function main( $action ) { ! global $template, $lang, $phpEx, $linkdb_config, $_REQUEST, $userdata; ! // ! // Get the id ! // ! if ( isset( $_REQUEST['cat_id'] ) ) ! { ! $cat_id = intval( $_REQUEST['cat_id'] ); ! } ! else { mx_message_die( GENERAL_MESSAGE, $lang['Cat_not_exist'] ); } ! $start = ( isset( $_REQUEST['start'] ) ) ? intval( $_REQUEST['start'] ) : 0; ! if ( isset( $_REQUEST['sort_method'] ) ) { --- 27,47 ---- function main( $action ) { ! global $template, $lang, $phpEx, $linkdb_config, $userdata; ! global $mx_root_path, $module_root_path, $is_block, $phpEx, $mx_request_vars; ! // ======================================================= ! // Request vars ! // ======================================================= ! $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); ! $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, ''); ! ! if ( empty( $cat_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Cat_not_exist'] ); } ! // ! // Sorting of items ! // if ( isset( $_REQUEST['sort_method'] ) ) { *************** *** 84,87 **** --- 85,116 ---- } + // ======================================================= + // If user not allowed to view article listing (read) and there is no sub Category + // or the user is not allowed to view these category we gave him a nice message. + // ======================================================= + $show_category = false; + if ( isset( $this->subcat_rowset[$cat_id] ) ) + { + foreach( $this->subcat_rowset[$cat_id] as $sub_cat_id => $sub_cat_row ) + { + if ( $this->auth_user[$sub_cat_id]['auth_view'] ) + { + $show_category = true; + break; + } + } + } + + if ( ( !$this->auth_user[$cat_id]['auth_view'] ) && ( !$show_category ) ) + { + if ( !$userdata['session_logged_in'] ) + { + // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=". $this->this_mxurl("mode=cat&cat=" . $cat_id, true), true)); + } + + $message = $lang['Not_authorized']; + mx_message_die( GENERAL_MESSAGE, $message ); + } + if ( !isset( $this->cat_rowset[$cat_id] ) ) { *************** *** 90,93 **** --- 119,134 ---- // + // Validate Comments Setup + // + if ( $this->comments[$cat_id]['activated'] && !$this->comments[$cat_id]['internal_comments'] && $this->comments[$cat_id]['comments_forum_id'] < 1 ) + { + // + // Commenting is enabled but no category forum id specified + // + $message = $lang['No_cat_comments_forum_id']; + mx_message_die(GENERAL_MESSAGE, $message); + } + + // // assign var for naviagation // *************** *** 95,103 **** $template->assign_vars( array( - 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), - - 'U_INDEX' => append_sid( 'index.' . $phpEx ), 'U_LINK' => append_sid( $this->this_mxurl() ), - 'LINKS' => $lang['Links_Title'] ) ); --- 136,140 ---- *************** *** 114,118 **** } ! $this->display_files( $sort_method, $sort_order, $start, $no_file_message, $cat_id ); $this->display( $lang['Links_Title'], 'link_category_body.tpl' ); --- 151,155 ---- } ! $this->display_items( $sort_method, $sort_order, $start, $no_file_message, $cat_id ); $this->display( $lang['Links_Title'], 'link_category_body.tpl' ); Index: link_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_user_upload.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** link_user_upload.php 5 Jul 2006 22:49:20 -0000 1.9 --- link_user_upload.php 1 Aug 2006 21:02:20 -0000 1.10 *************** *** 27,169 **** function main( $action ) { ! global $_REQUEST, $_POST, $linkdb_config, $phpbb_root_path, $module_root_path, $board_config; ! global $template, $db, $lang, $userdata, $user_ip, $phpEx, $linkdb_functions; // ! // Get Vars // ! $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; ! $edit_link_id = ( isset( $_REQUEST['link_id'] ) ) ? intval( $_REQUEST['link_id'] ) : 0; ! ! include( $module_root_path . 'linkdb/includes/functions_field.' . $phpEx ); ! $custom_field = new custom_field(); ! $custom_field->init(); ! if ( $linkdb_config['lock_submit_site'] && $userdata['user_level'] != ADMIN ) { ! $message = $lang['Lock_submit_site']; ! $message .= '<br /><br />' . sprintf( $lang['Click_return_links'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ); ! ! $template->assign_vars( array( 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid( $this->this_mxurl() ) . '">' ! ) ); ! mx_message_die( GENERAL_MESSAGE, $message ); } // ! // Check allow guset submit site // ! if ( UPDATEUPDATE ) { ! $redirect = $this->this_mxurl( "action=user_upload" ); ! if ( !empty( $cat_id ) ) { ! $redirect .= "&cat_id=" . $cat_id; } ! $s_login_fields = '<input type="hidden" name="redirect" value="' . $redirect . '" />'; ! $template->assign_vars( array( ! 'ALLOW_GUEST' => '1', ! 'LINK_GUEST_REG' => $lang['Link_guest_reg'], ! 'L_ENTER_PASSWORD' => $lang['Enter_password'], ! 'S_LOGIN_FIELDS' => $s_login_fields ! ) ); ! $template->assign_block_vars( 'guestname', array() ); } ! elseif ( !$userdata['session_logged_in'] ) { ! $redirect = $this->this_mxurl( "action=user_upload" ); ! if ( !empty( $cat_id ) ) ! { ! $redirect .= "&cat_id=" . $cat_id; ! } ! redirect( append_sid( "login.$phpEx?redirect=" . $redirect, true ) ); } ! else { ! $template->assign_vars( array( 'ALLOW_GUEST' => '0' ) ); } ! // IF submit then upload the link and update the sql for it ! if ( isset( $_POST['submit'] ) ) { ! if ( !$edit_link_id ) { ! $temp_id = $this->update_add_link(); ! $custom_field->file_update_data( $temp_id ); ! $this->_linkdb(); ! if ( $userdata['user_level'] != ADMIN ) { ! $link_url = ( !empty( $_POST['download_url'] ) ) ? $_POST['download_url'] : ''; ! ! if ( UPDATEUPDATE ) { ! $sql = "SELECT user_email, user_lang ! FROM " . USERS_TABLE . " ! WHERE user_level = " . ADMIN; ! if ( !$admin_result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query users table", "", __LINE__, __FILE__, $sql ); } ! ! include( $phpbb_root_path . 'includes/emailer.' . $phpEx ); ! while ( $to_userdata = $db->sql_fetchrow( $admin_result ) ) { ! if ( $to_userdata['user_email'] ) ! { ! $emailer = new emailer( $board_config['smtp_delivery'] ); ! ! $emailer->from( $board_config['board_email'] ); ! $emailer->replyto( $board_config['board_email'] ); ! // ! // set to linkdb/lauguage ! // ! $phpbb_root_path_tmp = $phpbb_root_path; ! $phpbb_root_path = 'linkdb/'; ! $emailer->use_template( 'link_add', $to_userdata['user_lang'] ); ! $phpbb_root_path = $phpbb_root_path_tmp; ! $emailer->email_address( $to_userdata['user_email'] ); ! $emailer->assign_vars( array( ! 'LINK_URL' => $link_url, ! 'SITENAME' => $board_config['sitename'] ! )); ! $emailer->send(); ! $emailer->reset(); ! } ! } } ! ! if ( !$board_config['privmsg_disable'] && $linkdb_config['pm_notify'] ) { ! pm_to_admin( $this->$link_url ); } - } ! $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=user_upload" ) ) . '">', '</a>' ); } else { ! $temp_id = $this->update_add_link( $edit_link_id ); ! $custom_field->file_update_data( $temp_id ); ! $this->_linkdb(); ! $message = $lang['Linkedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=user_upload" ) ) . '">', '</a>' ); } ! $template->assign_vars( array( ! 'META' => '<meta http-equiv="refresh" content="3;url=' . $this->this_mxurl( "action=category&cat_id=$cat_id" ) . '">' ! ) ); mx_message_die( GENERAL_MESSAGE, $message ); } ! ! if ( !isset( $_POST['submit'] ) ) { ! if ( $edit_link_id == 0 ) { if ( $userdata['user_level'] == ADMIN ) $template->assign_block_vars( 'ADMIN', array() ); --- 27,238 ---- function main( $action ) { ! global $linkdb_config, $phpbb_root_path, $module_root_path, $board_config; ! global $template, $db, $lang, $userdata, $user_ip, $phpEx, $linkdb_functions, $mx_request_vars; // ! // Request vars // ! $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, 0); ! $link_id = $mx_request_vars->request('link_id', MX_TYPE_INT, 0); ! $do = ( isset( $_REQUEST['do'] ) ) ? intval( $_REQUEST['do'] ) : ''; ! // ! // Main Auth ! // ! if ( !empty( $cat_id ) ) { ! if ( !$this->auth_user[$cat_id]['auth_post'] ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); ! } ! } ! else ! { ! $dropmenu = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true, true, 'auth_post' ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true, 'auth_post' ); ! if ( empty( $dropmenu ) ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); ! } } // ! // Load link info...if link_id is set // ! if ( $link_id ) { ! $sql = 'SELECT * ! FROM ' . LINKS_TABLE . " ! WHERE link_id = '".$link_id."'"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query Link data', '', __LINE__, __FILE__, $sql ); } ! ! $link_data = $db->sql_fetchrow( $result ); ! ! $db->sql_freeresult( $result ); } ! ! // ! // Further security. ! // Reset vars if no related data exist. ! // ! if ( $link_id && !$link_data['link_catid'] ) { ! $link_id = 0; } ! ! if ( $cat_id && !$this->cat_rowset[$cat_id]['cat_id'] ) { ! $cat_id = 0; } ! // ! // Instatiate custom fields ! // ! $linkdb_custom_field = new mx_custom_field(LINK_CUSTOM_TABLE, LINK_CUSTOM_DATA_TABLE); ! $linkdb_custom_field->init(); ! // ======================================================= ! // Delete ! // ======================================================= ! if ( $do == 'delete' && $link_id) { ! if ( ( $this->auth_user[$link_data['link_catid']]['auth_delete'] && $link_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$link_data['link_catid']]['auth_mod'] ) { ! // ! // Notification ! // ! $this->update_add_item_notify($link_id, 'delete'); ! // ! // Comments ! // ! if ($this->comments[$link_data['link_catid']]['activated'] && $linkdb_config['del_topic']) { ! if ( $this->comments[$link_data['link_catid']]['internal_comments'] ) { ! $sql = 'DELETE FROM ' . LINK_COMMENTS_TABLE . " ! WHERE link_id = '" . $link_id . "'"; ! ! if ( !( $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); } ! } ! else ! { ! if ( $link_data['topic_id'] ) { ! include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $link_data, 'phpbb'); ! $linkdb_comments->post('delete_all', $link_data['topic_id']); ! } ! } ! } ! $this->delete_items( $link_id ); ! $this->_linkdb(); ! $message = $lang['Linkdeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $link_data['link_catid'] ) ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! } ! else ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_delete'] ); ! } ! } ! // ! // IF submit then upload the link and update the sql for it ! // ! if ( isset( $_POST['submit'] ) && $cat_id ) ! { ! if ( !$link_id ) ! { ! if ( $this->auth_user[$cat_id]['auth_post'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $link_post_mode = 'add'; ! $temp_id = $this->update_add_item(); ! $linkdb_custom_field->file_update_data( $temp_id ); ! if ( $this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=link&link_id=" . $link_id ) ) . '">', '</a>' ); } ! else { ! $message = $lang['Linkadded_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); } ! $this->_linkdb(); ! } ! else ! { ! $message = $lang['Sorry_auth_post']; ! } } else { ! if ( ($this->auth_user[$cat_id]['auth_edit'] && $link_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $link_post_mode = 'edit'; ! ! $temp_id = $this->update_add_item( $link_id ); ! $linkdb_custom_field->file_update_data( $temp_id ); ! ! if ( $this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $message = $lang['Linkedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=link&link_id=" . $link_id ) ) . '">', '</a>' ); ! } ! else ! { ! $message = $lang['Linkedited_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); ! ! } ! ! $this->_linkdb(); ! } ! else ! { ! $message = $lang['Sorry_auth_edit']; ! } } ! // ! // Notification ! // ! $this->update_add_item_notify($link_id, $link_post_mode); ! ! // ! // Auto comment ! // ! if ( $this->comments[$cat_id]['activated'] && $this->comments[$cat_id]['autogenerate_comments'] ) ! { ! // ! // Autogenerate comment (duplicate the notification message) ! // ! $mx_pa_notification = new mx_pa_notification(); ! $mx_pa_notification->init( $link_id ); ! $mx_pa_notification->_compose_auto_note($link_post_mode == 'add' ? MX_NEW_NOTIFICATION : MX_EDITED_NOTIFICATION); ! ! // ! // Generate comment ! // ! $this->update_add_comment('', $link_id, 0, addslashes(trim($mx_pa_notification->subject)), addslashes(trim($mx_pa_notification->message))); ! } mx_message_die( GENERAL_MESSAGE, $message ); } ! else ! // ======================================================= ! // IF not submit then load data MAIN form ! // ======================================================= { ! if ( !$link_id ) { if ( $userdata['user_level'] == ADMIN ) $template->assign_block_vars( 'ADMIN', array() ); *************** *** 192,196 **** $link_url = 'http://'; $link_logo_src = 'http://'; ! $custom_exist = $custom_field->display_edit(); $s_hidden_fields = '<input type="hidden" name="action" value="user_upload">'; --- 261,265 ---- $link_url = 'http://'; $link_logo_src = 'http://'; ! $custom_exist = $linkdb_custom_field->display_edit(); $s_hidden_fields = '<input type="hidden" name="action" value="user_upload">'; *************** *** 198,214 **** else { - $sql = 'SELECT * - FROM ' . LINKS_TABLE . " - WHERE link_id = $edit_link_id"; - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); - } - $link_info = $db->sql_fetchrow( $result ); - // // Auth check // ! if ( $userdata['user_id'] == $link_info['user_id'] || $userdata['user_level'] == ADMIN ) { if ( $userdata['user_level'] == ADMIN ) $template->assign_block_vars( 'ADMIN', array() ); --- 267,274 ---- else { // // Auth check // ! if ( ( $this->auth_user[$link_data['link_catid']]['auth_edit'] && $link_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$link_data['link_catid']]['auth_mod'] ) { if ( $userdata['user_level'] == ADMIN ) $template->assign_block_vars( 'ADMIN', array() ); *************** *** 229,244 **** } ! $link_name = $link_info['link_name']; ! $link_longdesc = $link_info['link_longdesc']; ! $link_cat_list = $this->generate_jumpbox( 0, 0, array( $link_info['link_catid'] => 1 ), true, true ); ! $link_download = $link_info['link_hits']; ! $approved_checked_yes = $link_info['link_approved'] == 1 ? ' checked' : ''; ! $approved_checked_no = $link_info['link_approved'] == 0 ? ' checked' : '';; ! $link_url = $link_info['link_url']; ! $link_logo_src = $link_info['link_logo_src']; ! $custom_exist = $custom_field->display_edit(); $s_hidden_fields = '<input type="hidden" name="action" value="user_upload">'; ! $s_hidden_fields .= '<input type="hidden" name="link_id" value="' . $edit_link_id . '">'; } else --- 289,304 ---- } ! $link_name = $link_data['link_name']; ! $link_longdesc = $link_data['link_longdesc']; ! $link_cat_list = $this->generate_jumpbox( 0, 0, array( $link_data['link_catid'] => 1 ), true, true ); ! $link_download = $link_data['link_hits']; ! $approved_checked_yes = $link_data['link_approved'] == 1 ? ' checked' : ''; ! $approved_checked_no = $link_data['link_approved'] == 0 ? ' checked' : '';; ! $link_url = $link_data['link_url']; ! $link_logo_src = $link_data['link_logo_src']; ! $custom_exist = $linkdb_custom_field->display_edit($link_id); $s_hidden_fields = '<input type="hidden" name="action" value="user_upload">'; ! $s_hidden_fields .= '<input type="hidden" name="link_id" value="' . $link_id . '">'; } else *************** *** 303,414 **** } } - } ! function pm_to_admin( $link_url ) ! { ! global $board_config, $db, $lang, $user_ip; ! ! $html_on = 0; ! $bbcode_on = 0; ! $smilies_on = 0; ! $attach_sig = 0; ! ! $sql = "SELECT user_id, user_allow_pm ! FROM " . USERS_TABLE . " ! WHERE user_level = " . ADMIN; ! if ( !$admin_result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query users table", "", __LINE__, __FILE__, $sql ); ! } ! while ( $to_userdata = $db->sql_fetchrow( $admin_result ) ) ! { ! // ! // Has admin prevented user from sending PM's? ! // ! if ( $to_userdata['user_allow_pm'] ) { ! $bbcode_uid = 0; ! $msg_time = time(); // ! // See if recipient is at their inbox limit // ! $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time ! FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_to_userid = " . $to_userdata['user_id']; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['No_such_user'] ); ! } ! $sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : ''; ! if ( $inbox_info = $db->sql_fetchrow( $result ) ) ! { ! if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " ! AND privmsgs_to_userid = " . $to_userdata['user_id']; ! if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql ); ! } ! $old_privmsgs_id = $db->sql_fetchrow( $result ); ! $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_id = $old_privmsgs_id"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)' . $sql, '', __LINE__, __FILE__, $sql ); ! } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " ! WHERE privmsgs_text_id = $old_privmsgs_id"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql ); } } - } ! $privmsg_subject = $lang['Link_pm_notify_subject']; ! $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) ! VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace( "\'", "''", $privmsg_subject ) . "', " . $to_userdata['user_id'] . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)"; ! if ( !( $result = $db->sql_query( $sql_info, BEGIN_TRANSACTION ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info ); ! } ! $privmsg_sent_id = $db->sql_nextid(); ! $privmsg_message = sprintf( $lang['Link_pm_notify_message'], $link_url ); ! $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) ! VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace( "\'", "''", $privmsg_message ) . "')"; ! if ( !$db->sql_query( $sql, END_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info ); ! } ! // ! // Add to the users new pm counter ! // ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " ! WHERE user_id = " . $to_userdata['user_id']; ! if ( !$status = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql ); } } --- 363,477 ---- } } ! // ! // Old function. Kept for a while...to study...later ;) ! // ! function pm_to_admin( $link_url ) { ! global $board_config, $db, $lang, $user_ip; ! $html_on = 0; ! $bbcode_on = 0; ! $smilies_on = 0; ! $attach_sig = 0; ! ! $sql = "SELECT user_id, user_allow_pm ! FROM " . USERS_TABLE . " ! WHERE user_level = " . ADMIN; ! if ( !$admin_result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Could not query users table", "", __LINE__, __FILE__, $sql ); ! } + while ( $to_userdata = $db->sql_fetchrow( $admin_result ) ) + { // ! // Has admin prevented user from sending PM's? // ! if ( $to_userdata['user_allow_pm'] ) { ! $bbcode_uid = 0; ! $msg_time = time(); ! // ! // See if recipient is at their inbox limit ! // ! $sql = "SELECT COUNT(privmsgs_id) AS inbox_items, MIN(privmsgs_date) AS oldest_post_time ! FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_to_userid = " . $to_userdata['user_id']; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['No_such_user'] ); ! } ! $sql_priority = ( SQL_LAYER == 'mysql' ) ? 'LOW_PRIORITY' : ''; ! ! if ( $inbox_info = $db->sql_fetchrow( $result ) ) { ! if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " ! WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) ! AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " ! AND privmsgs_to_userid = " . $to_userdata['user_id']; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql ); ! } ! $old_privmsgs_id = $db->sql_fetchrow( $result ); ! $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_id = $old_privmsgs_id"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)' . $sql, '', __LINE__, __FILE__, $sql ); ! } ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " ! WHERE privmsgs_text_id = $old_privmsgs_id"; ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql ); ! } } } ! $privmsg_subject = $lang['Link_pm_notify_subject']; ! $sql_info = "INSERT INTO " . PRIVMSGS_TABLE . " (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) ! VALUES (" . PRIVMSGS_NEW_MAIL . ", '" . str_replace( "\'", "''", $privmsg_subject ) . "', " . $to_userdata['user_id'] . ", " . $to_userdata['user_id'] . ", $msg_time, '$user_ip', $html_on, $bbcode_on, $smilies_on, $attach_sig)"; ! if ( !( $result = $db->sql_query( $sql_info, BEGIN_TRANSACTION ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent info.", "", __LINE__, __FILE__, $sql_info ); ! } ! $privmsg_sent_id = $db->sql_nextid(); ! $privmsg_message = sprintf( $lang['Link_pm_notify_message'], $link_url ); ! $sql = "INSERT INTO " . PRIVMSGS_TEXT_TABLE . " (privmsgs_text_id, privmsgs_bbcode_uid, privmsgs_text) ! VALUES ($privmsg_sent_id, '" . $bbcode_uid . "', '" . str_replace( "\'", "''", $privmsg_message ) . "')"; ! if ( !$db->sql_query( $sql, END_TRANSACTION ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not insert/update private message sent text.", "", __LINE__, __FILE__, $sql_info ); ! } ! // ! // Add to the users new pm counter ! // ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg + 1, user_last_privmsg = " . time() . " ! WHERE user_id = " . $to_userdata['user_id']; ! if ( !$status = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update private message new/read status for user', '', __LINE__, __FILE__, $sql ); ! } } } --- NEW FILE: link_jump.php --- <?php /** * * @package mxBB Portal Module - mx_linkdb * @version $Id: link_jump.php,v 1.1 2006/08/01 21:02:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [CRLin, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } /** * Enter description here... * */ class linkdb_jump extends linkdb_public { /** * Enter description here... * * @param unknown_type $action */ function main( $action ) { global $template, $lang, $board_config, $phpEx, $link_config, $db, $images, $user_ip; global $phpbb_root_path, $userdata, $db, $linkdb_functions; global $mx_root_path, $module_root_path, $is_block, $phpEx, $mx_request_vars; // ======================================================= // Request vars // ======================================================= $link_id = $mx_request_vars->request('link_id', MX_TYPE_INT, ''); if ( empty( $link_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } // // Main query // switch ( SQL_LAYER ) { case 'oracle': $sql = "SELECT f1.*, f1.link_id, f1.post_username, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username FROM " . LINKS_TABLE . " AS f1, " . LINK_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . LINK_CATEGORIES_TABLE . " AS cat WHERE f1.link_id = r.votes_link(+) AND f1.user_id = u.user_id(+) AND f1.link_id = $link_id AND f1.link_approved = 1 AND f1.link_catid = cat.cat_id GROUP BY f1.link_id"; break; default: $sql = "SELECT f1.*, f1.link_id, f1.post_username, IF(COUNT(r.rate_point)>0,AVG(r.rate_point),0) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username FROM " . LINKS_TABLE . " AS f1 LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f1.link_id = r.votes_link LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id LEFT JOIN " . LINK_CATEGORIES_TABLE . " AS cat ON f1.link_catid = cat.cat_id WHERE f1.link_id = $link_id AND f1.link_approved = 1 GROUP BY f1.link_id"; break; } if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Query file info', '', __LINE__, __FILE__, $sql ); } // // Id doesn't match with any link in the database another nice error message // if ( !$link_data = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } $db->sql_freeresult( $result ); // =================================================== // Linkdb auth for viewing link // =================================================== if ( ( !$this->auth_user[$link_data['link_catid']]['auth_view'] ) ) { /* if ( !$userdata['session_logged_in'] ) { mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=file&file_id=" . $link_id), true)); } */ $message = sprintf( $lang['Sorry_auth_view'], $this->auth_user[$link_data['link_catid']]['auth_view_link_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } $link_url = $link_data['link_url']; // // Update counter // $link_hits = intval( $link_data['link_hits'] ) + 1; $sql = 'UPDATE ' . LINKS_TABLE . " SET link_hits = $link_hits, last_user_ip = '$user_ip' WHERE link_id = $link_id"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt Update Files table', '', __LINE__, __FILE__, $sql ); } // header("Location: $link_url"); echo '<script>location.replace("' . $link_url . '")</script>'; exit(); } } ?> Index: link_link.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_link.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** link_link.php 4 Jul 2006 18:09:40 -0000 1.7 --- link_link.php 1 Aug 2006 21:02:19 -0000 1.8 *************** *** 27,49 **** function main( $action ) { ! global $_REQUEST, $lang, $db, $user_ip; ! if ( isset( $_REQUEST['link_id'] ) ) ! { ! $link_id = intval( $_REQUEST['link_id'] ); ! } ! else { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } ! $sql = 'SELECT * ! FROM ' . LINKS_TABLE . " ! WHERE link_id = $link_id ! AND link_approved = 1"; if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt select linkdb', '', __LINE__, __FILE__, $sql ); } --- 27,77 ---- function main( $action ) { ! global $template, $lang, $board_config, $phpEx, $link_config, $db, $images, $user_ip; ! global $phpbb_root_path, $userdata, $db, $linkdb_functions; ! global $mx_root_path, $module_root_path, $is_block, $phpEx, $mx_request_vars; ! // ======================================================= ! // Request vars ! // ======================================================= ! $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); ! $link_id = $mx_request_vars->request('link_id', MX_TYPE_INT, ''); ! $page_num = $mx_request_vars->request('page_num', MX_TYPE_INT, 1) - 1; ! ! if ( empty( $link_id ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } ! // ! // Main query ! // ! switch ( SQL_LAYER ) ! { ! case 'oracle': ! $sql = "SELECT f1.*, f1.link_id, f1.post_username, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username ! FROM " . LINKS_TABLE . " AS f1, " . LINK_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . LINK_CATEGORIES_TABLE . " AS cat ! WHERE f1.link_id = r.votes_link(+) ! AND f1.user_id = u.user_id(+) ! AND f1.link_id = $link_id ! AND f1.link_approved = 1 ! AND f1.link_catid = cat.cat_id ! GROUP BY f1.link_id"; ! break; ! ! default: ! $sql = "SELECT f1.*, f1.link_id, f1.post_username, IF(COUNT(r.rate_point)>0,AVG(r.rate_point),0) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username ! FROM " . LINKS_TABLE . " AS f1 ! LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f1.link_id = r.votes_link ! LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id ! LEFT JOIN " . LINK_CATEGORIES_TABLE . " AS cat ON f1.link_catid = cat.cat_id ! WHERE f1.link_id = $link_id ! AND f1.link_approved = 1 ! GROUP BY f1.link_id"; ! break; ! } if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query file info', '', __LINE__, __FILE__, $sql ); } *************** *** 51,55 **** // Id doesn't match with any link in the database another nice error message // ! if ( !$file_data = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); --- 79,83 ---- // Id doesn't match with any link in the database another nice error message // ! if ( !$link_data = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); *************** *** 58,81 **** $db->sql_freeresult( $result ); ! $link_url = $file_data['link_url']; ! // if($user_ip != $file_data['last_user_ip']) ! // { // ! // Update counter // ! $link_hits = intval( $file_data['link_hits'] ) + 1; ! $sql = 'UPDATE ' . LINKS_TABLE . " ! SET link_hits = $link_hits, last_user_ip = '$user_ip' ! WHERE link_id = $link_id"; ! if ( !( $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Update Files table', '', __LINE__, __FILE__, $sql ); } ! // } ! // header("Location: $link_url"); ! echo '<script>location.replace("' . $link_url . '")</script>'; ! exit(); } } --- 86,219 ---- $db->sql_freeresult( $result ); ! // =================================================== ! // Linkdb auth for viewing link ! // =================================================== ! if ( ( !$this->auth_user[$link_data['link_catid']]['auth_view'] ) ) ! { ! /* ! if ( !$userdata['session_logged_in'] ) ! { ! mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=file&link_id=" . $link_id), true)); ! } ! */ ! $message = sprintf( $lang['Sorry_auth_view'], $this->auth_user[$link_data['link_catid']]['auth_view_link_type'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! } ! ! ! $template->assign_vars( array( ! 'U_LINK' => append_sid( $this->this_mxurl() ), ! 'LINKS' => $lang['Links_Title'] ! )); ! ! // =================================================== ! // Prepare link info to display them ! // =================================================== ! $link_time = create_date( $board_config['default_dateformat'], $link_data['link_time'], $board_config['board_timezone'] ); ! $link_update_time = ( $link_data['link_update_time'] ) ? create_date( $board_config['default_dateformat'], $link_data['link_update_time'], $board_config['board_timezone'] ) : $lang['never']; ! $link_author = trim( $link_data['link_creator'] ); ! ! $link_poster = ( $link_data['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $link_data['user_id'] ) . '">' : ''; ! $link_poster .= ( $link_data['user_id'] != ANONYMOUS ) ? $link_data['username'] : $lang['Guest']; ! $link_poster .= ( $link_data['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! ! $template->assign_vars( array( ! 'L_CLICK_HERE' => $lang['Click_here'], ! 'L_AUTHOR' => $lang['Creator'], ! 'L_SITENAME' => $lang['Sitename'], ! 'L_DESC' => $lang['Desc'], ! 'L_DATE' => $lang['Date'], ! 'L_HITS' => $lang['Hits'], ! 'L_EDIT' => $lang['Elinktitle'], ! 'L_DELETE' => $lang['Dlinktitle'], ! 'L_JUMP' => $lang['Link_jump'], ! 'L_SUBMITED_BY' => $lang['Submiter'], ! ! 'SHOW_AUTHOR' => ( !empty( $file_author ) ) ? true : false, ! 'LINK_NAME' => $link_data['link_name'], ! 'LINK_LONGDESC' => nl2br( $link_data['link_longdesc'] ), ! 'LINK_SUBMITED_BY' => $link_poster, ! ! 'DELETE_IMG' => $images['linkdb_icon_delpost'], ! 'EDIT_IMG' => $images['linkdb_icon_edit'], ! ! 'TIME' => $link_time, ! 'LINK_HITS' => intval( $link_data['link_hits'] ), ! 'PIN_IMAGE' => $this->display_banner( $link_data ), ! ! 'U_JUMP' => append_sid( $this->this_mxurl( 'action=jump&link_id=' . $link_id ) ), ! 'U_DELETE' => append_sid( $this->this_mxurl( 'action=user_upload&do=delete&link_id=' . $link_id ) ), ! 'U_EDIT' => append_sid( $this->this_mxurl( 'action=user_upload&link_id=' . $link_id ) ), ! )); ! ! if ($this->auth_user[$link_data['link_catid']]['auth_mod'] || ($this->auth_user[$link_data['link_catid']]['auth_edit'] && $link_data['user_id'] == $userdata['user_id'])) ! { ! $template->assign_block_vars( 'AUTH_EDIT', array()); ! } ! ! if ($this->auth_user[$link_data['link_catid']]['auth_mod'] || ($this->auth_user[$link_data['link_catid']]['auth_delete'] && $link_data['user_id'] == $userdata['user_id'])) ! { ! $template->assign_block_vars( 'AUTH_DELETE', array()); ! } // ! // Instantiate custom fields // ! $linkdb_custom_field = new mx_custom_field(LINK_CUSTOM_TABLE, LINK_CUSTOM_DATA_TABLE); ! $linkdb_custom_field->init(); ! $linkdb_custom_field->display_data( $link_id ); ! // ! // Ratings ! // ! if ( $this->ratings[$link_data['link_catid']]['activated'] ) { ! $link_rating = ( $link_data['rating'] != 0 ) ? round( $link_data['rating'], 2 ) . '/10' : $lang['Not_rated']; ! ! if ( $this->auth_user[$link_data['link_catid']]['auth_rate'] ) ! { ! $rate_img = $images['link_rate']; ! } ! ! $template->assign_block_vars( 'use_ratings', array( ! 'L_RATING' => $lang['LinkRating'], ! 'L_RATE' => $lang['Rate'], ! 'L_VOTES' => $lang['Votes'], ! 'FILE_VOTES' => $link_data['total_votes'], ! 'RATING' => $link_rating, ! ! // ! // Allowed to rate ! // ! 'RATE_IMG' => $rate_img, ! 'U_RATE' => append_sid( $this->this_mxurl( 'action=rate&link_id=' . $link_id ) ), ! )); } ! ! // ! // Comments ! // ! if ( $this->comments[$link_data['link_catid']]['activated'] && $this->auth_user[$link_data['link_catid']]['auth_view_comment']) ! { ! $comments_type = $this->comments[$link_data['link_catid']]['internal_comments'] ? 'internal' : 'phpbb'; ! ! // ! // Instatiate comments ! // ! include_once( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $link_data, $comments_type ); ! $linkdb_comments->display_comments(); ! } ! ! // ! // assign var for naviagation ! // ! $this->generate_navigation( $link_data['link_catid'] ); ! ! // ! // Output all ! // ! $this->display( $lang['Links'], 'link_link_body.tpl' ); } } Index: link_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_search.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** link_search.php 5 Jul 2006 22:49:20 -0000 1.11 --- link_search.php 1 Aug 2006 21:02:20 -0000 1.12 *************** *** 102,106 **** } ! $limit_sql = ( $start == 0 ) ? $linkdb_config['settings_link_page'] : $start . ',' . $linkdb_config['settings_link_page']; // encoding match for workaround --- 102,106 ---- } ! $limit_sql = ( $start == 0 ) ? $linkdb_config['pagination'] : $start . ',' . $linkdb_config['pagination']; // encoding match for workaround *************** *** 506,511 **** $template->assign_vars( array( ! 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_match_count / $linkdb_config['settings_link_page'] ) ), 'LINKS' => $lang['Links_Title'], --- 506,511 ---- $template->assign_vars( array( ! 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $linkdb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['pagination'] ) + 1 ), ceil( $total_match_count / $linkdb_config['pagination'] ) ), 'LINKS' => $lang['Links_Title'], --- NEW FILE: link_post_comment.php --- <?php /** * * @package mxBB Portal Module - mx_linkdb * @version $Id: link_post_comment.php,v 1.1 2006/08/01 21:02:20 jonohlsson Exp $ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Enter description here... * */ class linkdb_post_comment extends linkdb_public { /** * Enter description here... * * @param unknown_type $action */ function main( $action ) { global $template, $linkdb_functions, $lang, $board_config, $phpEx, $link_config, $db, $images, $userdata; global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; // // Request vars // $cid = $mx_request_vars->request('cid', MX_TYPE_INT, 0); if ( $mx_request_vars->is_request('item_id') && $mx_request_vars->is_request('cat_id') ) { $item_id = $mx_request_vars->request('item_id', MX_TYPE_INT, 0); $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, 0); } else { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exist'] ); } $delete = $mx_request_vars->request('delete', MX_TYPE_NO_TAGS, ''); $submit = $mx_request_vars->is_request('submit'); $preview = $mx_request_vars->is_request('preview'); $sql = "SELECT * FROM " . LINKS_TABLE . " WHERE link_id = '" . $item_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt select download', '', __LINE__, __FILE__, $sql ); } if ( !$link_data = $db->sql_fetchrow( $result ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exsist'] ); } $db->sql_freeresult( $result ); if ( ( !$this->auth_user[$link_data['link_catid']]['auth_post_comment'] ) ) { if ( !$userdata['session_logged_in'] ) { // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=post_comment&item_id=" . $item_id), true)); } $message = $lang['Sorry_auth_comment']; mx_message_die( GENERAL_MESSAGE, $message ); } if ( $mx_request_vars->is_get('cid') ) { if ( $this->comments[$link_data['link_catid']]['internal_comments'] ) { // // Query internal comment to edit // $sql = 'SELECT c.*, u.* FROM ' . LINK_COMMENTS_TABLE . ' AS c LEFT JOIN ' . USERS_TABLE . " AS u ON c.poster_id = u.user_id WHERE c.link_id = '" . $item_id . "' AND c.comments_id = '" . $mx_request_vars->request('cid', MX_TYPE_INT, '') . "'"; $comment_arg_title = 'comments_title'; $comment_arg_message = 'comments_text'; $comment_arg_bbcode_uid = 'comment_bbcode_uid'; } else { // // Query internal comment to edit // Note: cid = post_id // $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt WHERE pt.post_id = p.post_id AND u.user_id = p.poster_id AND p.post_id = '" . $mx_request_vars->request('cid', MX_TYPE_INT, '') . "'"; $comment_arg_title = 'po... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:22
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/linkdb Modified Files: linkdb_common.php Log Message: massive update Index: linkdb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/linkdb_common.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** linkdb_common.php 8 Jul 2006 10:22:38 -0000 1.3 --- linkdb_common.php 1 Aug 2006 21:02:19 -0000 1.4 *************** *** 9,15 **** */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } --- 9,15 ---- */ ! if ( !defined( 'IN_PORTAL' ) ) { ! die( "Hacking attempt" ); } *************** *** 61,75 **** */ // ! // Include linkdb data file // ! include_once( $module_root_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); - include_once( $module_root_path . 'linkdb/includes/functions_cache.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_auth.' . $phpEx ); - //include_once( $module_root_path . 'linkdb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_linkdb.' . $phpEx ); ! $linkdb_cache = new linkdb_cache(); $linkdb_functions = new linkdb_functions(); --- 61,88 ---- */ + // =================================================== + // Include Files + // =================================================== + include_once( $module_root_path . 'linkdb/includes/linkdb_constants.' . $phpEx ); + // ! // Load addon tools // ! // - Class module_cache ! // - Class mx_custom_fields ! // - Class mx_notification ! // - Class mx_text ! // - Class mx_text_formatting ! // ! include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); ! include_once( $module_root_path . 'linkdb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_auth.' . $phpEx ); include_once( $module_root_path . 'linkdb/includes/functions_linkdb.' . $phpEx ); ! // =================================================== ! // Load classes ! // =================================================== ! $linkdb_cache = new module_cache($module_root_path . 'linkdb/'); $linkdb_functions = new linkdb_functions(); |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:22
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_admin.php functions_auth.php functions_comment.php functions_linkdb.php Removed Files: functions_cache.php functions_field.php Log Message: massive update Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** functions.php 5 Jul 2006 22:49:20 -0000 1.12 --- functions.php 1 Aug 2006 21:02:19 -0000 1.13 *************** *** 81,84 **** --- 81,196 ---- } + /** + * Enter description here... + * + * @param unknown_type $mode + * @param unknown_type $page_id + */ + function generate_smilies( $mode, $page_id ) + { + global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; + global $user_ip, $session_length, $starttime; + global $userdata, $mx_kb; + global $mx_root_path, $module_root_path, $is_block, $phpEx; + + $inline_columns = 4; + $inline_rows = 5; + $window_columns = 8; + + if ( $mode == 'window' ) + { + $userdata = session_pagestart( $user_ip, $page_id ); + init_userprefs( $userdata ); + + $gen_simple_header = true; + + $page_title = $lang['Review_topic'] . " - $topic_title"; + + include( $mx_root_path . 'includes/page_header.' . $phpEx ); + + $template->set_filenames( array( 'smiliesbody' => 'posting_smilies.tpl' ) ); + } + + $sql = "SELECT emoticon, code, smile_url + FROM " . SMILIES_TABLE . " + ORDER BY smilies_id"; + if ( $result = $db->sql_query( $sql ) ) + { + $num_smilies = 0; + $rowset = array(); + while ( $row = $db->sql_fetchrow( $result ) ) + { + if ( empty( $rowset[$row['smile_url']] ) ) + { + $rowset[$row['smile_url']]['code'] = str_replace( "'", "\\'", str_replace( '\\', '\\\\', $row['code'] ) ); + $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; + $num_smilies++; + } + } + + if ( $num_smilies ) + { + $smilies_count = ( $mode == 'inline' ) ? min( 19, $num_smilies ) : $num_smilies; + $smilies_split_row = ( $mode == 'inline' ) ? $inline_columns - 1 : $window_columns - 1; + + $s_colspan = 0; + $row = 0; + $col = 0; + + while ( list( $smile_url, $data ) = @each( $rowset ) ) + { + if ( !$col ) + { + $template->assign_block_vars( 'smilies_row', array() ); + } + + $template->assign_block_vars( 'smilies_row.smilies_col', array( + 'SMILEY_CODE' => $data['code'], + 'SMILEY_IMG' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_url, + 'SMILEY_DESC' => $data['emoticon'] ) + ); + + $s_colspan = max( $s_colspan, $col + 1 ); + + if ( $col == $smilies_split_row ) + { + if ( $mode == 'inline' && $row == $inline_rows - 1 ) + { + break; + } + $col = 0; + $row++; + } + else + { + $col++; + } + } + + if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) + { + $template->assign_block_vars( 'switch_smilies_extra', array() ); + + $template->assign_vars( array( + 'L_MORE_SMILIES' => $lang['More_emoticons'], + 'U_MORE_SMILIES' => append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) ) + ); + } + + $template->assign_vars( array( + 'L_EMOTICONS' => $lang['Emoticons'], + 'L_CLOSE_WINDOW' => $lang['Close_window'], + 'S_SMILIES_COLSPAN' => $s_colspan ) + ); + } + } + + if ( $mode == 'window' ) + { + $template->pparse( 'smiliesbody' ); + include( $mx_root_path . 'includes/page_tail.' . $phpEx ); + } + } + // since that I can't use the original function with new template system // I just copy it and chagne it *************** *** 129,133 **** if ( $action == 'category' ) { ! $upload_url = append_sid( $linkdb->this_mxurl( "action=user_upload&cat_id={$_REQUEST['cat_id']}" ) ); } else --- 241,257 ---- if ( $action == 'category' ) { ! if ( $linkdb->modules[$linkdb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_post'] || $linkdb->modules[$linkdb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_mod'] ) ! { ! $upload_url = append_sid( $linkdb->this_mxurl( "action=user_upload&cat_id={$_REQUEST['cat_id']}" ) ); ! if ( !$linkdb_config['lock_submit_site'] ) ! { ! $template->assign_block_vars( 'ADD_LINK', array() ); ! } ! } ! $mcp_url = append_sid( $linkdb->this_mxurl( "action=mcp&cat_id={$_REQUEST['cat_id']}" ) ); ! if ( $linkdb->modules[$linkdb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_mod'] ) ! { ! $template->assign_block_vars( 'MCP', array() ); ! } } else *************** *** 136,144 **** } - if ( !$linkdb_config['lock_submit_site'] || $userdata['user_level'] == ADMIN ) - { - $template->assign_block_vars( 'ADD_LINK', array() ); - } - $template->set_filenames( array( 'linkdb_header' => "link_header.tpl" )); --- 260,263 ---- *************** *** 151,154 **** --- 270,274 ---- 'L_SEARCH' => $lang['Link_Search'], 'L_UPLOAD' => $lang['AddLink'], + 'L_MCP' => $lang['MCP_title'], 'L_VIEW_ALL' => $lang['Viewall'], 'L_DESCEND_BY_HITS' => $lang['Descend_by_hits'], *************** *** 161,164 **** --- 281,285 ---- 'U_PASEARCH' => append_sid( $linkdb->this_mxurl( "action=search" ) ), 'U_UPLOAD' => $upload_url, + 'U_MCP' => $mcp_url, 'U_VIEW_ALL' => append_sid( $linkdb->this_mxurl( "action=viewall" ) ), 'U_DESCEND_BY_HITS' => append_sid( $linkdb->this_mxurl( "action=viewall&&sort_method=link_hits&sort_order=DESC" ) ), *************** *** 169,172 **** --- 290,308 ---- )); + // + // Ratings enabled for any category ? + // + if ( !empty( $linkdb->modules[$linkdb->module_name]->cat_rowset ) ) + { + foreach( $linkdb->modules[$linkdb->module_name]->cat_rowset as $cat_id => $cat_row ) + { + if ( $linkdb->modules[$linkdb->module_name]->ratings[$cat_id]['activated'] ) + { + $template->assign_block_vars( 'switch_toprated', array() ); + break; + } + } + } + $template->pparse( 'linkdb_header' ); } *************** *** 189,193 **** $template->assign_vars( array( 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1 ) ), 'S_JUMPBOX_ACTION' => append_sid( $linkdb->this_mxurl() ), 'MX_PAGE' => $page_id, --- 325,329 ---- $template->assign_vars( array( 'L_JUMP' => $lang['Jump'], ! 'JUMPMENU' => $linkdb->modules[$linkdb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1, true, true, 'auth_view' ) ), 'S_JUMPBOX_ACTION' => append_sid( $linkdb->this_mxurl() ), 'MX_PAGE' => $page_id, Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_admin.php 8 Jul 2006 16:26:04 -0000 1.2 --- functions_admin.php 1 Aug 2006 21:02:19 -0000 1.3 *************** *** 74,85 **** // $view_level = intval( $_POST['auth_view'] ); - $post_level = intval( $_POST['auth_post'] ); - $rate_level = intval( $_POST['auth_rate'] ); - $comment_level = intval( $_POST['auth_comment'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); if ( empty( $cat_name ) ) { --- 74,89 ---- // $view_level = intval( $_POST['auth_view'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); + $post_level = intval( $_POST['auth_post'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); + $rate_level = intval( $_POST['auth_rate'] ); + $comment_view_level = intval( $_POST['auth_view_comment'] ); + $comment_post_level = intval( $_POST['auth_post_comment'] ); + $comment_edit_level = intval( $_POST['auth_edit_comment'] ); + $comment_delete_level = intval( $_POST['auth_delete_comment'] ); + if ( empty( $cat_name ) ) { *************** *** 119,124 **** $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_desc, cat_parent, cat_order, cat_allow_file, cat_allow_ratings, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, show_pretext, notify, notify_group, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit) ! VALUES('$cat_name', '$cat_desc', $cat_parent, $cat_order, $cat_allow_file, $cat_use_ratings, $cat_use_comments, $cat_internal_comments, $cat_autogenerate_comments, $comments_forum_id, $cat_show_pretext, $cat_notify, $cat_notify_group, $view_level, $post_level, $rate_level, $comment_level, $edit_level, $delete_level, $approval_level, $approval_edit_level)"; if ( !( $db->sql_query( $sql ) ) ) --- 123,128 ---- $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_desc, cat_parent, cat_order, cat_allow_file, cat_allow_ratings, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, show_pretext, notify, notify_group, auth_view, auth_post, auth_rate, auth_view_comment, auth_post_comment, auth_edit_comment, auth_delete_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit) ! VALUES('$cat_name', '$cat_desc', $cat_parent, $cat_order, $cat_allow_file, $cat_use_ratings, $cat_use_comments, $cat_internal_comments, $cat_autogenerate_comments, $comments_forum_id, $cat_show_pretext, $cat_notify, $cat_notify_group, $view_level, $post_level, $rate_level, $comment_view_level, $comment_post_level, $comment_edit_level, $comment_delete_level, $edit_level, $delete_level, $approval_level, $approval_edit_level)"; if ( !( $db->sql_query( $sql ) ) ) *************** *** 130,134 **** { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_name = '$cat_name', cat_desc = '$cat_desc', cat_parent = $cat_parent, cat_allow_file = $cat_allow_file, cat_allow_ratings = $cat_use_ratings, cat_allow_comments = $cat_use_comments, internal_comments = $cat_internal_comments, autogenerate_comments = $cat_autogenerate_comments, comments_forum_id = $comments_forum_id, show_pretext = $cat_show_pretext, notify = $cat_notify, notify_group = $cat_notify_group, auth_view = $view_level, auth_post = $post_level, auth_rate = $rate_level, auth_comment = $comment_level, auth_edit = $edit_level, auth_delete = $delete_level, auth_approval = $approval_level, auth_approval_edit = $approval_edit_level WHERE cat_id = $cat_id"; --- 134,138 ---- { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_name = '$cat_name', cat_desc = '$cat_desc', cat_parent = $cat_parent, cat_allow_file = $cat_allow_file, cat_allow_ratings = $cat_use_ratings, cat_allow_comments = $cat_use_comments, internal_comments = $cat_internal_comments, autogenerate_comments = $cat_autogenerate_comments, comments_forum_id = $comments_forum_id, show_pretext = $cat_show_pretext, notify = $cat_notify, notify_group = $cat_notify_group, auth_view = $view_level, auth_post = $post_level, auth_rate = $rate_level, auth_view_comment = '" . $comment_view_level . "', auth_post_comment = '" . $comment_post_level . "', auth_edit_comment = '" . $comment_edit_level . "', auth_delete_comment = '" . $comment_delete_level . "', auth_edit = $edit_level, auth_delete = $delete_level, auth_approval = $approval_level, auth_approval_edit = $approval_edit_level WHERE cat_id = $cat_id"; *************** *** 203,211 **** if ( $file_mode == 'delete' ) { ! $this->delete_links( $cat_id, 'category' ); } else { ! $this->move_links( $cat_id, $file_to_cat_id ); } --- 207,215 ---- if ( $file_mode == 'delete' ) { ! $this->delete_items( $cat_id, 'category' ); } else { ! $this->move_items( $cat_id, $file_to_cat_id ); } *************** *** 228,232 **** * @param unknown_type $to_cat */ ! function move_links( $from_cat, $to_cat ) { global $db; --- 232,236 ---- * @param unknown_type $to_cat */ ! function move_items( $from_cat, $to_cat ) { global $db; *************** *** 274,282 **** if ( $file_mode == 'delete' ) { ! $this->delete_links( $sub_cat_id, 'category' ); } else { ! $this->move_links( $sub_cat_id, $to_cat ); } } --- 278,286 ---- if ( $file_mode == 'delete' ) { ! $this->delete_items( $sub_cat_id, 'category' ); } else { ! $this->move_items( $sub_cat_id, $to_cat ); } } --- functions_cache.php DELETED --- Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_comment.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_comment.php 5 Jul 2006 22:49:20 -0000 1.2 --- functions_comment.php 1 Aug 2006 21:02:19 -0000 1.3 *************** *** 71,75 **** $sql = 'SELECT * FROM ' . LINKS_TABLE . " ! WHERE file_id = $item_data"; if ( !( $result = $db->sql_query( $sql ) ) ) --- 71,75 ---- $sql = 'SELECT * FROM ' . LINKS_TABLE . " ! WHERE link_id = $item_data"; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 82,87 **** $this->comments_type = $comments_type == 'internal' ? 'internal' : 'phpbb'; ! $this->cat_id = $item_data['file_catid']; ! $this->item_id = $item_data['file_id']; $this->topic_id = $item_data['topic_id']; --- 82,87 ---- $this->comments_type = $comments_type == 'internal' ? 'internal' : 'phpbb'; ! $this->cat_id = $item_data['link_catid']; ! $this->item_id = $item_data['link_id']; $this->topic_id = $item_data['topic_id']; *************** *** 91,99 **** $this->forum_id = $linkdb->modules[$linkdb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $linkdb->modules[$linkdb->module_name]->auth[$this->cat_id]['auth_view_comment']; ! $this->auth['auth_post'] = $linkdb->modules[$linkdb->module_name]->auth[$this->cat_id]['auth_post_comment']; ! $this->auth['auth_edit'] = $linkdb->modules[$linkdb->module_name]->auth[$this->cat_id]['auth_edit_comment']; ! $this->auth['auth_delete'] = $linkdb->modules[$linkdb->module_name]->auth[$this->cat_id]['auth_delete_comment']; ! $this->auth['auth_mod'] = $linkdb->modules[$linkdb->module_name]->auth[$this->cat_id]['auth_mod']; // --- 91,99 ---- $this->forum_id = $linkdb->modules[$linkdb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $linkdb->modules[$linkdb->module_name]->auth_user[$this->cat_id]['auth_view_comment']; ! $this->auth['auth_post'] = $linkdb->modules[$linkdb->module_name]->auth_user[$this->cat_id]['auth_post_comment']; ! $this->auth['auth_edit'] = $linkdb->modules[$linkdb->module_name]->auth_user[$this->cat_id]['auth_edit_comment']; ! $this->auth['auth_delete'] = $linkdb->modules[$linkdb->module_name]->auth_user[$this->cat_id]['auth_delete_comment']; ! $this->auth['auth_mod'] = $linkdb->modules[$linkdb->module_name]->auth_user[$this->cat_id]['auth_mod']; // *************** *** 101,105 **** // $this->pagination_action = 'action=file'; ! $this->pagination_target = 'file_id='; $this->pagination_num = empty($show_num_comments) ? $this->pagination_num : $show_num_comments; --- 101,105 ---- // $this->pagination_action = 'action=file'; ! $this->pagination_target = 'link_id='; $this->pagination_num = empty($show_num_comments) ? $this->pagination_num : $show_num_comments; *************** *** 605,611 **** global $db, $template; ! $sql = "SELECT COUNT(file_id) AS number FROM " . LINK_COMMENTS_TABLE . " ! WHERE file_id = " . $this->item_id; if ( !($result = $db->sql_query($sql)) ) --- 605,611 ---- global $db, $template; ! $sql = "SELECT COUNT(link_id) AS number FROM " . LINK_COMMENTS_TABLE . " ! WHERE link_id = " . $this->item_id; if ( !($result = $db->sql_query($sql)) ) *************** *** 619,623 **** FROM ' . LINK_COMMENTS_TABLE . ' AS c LEFT JOIN ' . USERS_TABLE . " AS u ON c.poster_id = u.user_id ! WHERE c.file_id = '" . $this->item_id . "' ORDER BY c.comments_id DESC"; --- 619,623 ---- FROM ' . LINK_COMMENTS_TABLE . ' AS c LEFT JOIN ' . USERS_TABLE . " AS u ON c.poster_id = u.user_id ! WHERE c.link_id = '" . $this->item_id . "' ORDER BY c.comments_id DESC"; *************** *** 1288,1292 **** $sql = "UPDATE " . LINKS_TABLE . " SET topic_id = '0' ! WHERE file_id = ". $this->item_id; if ( !( $result = $db->sql_query( $sql ) ) ) --- 1288,1292 ---- $sql = "UPDATE " . LINKS_TABLE . " SET topic_id = '0' ! WHERE link_id = ". $this->item_id; if ( !( $result = $db->sql_query( $sql ) ) ) Index: functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_auth.php 3 Jul 2006 20:11:30 -0000 1.2 --- functions_auth.php 1 Aug 2006 21:02:19 -0000 1.3 *************** *** 15,18 **** --- 15,58 ---- /** + * Auth Defs. + * + */ + define('LINKDB_AUTH_ALL', 0); // In reality only option used ;) + define('LINKDB_AUTH_VIEW', 1); + define('LINKDB_AUTH_EDIT', 2); + define('LINKDB_AUTH_DELETE', 3); + define('LINKDB_AUTH_POST', 4); + define('LINKDB_AUTH_RATE', 5); + + define('LINKDB_AUTH_VIEW_COMMENT', 10); + define('LINKDB_AUTH_POST_COMMENT', 11); + define('LINKDB_AUTH_EDIT_COMMENT', 12); + define('LINKDB_AUTH_DELETE_COMMENT', 13); + + define('LINKDB_AUTH_APPROVAL', 20); + define('LINKDB_AUTH_APPROVAL_EDIT', 21); + + /** + * Auth API. + * + * $class->auth_user['auth_view']; + * $class->auth_user['auth_post']; + * $class->auth_user['auth_edit']; + * $class->auth_user['auth_delete']; + * + * $class->auth_user['auth_approval']; + * $class->auth_user['auth_approval_edit']; + * + * $class->auth_user['auth_rate']; + * + * $class->auth_user['auth_view_comment']; + * $class->auth_user['auth_post_comment']; + * $class->auth_user['auth_edit_comment']; + * $class->auth_user['auth_delete_comment']; + * + * $class->auth_user['auth_mod']; + */ + + /** * Enter description here... * *************** *** 29,36 **** * @param unknown_type $userdata * @param unknown_type $f_access - * @param unknown_type $f_access_group * @return unknown */ ! function auth( $type, $cat_id, $userdata, $f_access = '', $f_access_group = '' ) { global $db, $lang; --- 69,75 ---- * @param unknown_type $userdata * @param unknown_type $f_access * @return unknown */ ! function auth( $type, $cat_id, $userdata, $f_access = '' ) { global $db, $lang; *************** *** 38,49 **** switch ( $type ) { ! case AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_post, a.auth_rate, a.auth_comment, a.auth_edit, a.auth_delete, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_comment_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_comment_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); break; ! case AUTH_VIEW: $a_sql = 'a.auth_view'; $a_sql_groups = 'a.auth_view_groups'; --- 77,88 ---- switch ( $type ) { ! case LINKDB_AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete, a.auth_post, a.auth_rate, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_view_comment_groups, a.auth_post_comment_groups, a.auth_edit_comment_groups, a.auth_delete_comment_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete', 'auth_post', 'auth_rate', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_view_comment_groups', 'auth_post_comment_groups', 'auth_edit_comment_groups', 'auth_delete_comment_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); break; ! case LINKDB_AUTH_VIEW: $a_sql = 'a.auth_view'; $a_sql_groups = 'a.auth_view_groups'; *************** *** 52,56 **** break; ! case AUTH_POST: $a_sql = 'a.auth_post'; $a_sql_groups = 'a.auth_post_groups'; --- 91,109 ---- break; ! case LINKDB_AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); ! break; ! ! case LINKDB_AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); ! break; ! ! case LINKDB_AUTH_POST: $a_sql = 'a.auth_post'; $a_sql_groups = 'a.auth_post_groups'; *************** *** 59,63 **** break; ! case AUTH_RATE: $a_sql = 'a.auth_rate'; $a_sql_groups = 'a.auth_rate_groups'; --- 112,116 ---- break; ! case LINKDB_AUTH_RATE: $a_sql = 'a.auth_rate'; $a_sql_groups = 'a.auth_rate_groups'; *************** *** 66,91 **** break; ! case AUTH_COMMENT: ! $a_sql = 'a.auth_comment'; ! $a_sql_groups = 'a.auth_comment_groups'; ! $auth_fields = array( 'auth_comment' ); ! $auth_fields_groups = array( 'auth_comment_groups' ); break; ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); break; ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); break; ! case AUTH_APPROVAL: $a_sql = 'a.auth_approval'; $a_sql_groups = 'a.auth_approval_groups'; --- 119,151 ---- break; ! case LINKDB_AUTH_VIEW_COMMENT: ! $a_sql = 'a.auth_view_comment'; ! $a_sql_groups = 'a.auth_view_comment_groups'; ! $auth_fields = array( 'auth_view_comment' ); ! $auth_fields_groups = array( 'auth_view_comment_groups' ); break; ! case LINKDB_AUTH_POST_COMMENT: ! $a_sql = 'a.auth_post_comment'; ! $a_sql_groups = 'a.auth_post_comment_groups'; ! $auth_fields = array( 'auth_post_comment' ); ! $auth_fields_groups = array( 'auth_post_comment_groups' ); break; ! case LINKDB_AUTH_EDIT_COMMENT: ! $a_sql = 'a.auth_edit_comment'; ! $a_sql_groups = 'a.auth_edit_comment_groups'; ! $auth_fields = array( 'auth_edit_comment' ); ! $auth_fields_groups = array( 'auth_edit_comment_groups' ); break; ! case LINKDB_AUTH_DELETE_COMMENT: ! $a_sql = 'a.auth_delete_comment'; ! $a_sql_groups = 'a.auth_delete_comment_groups'; ! $auth_fields = array( 'auth_delete_comment' ); ! $auth_fields_groups = array( 'auth_delete_comment_groups' ); ! break; ! ! case LINKDB_AUTH_APPROVAL: $a_sql = 'a.auth_approval'; $a_sql_groups = 'a.auth_approval_groups'; *************** *** 94,98 **** break; ! case AUTH_APPROVAL_EDIT: $a_sql = 'a.auth_approval_edit'; $a_sql_groups = 'a.auth_approval_edit_groups'; --- 154,158 ---- break; ! case LINKDB_AUTH_APPROVAL_EDIT: $a_sql = 'a.auth_approval_edit'; $a_sql_groups = 'a.auth_approval_edit_groups'; *************** *** 115,119 **** $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.cat_id = $cat_id" : ''; ! $sql = "SELECT a.cat_id, $a_sql FROM " . LINK_CATEGORIES_TABLE . " a $forum_match_sql"; --- 175,179 ---- $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.cat_id = $cat_id" : ''; ! $sql = "SELECT * FROM " . LINK_CATEGORIES_TABLE . " a $forum_match_sql"; *************** *** 133,162 **** } - // - // If f_access_group has not been passed, or auth is needed to return an array of forums - // then we need to pull the auth information on the given forum (or all forums) - // - if ( empty($f_access_group) ) - { - $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.cat_id = $cat_id" : ''; - - $sql = "SELECT a.cat_id, $a_sql_groups, a.auth_moderator_groups - FROM " . LINK_CATEGORIES_TABLE . " a - $forum_match_sql"; - if ( !($result = $db->sql_query($sql)) ) - { - mx_message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); - } - - $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; - - if ( !($f_access_group = $db->$sql_fetchrow($result)) ) - { - $db->sql_freeresult($result); - return array(); - } - $db->sql_freeresult($result); - } - $auth_user = array(); for( $i = 0; $i < count( $auth_fields ); $i++ ) --- 193,196 ---- *************** *** 175,179 **** { $value = $f_access[$key]; ! $value_groups = $f_access_group[$key_groups]; switch ( $value ) --- 209,213 ---- { $value = $f_access[$key]; ! $value_groups = $f_access[$key_groups]; switch ( $value ) *************** *** 194,204 **** break; ! case AUTH_ACL: // PRIVATE ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; ! case AUTH_MOD: ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; --- 228,238 ---- break; ! case AUTH_ACL: // PRIVATE OR MODERATOR ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; ! case AUTH_MOD: // MODERATOR ONLY ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 219,227 **** { $value = $f_access[$k][$key]; ! $value_groups = $f_access_group[$k][$key_groups]; $f_cat_id = $f_access[$k]['cat_id']; - switch ( $value ) { --- 253,260 ---- { $value = $f_access[$k][$key]; ! $value_groups = $f_access[$k][$key_groups]; $f_cat_id = $f_access[$k]['cat_id']; switch ( $value ) { *************** *** 241,251 **** break; ! case AUTH_ACL: // PRIVATE ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; ! case AUTH_MOD: ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; --- 274,284 ---- break; ! case AUTH_ACL: // PRIVATE OR MODERATOR ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; ! case AUTH_MOD: // MODERATOR ONLY ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 269,273 **** if ( $cat_id != AUTH_LIST_ALL ) { ! $this->auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; } else --- 302,306 ---- if ( $cat_id != AUTH_LIST_ALL ) { ! $this->auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; } else *************** *** 276,284 **** { $f_cat_id = $f_access[$k]['cat_id']; ! ! $this->auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; } } - return $this->auth_user; } --- 309,315 ---- { $f_cat_id = $f_access[$k]['cat_id']; ! $this->auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; } } } Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** functions_linkdb.php 8 Jul 2006 16:26:04 -0000 1.15 --- functions_linkdb.php 1 Aug 2006 21:02:19 -0000 1.16 *************** *** 134,168 **** $this->subcat_rowset[$cat_rowset[$i]['cat_parent']][$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; $this->total_cat++; - } ! // ! // Comments ! // Note: some settings are category dependent, but may use default config settings ! // ! $this->comments[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_comments'] == -1 ? ($linkdb_config['use_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_comments'] == 1 ? true : false ); ! $this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($linkdb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments ! $this->comments[$cat_rowset[$i]['cat_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($linkdb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($linkdb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments) ! if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1) ! { ! mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']); ! } ! // ! // Ratings ! // ! $this->ratings[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_ratings'] == -1 ? ($linkdb_config['use_ratings'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_ratings'] == 1 ? true : false ); ! // ! // Information ! // ! $this->information[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['show_pretext'] == -1 ? ($linkdb_config['show_pretext'] == 1 ? true : false ) : ( $cat_rowset[$i]['show_pretext'] == 1 ? true : false ); // phpBB or internal ratings ! // ! // Notification ! // ! $this->notification[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['notify'] == -1 ? (intval($linkdb_config['notify'])) : ( intval($cat_rowset[$i]['notify']) ); // -1, 0, 1, 2 ! $this->notification[$cat_rowset[$i]['cat_id']]['notify_group'] = $cat_rowset[$i]['notify_group'] == -1 || $cat_rowset[$i]['notify_group'] == 0 ? (intval($linkdb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id } } --- 134,168 ---- $this->subcat_rowset[$cat_rowset[$i]['cat_parent']][$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; $this->total_cat++; ! // ! // Comments ! // Note: some settings are category dependent, but may use default config settings ! // ! $this->comments[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_comments'] == -1 ? ($linkdb_config['use_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_comments'] == 1 ? true : false ); ! $this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($linkdb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments ! $this->comments[$cat_rowset[$i]['cat_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($linkdb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($linkdb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments) ! if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1) ! { ! mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']); ! } ! // ! // Ratings ! // ! $this->ratings[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['cat_allow_ratings'] == -1 ? ($linkdb_config['use_ratings'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_ratings'] == 1 ? true : false ); ! // ! // Information ! // ! $this->information[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['show_pretext'] == -1 ? ($linkdb_config['show_pretext'] == 1 ? true : false ) : ( $cat_rowset[$i]['show_pretext'] == 1 ? true : false ); // phpBB or internal ratings ! // ! // Notification ! // ! $this->notification[$cat_rowset[$i]['cat_id']]['activated'] = $cat_rowset[$i]['notify'] == -1 ? (intval($linkdb_config['notify'])) : ( intval($cat_rowset[$i]['notify']) ); // -1, 0, 1, 2 ! $this->notification[$cat_rowset[$i]['cat_id']]['notify_group'] = $cat_rowset[$i]['notify_group'] == -1 || $cat_rowset[$i]['notify_group'] == 0 ? (intval($linkdb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id ! } } } *************** *** 312,316 **** * @return unknown */ ! function file_in_cat( $cat_id ) { if ( $this->cat_rowset[$cat_id]['cat_links'] == -1 || $this->modified ) --- 312,316 ---- * @return unknown */ ! function items_in_cat( $cat_id ) { if ( $this->cat_rowset[$cat_id]['cat_links'] == -1 || $this->modified ) *************** *** 329,340 **** } ! $files_no = 0; if ( $row = $db->sql_fetchrow( $result ) ) { ! $files_no = $row['total_files']; } $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_links = $files_no WHERE cat_id = $cat_id"; --- 329,340 ---- } ! $number_of_items = 0; if ( $row = $db->sql_fetchrow( $result ) ) { ! $number_of_items = $row['total_files']; } $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_links = $number_of_items WHERE cat_id = $cat_id"; *************** *** 346,353 **** else { ! $files_no = $this->cat_rowset[$cat_id]['cat_links']; } ! return $files_no; } --- 346,353 ---- else { ! $number_of_items = $this->cat_rowset[$cat_id]['cat_links']; } ! return $number_of_items; } *************** *** 362,369 **** * @return unknown */ ! function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { global $page_id; ! static $cat_rowset = false; if ( !is_array( $cat_rowset ) ) --- 362,369 ---- * @return unknown */ ! function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false, $auth = 'auth_view' ) { global $page_id; ! //static $cat_rowset = false; if ( !is_array( $cat_rowset ) ) *************** *** 375,379 **** foreach( $this->cat_rowset as $row ) { ! if ( $this->auth_user[$row['cat_id']]['auth_post'] ) { $cat_rowset[$row['cat_id']] = $row; --- 375,379 ---- foreach( $this->cat_rowset as $row ) { ! if ( $this->auth_user[$row['cat_id']][$auth] ) { $cat_rowset[$row['cat_id']] = $row; *************** *** 449,453 **** foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) { ! if ( $cat_row['cat_allow_file'] || !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) { $i++; --- 449,453 ---- foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) { ! if ( $this->auth_user[$cat_row['cat_id']]['auth_view'] && ( $cat_row['cat_allow_file'] || !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) ) { $i++; *************** *** 457,461 **** break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a> '; } /* --- 457,461 ---- break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; } /* *************** *** 543,551 **** * @return unknown */ ! function new_file_in_cat( $cat_id ) { global $linkdb_config, $board_config, $db; ! $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); $files_new = 0; --- 543,551 ---- * @return unknown */ ! function new_item_in_cat( $cat_id ) { global $linkdb_config, $board_config, $db; ! $cat_array = explode(', ', $this->gen_cat_ids( $cat_id )); $files_new = 0; *************** *** 569,573 **** * @param unknown_type $file_info */ ! function last_file_in_cat( $cat_id, &$file_info ) { if ( ( empty( $this->cat_rowset[$cat_id]['cat_last_link_id'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_name'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_time'] ) ) || $this->modified ) --- 569,573 ---- * @param unknown_type $file_info */ ! function last_item_in_cat( $cat_id, &$file_info ) { if ( ( empty( $this->cat_rowset[$cat_id]['cat_last_link_id'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_name'] ) && empty( $this->cat_rowset[$cat_id]['cat_last_link_time'] ) ) || $this->modified ) *************** *** 658,667 **** } ! $template->assign_block_vars( 'CAT_PARENT', array() ); $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ); --- 658,672 ---- } ! // ! // Introduce a style switch for simple/standard category navigation ! // ! $cat_style = $linkdb_config['use_simple_navigation'] ? 'CAT_NAV_SIMPLE' : 'CAT_NAV_STANDARD'; ! ! $template->assign_block_vars( $cat_style, array() ); $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_LINK' => $lang['Last_link'], ! 'L_LINKS' => $lang['Link'] ) ); *************** *** 669,674 **** --- 674,683 ---- // Output the categories // + $num_of_cats = 0; if ( isset( $this->subcat_rowset[$cat_id] ) ) { + // + // Variables needed for the simple nav + // $catnum = count($this->subcat_rowset[$cat_id]); $catcol = $linkdb_config['cat_col'] > 0 ? $linkdb_config['cat_col'] : 1; *************** *** 680,787 **** } ! $template->assign_vars( array( 'LINK_WIDTH' => 100 / $catcol ) ); ! $i = 0; foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) { ! if ( $i == 0 || $i == $catcol) ! { ! $template->assign_block_vars( 'CAT_PARENT.catcol', array() ); ! $i = 0; ! } ! $i++; ! ! $last_file_info = array(); ! $this->last_file_in_cat( $subcat_id, $last_file_info ); ! ! if ( !empty( $last_file_info['file_id'] ) && $this->auth[$subcat_id]['auth_read'] ) ! { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); ! $last_file = $last_file_time . '<br />'; ! $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['linkdb_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; ! } ! else ! { ! $last_file = $lang['No_file']; ! } ! ! $is_new = false; ! if ( $this->new_file_in_cat( $subcat_id ) ) { ! $is_new = true; ! } ! ! $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'CAT_IMAGE' => ( $is_new ) ? $images['linkdb_folder_new'] : $images['linkdb_folder'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); ! } ! } ! } ! /** ! * display_categories - original. ! * - not implemented for linkdb...yet ! * ! * @param unknown_type $cat_id ! */ ! function display_categories_original( $cat_id = LINKDB_ROOT_CAT ) ! { ! global $db, $template, $lang, $userdata, $phpEx, $images; ! global $linkdb_config, $board_config, $debug; ! global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; ! if ( $this->cat_empty() ) ! { ! if ( !$userdata['session_logged_in'] ) ! { ! $redirect = ( $cat_id != LINKDB_ROOT_CAT ) ? $this->this_mxurl( "action=category&cat_id=$cat_id" ) : $this->this_mxurl(); ! redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); ! } ! mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); ! } ! $template->assign_vars( array( ! 'CAT_PARENT_ORIGINAL' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); - // - // Category navigation for cat_id that allow files - // - used in cat pages without files - // - if ( isset( $this->subcat_rowset[$cat_id] ) ) - { - foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) - { - if ( ( $subcat_row['cat_allow_file'] == LINKDB_CAT_ALLOW_FILE ) ) - { $last_file_info = array(); ! $this->last_file_in_cat( $subcat_id, $last_file_info ); ! if ( !empty( $last_file_info['file_id'] ) && $this->auth[$subcat_id]['auth_read'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; ! $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['linkdb_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else { ! $last_file = $lang['No_file']; } - $is_new = false; ! if ( $this->new_file_in_cat( $subcat_id ) ) { $is_new = true; --- 689,735 ---- } ! $template->assign_vars( array( 'WIDTH' => 100 / $catcol ) ); $i = 0; + foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) { ! // ! // Auth ! // ! if ( $this->auth_user[$subcat_id]['auth_view'] ) { ! if ( $i == 0 || $i == $catcol) ! { ! $template->assign_block_vars( $cat_style.'.catrow', array() ); ! $i = 0; ! } ! $i++; ! $category_links = $this->items_in_cat($subcat_id); ! $category_details = $subcat_row['cat_desc']; ! $category_name = $subcat_row['cat_name']; ! $category_url = append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ); ! $num_of_cats++; $last_file_info = array(); ! $this->last_item_in_cat( $subcat_id, $last_file_info ); ! if ( !empty( $last_file_info['link_id'] ) && $this->auth_user[$subcat_id]['auth_view'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['link_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; ! $last_file_name = ( strlen( stripslashes( $last_file_info['link_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['link_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['link_name'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=link&link_id=' . $last_file_info['link_id'] ) ) . '" alt="' . stripslashes( $last_file_info['link_name'] ) . '" title="' . stripslashes( $last_file_info['link_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=link&link_id=' . $last_file_info['link_id'] ) ) . '"><img src="' . $images['linkdb_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else { ! $last_file = $lang['No_link']; } ! $is_new = false; ! if ( $this->new_item_in_cat( $subcat_id ) ) { $is_new = true; *************** *** 789,890 **** $sub_cat = $this->get_sub_cat( $subcat_id ); - $template->assign_block_vars( 'no_cat_parent', array( - 'IS_HIGHER_CAT' => false, - 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), - 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['linkdb_folder_new'] : $images['linkdb_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); ! } ! } ! } ! // ! // Category navigation for cat_id that doesn't allow files ! // - used in cat pages with files ! // ! if ( isset( $this->subcat_rowset[$cat_id] ) ) ! { ! foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) ! { ! $total_sub_cat = 0; ! if ( isset( $this->subcat_rowset[$subcat_id] ) ) ! { ! foreach( $this->subcat_rowset[$subcat_id] as $sub_no_cat_id => $sub_no_cat_row ) ! { ! if ( $sub_no_cat_row['cat_allow_file'] == LINKDB_CAT_ALLOW_FILE ) ! { ! $sub_cat_rowset[$total_sub_cat] = $sub_no_cat_row; ! $total_sub_cat++; ! } ! } ! } ! // ! // This is a container category ! // ! if ( ( $subcat_row['cat_allow_file'] != LINKDB_CAT_ALLOW_FILE ) ) ! { ! if ( $total_sub_cat ) { ! $template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } - - for( $k = 0; $k < $total_sub_cat; $k++ ) - { - $last_file_info = array(); - $this->last_file_in_cat( $sub_cat_rowset[$k]['cat_id'], $last_file_info ); - - if ( $sub_cat_rowset[$k]['cat_parent'] == $subcat_id ) - { - if ( !empty( $last_file_info['file_id'] ) && $this->auth[$sub_cat_rowset[$k]['cat_id']]['auth_read'] ) - { - $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); - $last_file = $last_file_time . '<br />'; - $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; - $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; - $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['linkdb_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; - } - else - { - $last_file = $lang['No_file']; - } - - $is_new = false; - - if ( $this->new_file_in_cat( $sub_cat_rowset[$k]['cat_id'] ) ) - { - $is_new = true; - } - - $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); - - $template->assign_block_vars( 'no_cat_parent', array( - 'IS_HIGHER_CAT' => false, - 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), - 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', - 'CAT_IMAGE' => ( $is_new ) ? $images['linkdb_folder_new'] : $images['linkdb_folder'], - 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], - 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], - 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), - 'LAST_FILE' => $last_file, - 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) - ); - } // Have a permission to view the category - } // It is not parent category } } ! } //higher Category ! } /** --- 737,768 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); + $template->assign_block_vars( $cat_style.'.catrow.catcol', array( + 'CATEGORY' => $category_name, + 'U_CATEGORY' => $category_url, + 'CAT_DESCRIPTION' => $category_details, + 'CAT_LINKS' => $category_links, 'CAT_IMAGE' => ( $is_new ) ? $images['linkdb_folder_new'] : $images['linkdb_folder'], ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", ! 'L_SUB_CAT' => $lang['Sub_categories'], ! 'LAST_LINK' => $last_file, ! )); ! if (!empty( $sub_cat )) { ! $template->assign_block_vars( $cat_style.'.catrow.catcol.show_subs', array()); } } } ! } + if ( $num_of_cats == 0 ) + { + $template->assign_block_vars( $cat_style.'.no_cats', array( + 'COMMENT' => 'You are not allowed to view any category.', + )); + } + } /** *************** *** 897,901 **** * @param unknown_type $cat_id */ ! function display_files( $sort_method, $sort_order, $start, $show_file_message, $cat_id = false ) { global $db, $linkdb_config, $template, $board_config; --- 775,779 ---- * @param unknown_type $cat_id */ ! function display_items( $sort_method, $sort_order, $start, $show_file_message, $cat_id = false ) { global $db, $linkdb_config, $template, $board_config; *************** *** 944,948 **** } ! if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['settings_link_page'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); --- 822,826 ---- } ! if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); *************** *** 987,990 **** --- 865,881 ---- } + // + // Ratings + // + $link_use_ratings = false; + for ( $i = 0; $i < count( $file_rowset ); $i++ ) + { + if ( $this->ratings[$file_rowset[$i]['link_catid']]['activated'] ) + { + $link_use_ratings = true; + break; + } + } + for ( $i = 0; $i < count( $file_rowset ); $i++ ) { *************** *** 997,1001 **** // Get rating for the file and format it // =================================================== ! $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; // // If the file is new then put a new image in front of it --- 888,895 ---- // Get rating for the file and format it // =================================================== ! if ($link_use_ratings) ! { ! $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; ! } // // If the file is new then put a new image in front of it *************** *** 1007,1010 **** --- 901,908 ---- } + $link_title = $file_rowset[$i]['link_name']; + $link_url = append_sid( $this->this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ); + $link_url_jump = append_sid( $this->this_mxurl( 'action=jump&link_id=' . $file_rowset[$i]['link_id'] ) ); + $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['link_catid']]['cat_name'] : ''; $cat_url = append_sid( $this->this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['link_catid'] ) ); *************** *** 1023,1039 **** 'L_NEW_FILE' => $lang['New_file'], 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NAME' => $file_rowset[$i]['link_name'], 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], 'DATE' => $date, 'FILE_DLS' => $file_rowset[$i]['link_hits'], 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => '<a href="' . append_sid( $this->this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['LinkRating'] . '</a>', 'RATING' => $file_rating, 'CAT_NAME' => $cat_name, - 'IS_NEW_FILE' => $is_new, 'U_CAT' => $cat_url, ! 'U_FILE' => append_sid( $this->this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ), 'POSTER' => $file_poster, --- 921,941 ---- 'L_NEW_FILE' => $lang['New_file'], 'PIN_IMAGE' => $this->display_banner( $file_rowset[$i], $row ), ! 'FILE_NAME' => $link_title, 'FILE_DESC' => $file_rowset[$i]['link_longdesc'], 'DATE' => $date, 'FILE_DLS' => $file_rowset[$i]['link_hits'], + 'FILE_VOTES' => $file_rowset[$i]['total_votes'], ! 'L_RATING' => $lang['LinkRating'], ! 'DO_RATE' => $this->auth_user[$cat_id]['auth_rate'] ? '<a href="' . append_sid( $this->this_mxurl( 'action=rate&link_id=' . $file_rowset[$i]['link_id'] ) ) . '">' . $lang['Do_rate'] . '</a>' : '', 'RATING' => $file_rating, 'CAT_NAME' => $cat_name, 'U_CAT' => $cat_url, ! 'U_FILE' => $link_url_jump, ! ! 'L_FILE_MORE' => $lang['Link_review'], ! 'U_FILE_MORE' => $link_url, 'POSTER' => $file_poster, *************** *** 1042,1048 **** )); ! if ( $this->ratings[$file_rowset[$i]['link_catid']]['activated'] ) { ! $template->assign_block_vars( "FILELIST.file_rows.LINK_VOTE", array() ); } --- 944,955 ---- )); ! if ( $link_use_ratings ) { ! $template->assign_block_vars( "FILELIST.file_rows.show_ratings", array() ); ! } ! ! if ( $is_new ) ! { ! $template->assign_block_vars( "FILELIST.file_rows.is_new_file", array() ); } *************** *** 1080,1085 **** 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_file / $linkdb_config['settings_link_page'] ) ), 'ID' => $cat_id, 'START' => $start, --- 987,992 ---- 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $linkdb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['pagination'] ) + 1 ), ceil( $total_file / $linkdb_config['pagination'] ) ), 'ID' => $cat_id, 'START' => $start, *************** *** 1090,1099 **** else { ! $template->assign_block_vars( 'NO_FILE', array() ); ! $template->assign_vars( array( ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ! ); } } --- 997,1009 ---- else { ! if ($this->cat_rows... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:22
|
Update of /cvsroot/mxbb/mx_linkdb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: massive update Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_main.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_main.php 5 Jul 2006 22:49:20 -0000 1.5 --- lang_main.php 1 Aug 2006 21:02:19 -0000 1.6 *************** *** 9,17 **** */ - $lang['linkdb_disable'] = 'Linkdb is disabled.'; - // // Main // $lang['Viewall'] = 'View All Links'; $lang['Descend_by_hits'] = 'Search By Hits - Descending'; --- 9,17 ---- */ // // Main // + $lang['linkdb_disable'] = 'Linkdb is disabled.'; + $lang['Viewall'] = 'View All Links'; $lang['Descend_by_hits'] = 'Search By Hits - Descending'; *************** *** 19,22 **** --- 19,23 ---- $lang['Jump'] = 'Select a category'; $lang['Sub_category'] = 'Sub Category'; + $lang['Sub_categories'] = 'Subcategories'; $lang['Lock_submit_site'] = 'Submit site was locked'; $lang['Link_us'] = 'Link to us'; *************** *** 24,27 **** --- 25,31 ---- $lang['Link_us_syntax'] = '<a href="%s" target="_blank"><img src="%s" width="%d" height="%d" border="0" alt="%s" /></a>'; + // + // Return + // $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; *************** *** 31,39 **** --- 35,47 ---- $lang['Sort'] = 'Sort'; + // // Category + // $lang['No_links'] = 'No links found'; + $lang['No_link'] = 'No links'; $lang['No_links_cat'] = 'There are no links in this category.'; $lang['Cat_not_exist'] = 'The category you selected does not exist.'; $lang['Link_not_exist'] = 'The link you selected does not exist.'; + $lang['Last_link'] = 'Last link'; // *************** *** 43,47 **** --- 51,59 ---- $lang['Date'] = 'Date'; $lang['Hits'] = 'Hits'; + $lang['LinkRating'] = 'Rating'; $lang['Votes'] = ' Votes'; + $lang['Desc'] = 'Description'; + $lang['Link_review'] = 'Review link'; + $lang['Link_jump'] = 'Visit site'; $lang['No_Display_Links_Logo'] = '<font color=brown>•</font>'; // You can edit color *************** *** 55,58 **** --- 67,97 ---- // + // MCP + // + $lang['MCP_title'] = 'Moderator Control Panel'; + $lang['MCP_title_explain'] = 'Here moderators can approve and manage links'; + + $lang['View'] = 'View'; + + $lang['Approve_selected'] = 'Approve Selected'; + $lang['Unapprove_selected'] = 'Unapprove Selected'; + $lang['Delete_selected'] = 'Delete Selected'; + $lang['No_item'] = 'There is no links'; + + $lang['All_items'] = 'All Links'; + $lang['Approved_items'] = 'Approved Links'; + $lang['Unapproved_items'] = 'Unapproved Links'; + $lang['Broken_items'] = 'Broken Links'; + $lang['Item_cat'] = 'Link in Category'; + $lang['Approve'] = 'Approve'; + $lang['Unapprove'] = 'Unapprove'; + + $lang['Sorry_auth_delete'] = 'Sorry, but you cannot delete links in this category.'; + $lang['Sorry_auth_mcp'] = 'Sorry, but you cannot moderate this category.'; + $lang['Sorry_auth_approve'] = 'Sorry, but you cannot approve links in this category.'; + $lang['Sorry_auth_view'] = 'Sorry, but you cannot view links in this category.'; + $lang['Sorry_auth_post'] = 'Sorry, but you cannot add links in this category.'; + + // // Search // *************** *** 64,87 **** // - // Rate - // - $lang['Not_allow_vote'] = 'Can\'t vote'; - $lang['Rate'] = 'Rate Link'; - $lang['Rerror'] = 'Sorry, you have already rated this link.'; - $lang['Rateinfo'] = 'You are about to rate the link <i><font color=#ff0000>{filename}</font></i>.<br>Please select a rating below. 1 is the worst, 10 is the best.'; - $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}. This makes the links new rating {newrating}.'; - $lang['R1'] = '1'; - $lang['R2'] = '2'; - $lang['R3'] = '3'; - $lang['R4'] = '4'; - $lang['R5'] = '5'; - $lang['R6'] = '6'; - $lang['R7'] = '7'; - $lang['R8'] = '8'; - $lang['R9'] = '9'; - $lang['R10'] = '10'; - $lang['Not_rated'] = 'Not Rated'; - - // // Java script messages and php errors // --- 103,106 ---- *************** *** 92,99 **** $lang['Link_logo_field'] = 'Please fill the Site Logo field'; $lang['Link_long_des_field'] = 'Please fill the Site Descritpion field'; - - // BEGIN linkdb $lang['Links_Title'] = 'Links'; - // END linkdb // --- 111,115 ---- *************** *** 115,127 **** $lang['Siteld'] = 'Site Description'; $lang['Siteldinfo'] = 'This is a description of the link. This will go on the link\'s information page so this description can be longer'; ! $lang['Link_logo'] = "Site Logo<br />Leave blank to use default image"; ! $lang['Link_logo_src'] = "%sx%s pixels"; ! $lang['Link_logo_src1'] = "%sx%s pixels, you can leave blank"; ! $lang['Preview'] = "Preview Logo"; $lang['Siteurl'] = 'Site URL'; $lang['Sitecat'] = 'Category'; $lang['Sitecatinfo'] = 'This is the category the link belongs in.'; $lang['Linkadded'] = 'The new link has been successfully added - we\'re taking you back to the category you submitted the link to'; ! $lang['Linkeedited'] = 'The link you selected has been successfully edited'; $lang['Lderror'] = 'You didn\'t select any links to delete'; $lang['Linksdeleted'] = 'The links you selected have been successfully deleted'; --- 131,144 ---- $lang['Siteld'] = 'Site Description'; $lang['Siteldinfo'] = 'This is a description of the link. This will go on the link\'s information page so this description can be longer'; ! $lang['Link_logo'] = 'Site Logo<br />Leave blank to use default image'; ! $lang['Link_logo_src'] = '%sx%s pixels'; ! $lang['Link_logo_src1'] = '%sx%s pixels, you can leave blank'; ! $lang['Preview'] = 'Preview Logo'; $lang['Siteurl'] = 'Site URL'; $lang['Sitecat'] = 'Category'; $lang['Sitecatinfo'] = 'This is the category the link belongs in.'; $lang['Linkadded'] = 'The new link has been successfully added - we\'re taking you back to the category you submitted the link to'; ! $lang['Linkedited'] = 'The link you selected has been successfully edited'; ! $lang['Linkdeleted'] = 'The link you selected has been successfully deleted'; $lang['Lderror'] = 'You didn\'t select any links to delete'; $lang['Linksdeleted'] = 'The links you selected have been successfully deleted'; *************** *** 129,131 **** --- 146,196 ---- $lang['Approved_info'] = 'Use this option to make the link available for users, and also to approve a link that has been submitted by the users.'; $lang['Link_hits'] = 'Hits'; + + // + // Comments + // + $lang['Linkdb_comment_prefix'] = '[ Linkdb ] '; + $lang['Comments'] = 'Comments'; + $lang['Comments_title'] = 'Comments Title'; + $lang['Comment_subject'] = 'Comment Subject'; + $lang['Comment'] = 'Comment'; + $lang['Comment_explain'] = 'Use the textbox above to give your opinion on this file!'; + $lang['Comment_add'] = 'Add Comment'; + $lang['Comment_delete'] = 'Delete'; + $lang['Comment_posted'] = 'Your comment has been entered successfully'; + $lang['Comment_deleted'] = 'The comment you selected has been deleted successfully'; + $lang['Comment_desc'] = 'Title'; + $lang['No_comments'] = 'Not Commented'; + $lang['Links_are_ON'] = 'Links are <u>ENABLED</u>'; + $lang['Links_are_OFF'] = 'Links are <u>DISABLED</u>'; + $lang['Images_are_ON'] = 'Images are <u>ENABLED</u>'; + $lang['Images_are_OFF'] = 'Images are <u>DISABLED</u>'; + $lang['Check_message_length'] = 'Check Message Length'; + $lang['Msg_length_1'] = 'Your message is '; + $lang['Msg_length_2'] = ' characters long.'; + $lang['Msg_length_3'] = 'You have '; + $lang['Msg_length_4'] = ' characters available.';; + $lang['Msg_length_5'] = 'There are '; + $lang['Msg_length_6'] = ' characters remaining.'; + + // + // Rate + // + $lang['Not_allow_vote'] = 'Can\'t vote'; + $lang['Rate'] = 'Rate Site'; + $lang['Do_rate'] = '[Rate Site]'; + $lang['Rerror'] = 'Sorry, you have already rated this site.'; + $lang['Rateinfo'] = 'You are about to rate the site <i><font color=#ff0000>{filename}</font></i>.<br>Please select a rating below. 1 is the worst, 10 is the best.'; + $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}. This makes the site\'s new rating {newrating}.'; + $lang['R1'] = '1'; + $lang['R2'] = '2'; + $lang['R3'] = '3'; + $lang['R4'] = '4'; + $lang['R5'] = '5'; + $lang['R6'] = '6'; + $lang['R7'] = '7'; + $lang['R8'] = '8'; + $lang['R9'] = '9'; + $lang['R10'] = '10'; + $lang['Not_rated'] = 'Not Rated'; ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_admin.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang_admin.php 5 Jul 2006 22:49:20 -0000 1.7 --- lang_admin.php 1 Aug 2006 21:02:19 -0000 1.8 *************** *** 52,56 **** $lang['site_url'] = 'Your url of your website'; - $lang['settings_link_page'] = 'Max links per page'; $lang['lock_submit_site'] = 'Lock user submit site'; $lang['interval'] = 'How fast the banners are displayed'; --- 52,55 ---- *************** *** 79,83 **** $lang['Sort_order_explain'] = ''; ! $lang['cat_col'] = 'How many column of categories are to be listed'; $lang['Nfdays'] = 'New Link Days'; --- 78,85 ---- $lang['Sort_order_explain'] = ''; ! $lang['Use_simple_navigation'] = 'Simple Category Navigation'; ! $lang['Use_simple_navigation_explain'] = 'If you prefer, this will generate more simple categories and other navigation'; ! ! $lang['Cat_col'] = 'How many column of categories are to be listed (only used for \'Simple Category Navigation\')'; $lang['Nfdays'] = 'New Link Days'; *************** *** 211,215 **** $lang['Catparentinfo'] = 'If you want this category to be a sub-category, select the category you want it to be a sub-category of.'; $lang['Allow_file'] = 'Allow Adding link'; ! $lang['Allow_file_info'] = 'If you not allow adding link to this category it will be higher level category and you can add category as a sub for this category, like in the forum.'; $lang['None'] = 'None'; $lang['Catedited'] = 'The category you selected has been successfully edited'; --- 213,217 ---- $lang['Catparentinfo'] = 'If you want this category to be a sub-category, select the category you want it to be a sub-category of.'; $lang['Allow_file'] = 'Allow Adding link'; ! $lang['Allow_file_info'] = 'If you are not allowed to add links in this category it will be a higher level category.'; $lang['None'] = 'None'; $lang['Catedited'] = 'The category you selected has been successfully edited'; *************** *** 256,260 **** $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; ! $lang['Comment_level'] = 'Comment Level'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; --- 258,265 ---- $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; ! $lang['View_Comment_level'] = 'View Comment'; ! $lang['Post_Comment_level'] = 'Post Comment'; ! $lang['Edit_Comment_level'] = 'Edit Comment'; ! $lang['Delete_Comment_level'] = 'Delete Comment'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; *************** *** 262,265 **** --- 267,318 ---- $lang['Approval_edit_level'] = 'Approval Edit Level'; + // These are displayed in the drop down boxes for advanced + // mode auth, try and keep them short! + $lang['Cat_NONE'] = 'NONE'; + $lang['Cat_ALL'] = 'ALL'; + $lang['Cat_REG'] = 'REG'; + $lang['Cat_PRIVATE'] = 'PRIVATE'; + $lang['Cat_MOD'] = 'MOD'; + $lang['Cat_ADMIN'] = 'ADMIN'; + + // + // Admin Panels - Custom Field + // + $lang['Fieldselecttitle'] = 'Select what to do'; + $lang['Afield'] = 'Custom Field: Add'; + $lang['Efield'] = 'Custom Field: Edit'; + $lang['Dfield'] = 'Custom Field: Delete'; + $lang['Mfieldtitle'] = 'Custom Fields'; + $lang['Afieldtitle'] = 'Add Field'; + $lang['Efieldtitle'] = 'Edit Field'; + $lang['Dfieldtitle'] = 'Delete Field'; + $lang['Fieldexplain'] = 'You can use the custom fields management section to add, edit, and delete custom fields. You can use custom fields to add more information about an article.'; + $lang['Fieldname'] = 'Field Name'; + $lang['Fieldnameinfo'] = 'This is the name of the field, for example \'File Size\''; + $lang['Fielddesc'] = 'Field Description'; + $lang['Fielddescinfo'] = 'This is a description of the field, for example \'File Size in Megabytes\''; + $lang['Fieldadded'] = 'The custom field has been successfully added'; + $lang['Fieldedited'] = 'The custom field you selected has been successfully edited'; + $lang['Dfielderror'] = 'You didn\'t select any fields to delete'; + $lang['Fieldsdel'] = 'The custom fields you selected have been successfully deleted'; + + $lang['Field_data'] = 'Options'; + $lang['Field_data_info'] = 'Enter the options that the user can choose from. Separate each option with a newline (carriage return).'; + $lang['Field_regex'] = 'Regular Expression'; + $lang['Field_regex_info'] = 'You may require the input field to match a regular expression %s(PCRE)%s.'; + $lang['Field_order'] = 'Display Order'; + + $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; + + // + // Admin Panels - Field Types + // + $lang['Field_Input'] = 'Single-Line Text Box'; + $lang['Field_Textarea'] = 'Multiple-Line Text Box'; + $lang['Field_Radio'] = 'Single-Selection Radio Buttons'; + $lang['Field_Select'] = 'Single-Selection Menu'; + $lang['Field_Select_multiple'] = 'Multiple-Selection Menu'; + $lang['Field_Checkbox'] = 'Multiple-Selection Checkbox'; + // //Java script messages and php errors |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:22
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb Modified Files: db_install.php db_upgrade.php linkdb.php Log Message: massive update Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_install.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** db_install.php 5 Jul 2006 22:49:20 -0000 1.13 --- db_install.php 1 Aug 2006 21:02:19 -0000 1.14 *************** *** 83,87 **** auth_post tinyint(3) NOT NULL DEFAULT '0', auth_rate tinyint(3) NOT NULL DEFAULT '0', ! auth_comment tinyint(3) NOT NULL DEFAULT '0', auth_edit tinyint(3) NOT NULL DEFAULT '0', auth_delete tinyint(3) NOT NULL DEFAULT '2', --- 83,90 ---- auth_post tinyint(3) NOT NULL DEFAULT '0', auth_rate tinyint(3) NOT NULL DEFAULT '0', ! auth_view_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_post_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_edit_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_delete_comment tinyint(3) NOT NULL DEFAULT '0', auth_edit tinyint(3) NOT NULL DEFAULT '0', auth_delete tinyint(3) NOT NULL DEFAULT '2', *************** *** 92,100 **** auth_post_groups smallint(5) NOT NULL default '0', auth_rate_groups smallint(5) NOT NULL default '0', ! auth_comment_groups smallint(5) NOT NULL default '0', auth_edit_groups smallint(5) NOT NULL default '0', auth_delete_groups smallint(5) NOT NULL default '0', ! auth_approval_groups smallint(5) NOT NULL default '0', ! auth_approval_edit_groups smallint(5) NOT NULL default '0', auth_moderator_groups smallint(5) NOT NULL default '0', --- 95,106 ---- auth_post_groups smallint(5) NOT NULL default '0', auth_rate_groups smallint(5) NOT NULL default '0', ! auth_view_comment_groups smallint(5) NOT NULL default '0', ! auth_post_comment_groups smallint(5) NOT NULL default '0', ! auth_edit_comment_groups smallint(5) NOT NULL default '0', ! auth_delete_comment_groups smallint(5) NOT NULL default '0', auth_edit_groups smallint(5) NOT NULL default '0', auth_delete_groups smallint(5) NOT NULL default '0', ! auth_approval_groups smallint(5) NOT NULL default '0', // not really used ! auth_approval_edit_groups smallint(5) NOT NULL default '0', // not really used auth_moderator_groups smallint(5) NOT NULL default '0', *************** *** 104,109 **** )", ! "INSERT INTO " . $mx_table_prefix . "linkdb_categories VALUES (1, 'PHP', '', '', '', '1', 0, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", ! "INSERT INTO " . $mx_table_prefix . "linkdb_categories VALUES (2, 'Bulletin Board', '', 1, '', '2', 1, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "CREATE TABLE " . $mx_table_prefix . "linkdb ( --- 110,115 ---- )", ! "INSERT INTO " . $mx_table_prefix . "linkdb_categories VALUES (1, 'PHP', '', '', '', '1', 0, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", ! "INSERT INTO " . $mx_table_prefix . "linkdb_categories VALUES (2, 'Bulletin Board', '', 1, '', '2', 1, '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', '-1', 0, '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)", "CREATE TABLE " . $mx_table_prefix . "linkdb ( *************** *** 182,186 **** "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('site_logo', 'http://" . $board_config['server_name'] . $board_config['script_path'] . "linkdb/images/web_logo88a.gif')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('site_url', 'http://" . $board_config['server_name'] . $board_config['script_path'] . "')", - "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_link_page', '10')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('display_interval', '6000')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('lock_submit_site', '0')", --- 188,191 ---- *************** *** 198,201 **** --- 203,207 ---- "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('pagination', '10')", + "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('use_simple_navigation', '1')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('cat_col', '2')", "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_newdays', '1')", Index: linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** linkdb.php 5 Jul 2006 22:49:20 -0000 1.11 --- linkdb.php 1 Aug 2006 21:02:19 -0000 1.12 *************** *** 123,132 **** // an array of all expected actions // ! $actions = array( 'category' => 'category', 'link' => 'link', 'viewall' => 'viewall', 'search' => 'search', 'rate' => 'rate', 'user_upload' => 'user_upload', 'main' => 'main' ); --- 123,136 ---- // an array of all expected actions // ! $actions = array( ! 'category' => 'category', 'link' => 'link', + 'jump' => 'jump', 'viewall' => 'viewall', 'search' => 'search', 'rate' => 'rate', 'user_upload' => 'user_upload', + 'post_comment' => 'post_comment', + 'mcp' => 'mcp', 'main' => 'main' ); *************** *** 157,159 **** --- 161,164 ---- include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } + ?> \ No newline at end of file Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_upgrade.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** db_upgrade.php 3 Jul 2006 20:11:30 -0000 1.14 --- db_upgrade.php 1 Aug 2006 21:02:19 -0000 1.15 *************** *** 85,89 **** $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_rate tinyint(3) NOT NULL DEFAULT '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete tinyint(3) NOT NULL DEFAULT '2' "; --- 85,92 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_rate tinyint(3) NOT NULL DEFAULT '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_view_comment tinyint(3) NOT NULL DEFAULT '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post_comment tinyint(3) NOT NULL DEFAULT '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit_comment tinyint(3) NOT NULL DEFAULT '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete_comment tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit tinyint(3) NOT NULL DEFAULT '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete tinyint(3) NOT NULL DEFAULT '2' "; *************** *** 94,98 **** $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_rate_groups smallint(5) NOT NULL default '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_comment_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete_groups smallint(5) NOT NULL default '0' "; --- 97,104 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_rate_groups smallint(5) NOT NULL default '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_view_comment_groups smallint(5) NOT NULL default '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_post_comment_groups smallint(5) NOT NULL default '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit_comment_groups smallint(5) NOT NULL default '0' "; ! $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete_comment_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_edit_groups smallint(5) NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb_categories ADD auth_delete_groups smallint(5) NOT NULL default '0' "; *************** *** 117,120 **** --- 123,127 ---- $sql[] = "DELETE FROM " . $mx_table_prefix . "linkdb_config" . " WHERE config_name = 'link_validation'"; $sql[] = "DELETE FROM " . $mx_table_prefix . "linkdb_config" . " WHERE config_name = 'email_notify'"; + $sql[] = "DELETE FROM " . $mx_table_prefix . "linkdb_config" . " WHERE config_name = 'display_logo_num'"; $sql[] = "UPDATE " . $mx_table_prefix . "linkdb_config" . " *************** *** 125,137 **** $sql[] = "UPDATE " . $mx_table_prefix . "linkdb_config" . " SET config_name = 'pagination' ! WHERE config_name = 'display_logo_num'"; // General ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('enable_module', '0') "; // settings_disable ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('module_name', 'Download Database') "; // settings_dbname ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('wysiwyg_path', 'modules/mx_shared/') "; // settings_dbname // Appearance ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_newdays', '1') "; // settings_dbname // Comments --- 132,145 ---- $sql[] = "UPDATE " . $mx_table_prefix . "linkdb_config" . " SET config_name = 'pagination' ! WHERE config_name = 'settings_link_page'"; // General ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('enable_module', '0') "; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('module_name', 'Download Database') "; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('wysiwyg_path', 'modules/mx_shared/') "; // Appearance ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('use_simple_navigation', '1') "; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "linkdb_config VALUES ('settings_newdays', '1') "; // Comments |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:02:22
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22573/modules/mx_linkdb/admin Modified Files: admin_linkdb.php Log Message: massive update Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_linkdb.php 3 Jul 2006 20:11:30 -0000 1.9 --- admin_linkdb.php 1 Aug 2006 21:02:19 -0000 1.10 *************** *** 16,21 **** $module['LinkDb_links']['0_Configuration'] = 'modules/mx_linkdb/admin/' . $filename . "?action=setting"; $module['LinkDb_links']['1_Cat_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=cat_manage"; ! $module['LinkDb_links']['2_Link_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=auth_manage"; ! $module['LinkDb_links']['3_Permissions'] = 'modules/mx_linkdb/admin/' . $filename . "?action=link_manage"; $module['LinkDb_links']['5_Custom_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=custom_manage"; return; --- 16,21 ---- $module['LinkDb_links']['0_Configuration'] = 'modules/mx_linkdb/admin/' . $filename . "?action=setting"; $module['LinkDb_links']['1_Cat_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=cat_manage"; ! $module['LinkDb_links']['2_Link_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=link_manage"; ! $module['LinkDb_links']['3_Permissions'] = 'modules/mx_linkdb/admin/' . $filename . "?action=auth_manage"; $module['LinkDb_links']['5_Custom_manage'] = 'modules/mx_linkdb/admin/' . $filename . "?action=custom_manage"; return; *************** *** 53,57 **** 'cat_manage' => 'cat_manage', 'auth_manage' => 'auth_manage', ! 'link_manage' => 'link_manage' ); // --- 53,58 ---- 'cat_manage' => 'cat_manage', 'auth_manage' => 'auth_manage', ! 'link_manage' => 'link_manage', ! 'custom_manage' => 'custom_manage' ); // |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:01:11
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb Modified Files: db_install.php db_upgrade.php kb.php Log Message: Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** kb.php 5 Jul 2006 22:48:25 -0000 1.37 --- kb.php 1 Aug 2006 21:00:37 -0000 1.38 *************** *** 168,171 **** --- 168,172 ---- 'stats' => 'stats', 'moderate' => 'moderator', + 'mcp' => 'mcp', 'post_comment' => 'post_comment', 'main' => 'main' ); Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_install.php,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** db_install.php 5 Jul 2006 22:48:25 -0000 1.43 --- db_install.php 1 Aug 2006 21:00:37 -0000 1.44 *************** *** 84,88 **** auth_post tinyint(3) NOT NULL DEFAULT '0', auth_rate tinyint(3) NOT NULL DEFAULT '0', ! auth_comment tinyint(3) NOT NULL DEFAULT '0', auth_edit tinyint(3) NOT NULL DEFAULT '0', auth_delete tinyint(3) NOT NULL DEFAULT '2', --- 84,91 ---- auth_post tinyint(3) NOT NULL DEFAULT '0', auth_rate tinyint(3) NOT NULL DEFAULT '0', ! auth_view_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_post_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_edit_comment tinyint(3) NOT NULL DEFAULT '0', ! auth_delete_comment tinyint(3) NOT NULL DEFAULT '2', auth_edit tinyint(3) NOT NULL DEFAULT '0', auth_delete tinyint(3) NOT NULL DEFAULT '2', *************** *** 93,101 **** auth_post_groups smallint(5) NOT NULL default '0', auth_rate_groups smallint(5) NOT NULL default '0', ! auth_comment_groups smallint(5) NOT NULL default '0', auth_edit_groups smallint(5) NOT NULL default '0', auth_delete_groups smallint(5) NOT NULL default '0', ! auth_approval_groups smallint(5) NOT NULL default '0', ! auth_approval_edit_groups smallint(5) NOT NULL default '0', auth_moderator_groups smallint(5) NOT NULL default '0', --- 96,107 ---- auth_post_groups smallint(5) NOT NULL default '0', auth_rate_groups smallint(5) NOT NULL default '0', ! auth_view_comment_groups smallint(5) NOT NULL default '0', ! auth_post_comment_groups smallint(5) NOT NULL default '0', ! auth_edit_comment_groups smallint(5) NOT NULL default '0', ! auth_delete_comment_groups smallint(5) NOT NULL default '0', auth_edit_groups smallint(5) NOT NULL default '0', auth_delete_groups smallint(5) NOT NULL default '0', ! auth_approval_groups smallint(5) NOT NULL default '0', // not really used ! auth_approval_edit_groups smallint(5) NOT NULL default '0', // not really used auth_moderator_groups smallint(5) NOT NULL default '0', *************** *** 105,109 **** )", ! "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category', 'Just a test category', '0', '10', '-1', '-1','-1','-1','-1','-1','-1','-1', '-1', '0', '', '0', '0', '0', '0', '0', '0', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0' )", "CREATE TABLE " . $mx_table_prefix . "kb_articles ( --- 111,115 ---- )", ! "INSERT INTO " . $mx_table_prefix . "kb_categories VALUES (1, 'Test Category', 'Just a test category', '0', '10', '-1', '-1','-1','-1','-1','-1','-1','-1', '-1', '0', '', '0', '0', '0', '0', '0', '0', '0', '2', '0', '2', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0' )", "CREATE TABLE " . $mx_table_prefix . "kb_articles ( *************** *** 215,218 **** --- 221,225 ---- "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('header_banner', '0')", + "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_simple_navigation', '1')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('cat_col', '2')", "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('settings_newdays', '1')", Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/db_upgrade.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** db_upgrade.php 5 Jul 2006 22:48:25 -0000 1.36 --- db_upgrade.php 1 Aug 2006 21:00:37 -0000 1.37 *************** *** 415,418 **** --- 415,428 ---- $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories MODIFY cat_order int(50) default NULL "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories CHANGE auth_comment auth_view_comment tinyint(3) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_post_comment tinyint(3) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_edit_comment tinyint(3) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_delete_comment tinyint(3) NOT NULL DEFAULT '0' "; + + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories CHANGE auth_comment_groups auth_view_comment_groups smallint(5) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_post_comment_groups smallint(5) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_edit_comment_groups smallint(5) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_categories ADD auth_delete_comment_groups smallint(5) NOT NULL DEFAULT '0' "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_votes ADD rate_point tinyint(3) unsigned NOT NULL default '0' "; $sql[] = "ALTER TABLE " . $mx_table_prefix . "kb_votes CHANGE votes_userid user_id mediumint(8) NOT NULL default '0' "; *************** *** 420,423 **** --- 430,434 ---- // Appearance + $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('use_simple_navigation', '1') "; $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('cat_col', '2') "; $sql[] = "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('settings_newdays', '1') "; |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:01:10
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/admin Modified Files: admin_kb.php Log Message: Index: admin_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_kb.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_kb.php 1 Aug 2006 21:00:36 -0000 1.2 *************** *** 43,47 **** // Left Pane Paths // ! $setmodules_module_path = './../modules/mx_kb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; --- 43,48 ---- // Left Pane Paths // ! $setmodules_root_path = './../'; ! $setmodules_module_path = 'modules/mx_kb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; *************** *** 54,58 **** if ( !empty( $setmodules ) ) { ! include_once( $setmodules_module_path . 'kb/includes/kb_constants.' . $phpEx ); $filename = basename( __FILE__ ); --- 55,59 ---- if ( !empty( $setmodules ) ) { ! include_once( $setmodules_root_path . $setmodules_module_path . 'kb/includes/kb_constants.' . $phpEx ); $filename = basename( __FILE__ ); |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:00:43
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/templates/subSilver Modified Files: kb_article_body.tpl kb_cat_body.tpl kb_comment_posting.tpl kb_header.tpl kb_index_body.tpl kb_post_body.tpl kb_stats_body.tpl subSilver.cfg Added Files: kb_mcp.tpl Log Message: --- NEW FILE: kb_mcp.tpl --- <script language='javascript'> <!-- var addItem = false; var deleteItem = false; function set_add_item(status) { addItem = status; } function set_delete_item(status) { deleteItem = status; } function delete_item(theURL) { if (confirm('Are you sure you want to delete this item??')) { window.location.href=theURL; } else { alert ('No Action has been taken.'); } } function disable_cat_list() { if(document.form.mode_mcp.options[document.form.mode_mcp.selectedIndex].value != 'cat') { document.form.cat_id.selectedIndex = '0'; document.form.cat_id.disabled = true; } if(document.form.mode_mcp.options[document.form.mode_mcp.selectedIndex].value == 'cat') { document.form.cat_id.disabled = false; } } // // Taking from the Attachment MOD of Acyd Burn // function select(status) { for (i = 0; i < document.ids.length; i++) { document.ids.elements[i].checked = status; } } function check() { if(addItem) { return true; } for (i = 0; i < document.ids.length; i++) { if(document.ids.elements[i].checked == true) { if(deleteItem) { if (confirm('Are you sure you want to delete these items??')) { return true; } else { return false; } } return true; } } alert('Please Select at least one item.'); return false; } --> </script> <body onLoad="disable_cat_list();"> <form method="post" action="{S_ACTION}" name="form"> <table width="100%" cellpadding="3" cellspacing="1"> <tr> <td> <br /><b><span class="genmed">{L_MODE}:</span></b> <select name="mode_mcp" onchange="disable_cat_list();">{S_MODE_SELECT}</select> <b><span class="genmed">{L_CATEGORY}:</span></b> {S_CAT_LIST} <input type="submit" class="liteoption" name="go" value="{L_GO}" /> </td> </tr> </table> {S_HIDDEN_FIELDS} </form> <form method="post" action="{S_ACTION}" name="ids" onsubmit="return check();"> <table width="100%" cellpadding="2" cellspacing="2"> <tr> <td valign="bottom"> <span class="nav"><a href="{U_ARTICLES}" class="nav">{ARTICLES}</a> » {L_MCP_TITLE}</span> </td> </tr> </table> <!-- BEGIN mcp_mode --> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> <tr> <th colspan="6" class="thHead"> {mcp_mode.L_MODE}</span></th> </tr> <!-- BEGIN row --> <tr> <td class="row1" align="center" width="5%"><span class="genmed">{mcp_mode.row.NUMBER}</span></td> <td class="row1" width="50%"><span class="genmed">{mcp_mode.row.NAME}</span></td> <td class="row1" align="center" width="10%"><span class="gen"><a href="{mcp_mode.row.U_EDIT}">{L_EDIT}</a></span></td> <td class="row1" align="center" width="10%"><span class="gen"><a href="javascript:delete_item('{mcp_mode.row.U_DELETE}')">{L_DELETE}</a></span></td> <td class="row1" align="center" width="20%"><span class="gen"><a href="{mcp_mode.row.U_APPROVE}">{mcp_mode.row.L_APPROVE}</a></span></td> <td class="row1" align="center" width="5%"><span class="genmed"><input type="checkbox" name="ids[]" value="{mcp_mode.row.ID}" /></span></td> </tr> <!-- END row --> <!-- BEGIN no_data --> <tr> <td class="row1" align="center"><span class="gen">{L_NO_ITEMS}</span></td> </tr> <!-- END no_data --> </table> <br /> <!-- END mcp_mode --> <table width="100%" cellspacing="2" border="0" cellpadding="2"> <tr> <td align="right" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> </tr> <tr> <td align="right" nowrap="nowrap"><span class="nav">{PAGE_NUMBER}</span></td> </tr> </table> <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> <tr> <td class="cat" align="center"> {S_HIDDEN_FIELDS} <input type="submit" class="mainoption" name="do_approve" value="{L_APPROVE_ITEM}" onClick="set_add_item(true); set_delete_item(false);" /> <input type="submit" class="mainoption" name="do_unapprove" value="{L_UNAPPROVE_ITEM}" onClick="set_add_item(true); set_delete_item(false);" /> <input type="submit" class="liteoption" name="do_delete" value="{L_DELETE_ITEM}" onClick="set_add_item(false); set_delete_item(true);" /> </td> </tr> </table> </form> Index: kb_comment_posting.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_comment_posting.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kb_comment_posting.tpl 5 Jul 2006 22:48:26 -0000 1.4 --- kb_comment_posting.tpl 1 Aug 2006 21:00:39 -0000 1.5 *************** *** 266,271 **** <table width="100%" cellpadding="2" cellspacing="2"> <tr> ! <td valign="bottom"> ! <span class="nav"><a href="{U_DOWNLOAD_HOME}" class="nav">{DOWNLOAD}</a><!-- BEGIN navlinks --> » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a><!-- END navlinks --> -> <a href="{U_FILE_NAME}" class="nav">{FILE_NAME}</a> » {L_COMMENT_ADD}</span> </td> </tr> --- 266,275 ---- <table width="100%" cellpadding="2" cellspacing="2"> <tr> ! <td valign="bottom" nowrap="nowrap"> ! <span class="nav"><a href="{U_LINK}" class="nav">{LINKS}</a> ! <!-- BEGIN navlinks --> ! » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> ! <!-- END navlinks --> ! </span> </td> </tr> Index: kb_stats_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_stats_body.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_stats_body.tpl 5 Apr 2006 21:19:50 -0000 1.6 --- kb_stats_body.tpl 1 Aug 2006 21:00:39 -0000 1.7 *************** *** 2,67 **** <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> {PATH} </td> </tr> </table> ! <!-- BEGIN switch_sub_cats --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" nowrap="nowrap"> {L_CATEGORY} </th> ! <th width="50" class="thCornerR" nowrap="nowrap"> {L_ARTICLES} </th> ! </tr> ! <!-- BEGIN catrow --> ! <tr> ! <td class="row1" height="50"><span class="forumlink">{switch_sub_cats.catrow.CATEGORY}</span><br /><span class="genmed">{switch_sub_cats.catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{switch_sub_cats.catrow.CAT_ARTICLES}</span></td> ! </tr> ! <!-- END catrow --> ! <tr> ! <td class="cat" colspan="2"> </td> ! </tr> ! </table> ! <br /> ! <!-- END switch_sub_cats --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th class="thCornerL" nowrap="nowrap"> {L_ARTICLE} </th> ! <th class="thTop" nowrap="nowrap"> {L_CAT} </th> ! <th class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> ! <th class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th class="thTop" nowrap="nowrap"> {L_ARTICLE_DATE} </th> ! <th class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> ! </tr> ! <!-- BEGIN articlerow --> ! <tr> ! <td class="row2" align="left" valign="middle">{articlerow.ARTICLE}</td> ! <td class="row2" align="center" valign="middle"> <span class="genmed">{articlerow.CATEGORY}</span> </td> ! <td class="row2" align="center" valign="middle"> <span class="genmed">{articlerow.ARTICLE_TYPE}</span> </td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{articlerow.ARTICLE_AUTHOR}</span></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="gensmall">{articlerow.ARTICLE_DATE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{articlerow.ART_VIEWS}</span></td> ! </tr> ! <tr> ! <td class="row1" align="left" colspan="4"><span class="genmed">{articlerow.ARTICLE_DESCRIPTION}</span></td> ! <td class="row1" align="right" colspan="2" >{articlerow.U_APPROVE} {articlerow.U_DELETE}</td> ! </tr> ! <!-- END articlerow --> ! <!-- BEGIN no_articles --> ! <tr> ! <td class="row1" align = "center" colspan = "6" height="50"><span class="genmed">{no_articles.COMMENT}</span></td> ! </tr> ! <!-- END no_articles --> <tr> ! <td class="cat" colspan="6"> </td> ! </tr> </table> ! <!-- BEGIN pagination --> ! <table width="100%" cellspacing="2" cellpadding="0" border="0"> <tr> ! <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="left" ><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td> </tr> </table> - <!-- END pagination --> --- 2,47 ---- <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> ! <!-- BEGIN navlinks --> ! » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> ! <!-- END navlinks --> </td> </tr> </table> ! <table width="100%" cellpadding="0" cellspacing="0" class="forumline"> <tr> ! <td> ! <table width="100%" cellpadding="3" cellspacing="1"> ! <tr> ! <th class="thHead" colspan="2">{L_ARTICLES}</th> ! </tr> ! <!-- BEGIN articlerow --> ! <tr> ! <td rowspan="2" class="{articlerow.COLOR}" valign="middle"> <img src="{articlerow.ARTICLE_IMAGE}" border="0" class="mx_icon"></td> ! <td width="100%" class="{articlerow.COLOR}"> ! <a href="{articlerow.U_ARTICLE}" class="topictitle">{articlerow.ARTICLE}</a> ! <br><span class="genmed">{articlerow.ARTICLE_DESCRIPTION}</span> ! </td> ! </tr> ! <tr> ! <td valign="top" align="left" class="{articlerow.COLOR}"><span class="gensmall">{L_ARTICLE_TYPE}: {articlerow.ARTICLE_TYPE} • {L_ARTICLE_DATE}: {articlerow.ARTICLE_DATE} • {L_VIEWS}: {articlerow.ART_VIEWS} • {L_ARTICLE_AUTHOR}: {articlerow.ARTICLE_AUTHOR} ! <!-- BEGIN show_ratings --> ! • {articlerow.L_RATING}: {articlerow.RATING} ({articlerow.ARTICLE_VOTES} {L_VOTES}) ! <!-- END show_ratings --> ! </span> ! </td> ! </tr> ! <!-- END articlerow --> ! ! </table> ! </td> ! </tr> </table> ! <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> <tr> ! <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> ! <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> </tr> </table> Index: kb_header.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_header.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** kb_header.tpl 5 Jul 2006 22:48:26 -0000 1.10 --- kb_header.tpl 1 Aug 2006 21:00:39 -0000 1.11 *************** *** 3,52 **** <td> <table width="100%" cellspacing="0" cellpadding="2" border="0"> ! <tr> {L_KB_TITLE} </tr> <tr> ! <td align="center" class="row1"> ! <!-- BEGIN switch_add_article --> ! <span class="nav">{L_ADD_ARTICLE}</span> ! <!-- END switch_add_article --> ! <span class="nav">{L_SEARCH_MODULE}</span></td> ! </tr> ! <tr> ! <td align="center" class="row2"> ! <span class="nav">:: ! <a href="{U_MOST_POPULAR}" class="nav">{L_MOST_POPULAR}</a> :: ! <a href="{U_TOPRATED}" class="nav">{L_TOPRATED}</a> :: ! <a href="{U_LATEST}" class="nav">{L_LATEST}</a> :: ! </span> </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <br /> ! <table width="100%" cellspacing="0" cellpadding="0" border="0"> ! <!-- BEGIN switch_quick_stats --> ! <tr valign="top"> ! <td width="100%"> ! <table width="100%" cellspacing="0" cellpadding="2" border="0" class="forumline" > <tr> ! <th class="thTop" colspan="2"> {switch_quick_stats.L_QUICK_STATS} </td> </tr> <tr> ! <td class="row2" width = "100%" align="center"> ! <span class="gensmall"> ! {switch_quick_stats.STATS} ! </span> </td> </tr> ! </table> </td> ! </tr> ! <!-- END switch_quick_stats --> <tr valign="top"> <td> --- 3,56 ---- <td> <table width="100%" cellspacing="0" cellpadding="2" border="0"> ! <tr> {L_KB_TITLE} </tr> + <tr> ! <td align="center" class="row1"> ! <span class="gen"> <a href="{U_SEARCH}" class="gen">{L_SEARCH}</a> ! <!-- BEGIN switch_add_article --> ! • <a href="{U_ADD_ARTICLE}" class="gen"><b>{L_ADD_ARTICLE}</b></a> ! <!-- END switch_add_article --> ! <!-- BEGIN MCP --> ! • <a href="{U_MCP}" class="gen"><b>{L_MCP}</b></a> ! <!-- END MCP --> ! </span> ! <br /> ! <span class="genmed"> ! <a href="{U_MOST_POPULAR}" class="gensmall">{L_MOST_POPULAR}</a> ! <!-- BEGIN switch_toprated --> ! • <a href="{U_TOPRATED}" class="gensmall">{L_TOPRATED}</a> ! <!-- END switch_toprated --> ! • <a href="{U_LATEST}" class="gensmall">{L_LATEST}</a> ! </span> ! <br /><hr> </td> ! </tr> ! <!-- BEGIN switch_quick_stats --> <tr> ! <td class="cat" align="center"> ! <span class="nav"> ! {switch_quick_stats.L_QUICK_STATS} ! </span> ! </td> </tr> <tr> ! <td class="row1" width = "100%" align="center"> ! <span class="gensmall"> ! {switch_quick_stats.STATS} ! </span> </td> </tr> + <!-- END switch_quick_stats --> ! </table> </td> ! </tr> ! </table> ! <br /> + <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> Index: subSilver.cfg =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/subSilver.cfg,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** subSilver.cfg 28 Jun 2006 13:58:08 -0000 1.2 --- subSilver.cfg 1 Aug 2006 21:00:39 -0000 1.3 *************** *** 43,48 **** $mx_images['kb_comment_post'] = "$current_template_images/{LANG}/icon_kb_post_comment.gif"; // ------------------------------------------------------------------------- ! // Redefine phpBB images // ------------------------------------------------------------------------- $mx_images['kb_icon_minipost'] = $images['icon_minipost']; --- 43,58 ---- $mx_images['kb_comment_post'] = "$current_template_images/{LANG}/icon_kb_post_comment.gif"; + // + // Article and Category lists + // + //$mx_images['kb_article'] = $images['icon_minipost']; // Article Row + $mx_images['kb_article'] = $mx_root_path . $images['mx_graphics']['menu_icons'] . '/' ."icon_message.gif"; // Article Row + //$mx_images['kb_article_new'] = $images['icon_minipost_new']; // Article Row + $mx_images['kb_article_new'] = $mx_root_path . $images['mx_graphics']['menu_icons'] . '/' ."icon_message_hot.gif"; // Article Row + $mx_images['kb_category'] = $images['folder']; // Category Row + $mx_images['kb_category_new'] = $images['folder_new']; // Category Row + // ------------------------------------------------------------------------- ! // Redefine phpBB images (Commenting) // ------------------------------------------------------------------------- $mx_images['kb_icon_minipost'] = $images['icon_minipost']; *************** *** 59,62 **** // $mx_images['kb_last_article_folder'] = $images['folder']; ! $mx_images['kb_icon_latest_reply'] = $images['icon_latest_reply']; ?> \ No newline at end of file --- 69,72 ---- // $mx_images['kb_last_article_folder'] = $images['folder']; ! $mx_images['kb_icon_latest_reply'] = $images['icon_latest_reply']; ?> \ No newline at end of file Index: kb_index_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_index_body.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_index_body.tpl 27 Jun 2006 18:13:46 -0000 1.7 --- kb_index_body.tpl 1 Aug 2006 21:00:39 -0000 1.8 *************** *** 5,37 **** </table> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" > <tr> <th class="thCornerL" width="6%"> </th> <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> </tr> <!-- BEGIN catrow --> <tr> ! <td class="row1" align="center" valign="middle"><img src="{catrow.CAT_IMAGE}" border="0" alt="{catrow.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';" ><span class="forumlink">{catrow.CATEGORY}</span><br /><span class="genmed">{catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{catrow.CAT_ARTICLES}</span></td> </tr> ! <!-- BEGIN sub --> <tr> <td class="row2" width="6%"> </td> ! <td class="row2" ><span class="genmed"><b>{catrow.L_SUB_CAT}:</b> {catrow.sub.SUB_CAT_LIST}</span></td> <td class="row2" align="center" valign="middle"> </td> </tr> ! <!-- END sub --> <!-- END catrow --> <!-- BEGIN no_cats --> <tr> ! <td class="row1" align="center" colspan="3" height="50"><span class="genmed">{no_cats.COMMENT}</span></td> </tr> <!-- END no_cats --> <tr> ! <td class="cat" colspan="3"> </td> </tr> </table> --- 5,71 ---- </table> + <!-- BEGIN CAT_NAV_STANDARD --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" > <tr> <th class="thCornerL" width="6%"> </th> <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> + <th class="thCornerR" width="10%"> {L_LAST_ARTICLE} </th> <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> </tr> <!-- BEGIN catrow --> + <!-- BEGIN catcol --> <tr> ! <td class="row1" align="center" valign="middle"><img src="{CAT_NAV_STANDARD.catrow.catcol.CAT_IMAGE}" border="0" alt="{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';" ><a href="{CAT_NAV_STANDARD.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_STANDARD.catrow.catcol.CATEGORY}</a><br /><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.LAST_ARTICLE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_ARTICLES}</span></td> </tr> ! <!-- BEGIN show_subs --> <tr> <td class="row2" width="6%"> </td> ! <td class="row2" colspan="2"><span class="genmed"><b>{CAT_NAV_STANDARD.catrow.catcol.L_SUB_CAT}:</b> {CAT_NAV_STANDARD.catrow.catcol.SUB_CAT}</span></td> <td class="row2" align="center" valign="middle"> </td> </tr> ! <!-- END show_subs --> ! <!-- END catcol --> <!-- END catrow --> <!-- BEGIN no_cats --> <tr> ! <td class="row1" align="center" colspan="4" height="50"><span class="genmed">{CAT_NAV_STANDARD.no_cats.COMMENT}</span></td> </tr> <!-- END no_cats --> <tr> ! <td class="cat" colspan="4"> </td> </tr> </table> + <br> + <!-- END CAT_NAV_STANDARD --> + <!-- BEGIN CAT_NAV_SIMPLE --> + <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> + <tr> + <th class="thHead">{L_CATEGORIES}</th> + </tr> + <tr><td class="row1"> + <table border="0" cellpadding="5" cellspacing="1" width="100%"> + <!-- BEGIN catrow --> + <tr> + <!-- BEGIN catcol --> + <td width="{WIDTH}%"> + <table border="0" cellpadding="2" cellspacing="2" width="100%"> + <tr> + <td><a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CATEGORY}"><img src="{CAT_NAV_SIMPLE.catrow.catcol.CAT_IMAGE}" alt="{CAT_NAV_SIMPLE.catrow.catcol.CAT_DESCRIPTION}" align="absmiddle" border="0" /></a></td> + <td width="100%" valign="middle" nowrap="nowrap"><a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_SIMPLE.catrow.catcol.CATEGORY}</a> <span class="gensmall">({CAT_NAV_SIMPLE.catrow.catcol.CAT_ARTICLES})</span><br> + {CAT_NAV_SIMPLE.catrow.catcol.SUB_CAT} + </td> + </tr></table> + </td> + <!-- END catcol --> + </tr> + <!-- END catrow --> + </table> + </td></tr> + </table> + <br /> + <!-- END CAT_NAV_SIMPLE --> Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** kb_article_body.tpl 28 Jun 2006 13:58:08 -0000 1.18 --- kb_article_body.tpl 1 Aug 2006 21:00:39 -0000 1.19 *************** *** 2,6 **** <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> {PATH} </td> <td align="right" class="nav"> --- 2,9 ---- <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> ! <!-- BEGIN navlinks --> ! » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> ! <!-- END navlinks --> </td> <td align="right" class="nav"> *************** *** 25,30 **** <!-- BEGIN switch_ratings --> <hr> ! <span class="gensmall"><b>{L_RATINGS}</b></span> <span class="gensmall">{switch_ratings.RATING} </span> ! <span class="gensmall">[<a href="{switch_ratings.U_RATE}" class="gensmall">{switch_ratings.L_RATE}</a>]</span> <!-- END switch_ratings --> </td> --- 28,33 ---- <!-- BEGIN switch_ratings --> <hr> ! <span class="gensmall"><b>{L_RATINGS}</b></span> <span class="gensmall">{switch_ratings.RATING} ({switch_ratings.VOTES} {switch_ratings.L_VOTES})</span> ! <span class="gensmall"><a href="{switch_ratings.U_RATE}" class="gensmall">{switch_ratings.DO_RATE}</a></span> <!-- END switch_ratings --> </td> Index: kb_cat_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_cat_body.tpl,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** kb_cat_body.tpl 5 Apr 2006 21:19:50 -0000 1.13 --- kb_cat_body.tpl 1 Aug 2006 21:00:39 -0000 1.14 *************** *** 2,76 **** <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> {PATH} </td> </tr> </table> ! <!-- BEGIN show_subs --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> ! <tr> <th class="thCornerL" width="6%"> </th> <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> </tr> - <!-- END show_subs --> <!-- BEGIN catrow --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{catrow.CAT_IMAGE}" border="0" alt="{catrow.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';"><span class="forumlink">{catrow.CATEGORY}</span><br /><span class="genmed">{catrow.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{catrow.CAT_ARTICLES}</span></td> </tr> ! <!-- BEGIN sub --> ! <tr> ! <th class="row1" width="6%"> </th> ! <td class="row1" ><span class="genmed"><b>{catrow.L_SUB_CAT}:</b> {catrow.sub.SUB_CAT_LIST}</span></td> ! <td class="row2" align="center" valign="middle"> </td> ! </tr> ! <!-- END sub --> ! <!-- END catrow --> ! <!-- BEGIN show_subs --> <tr> ! <td class="cat" colspan="3"> </td> </tr> ! </table> ! <!-- END show_subs --> ! <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> ! <tr> ! <th width="35%" class="thCornerL" nowrap="nowrap"> {L_ARTICLE} </th> ! <th width="20%" class="thTop" nowrap="nowrap"> {L_ARTICLE_TYPE} </th> ! <th width="25%" class="thTop" nowrap="nowrap"> {L_ARTICLE_AUTHOR} </th> ! <th width="15%" class="thTop" nowrap="nowrap"> {L_ARTICLE_DATE} </th> ! <th width="5%" class="thCornerR" nowrap="nowrap"> {L_VIEWS} </th> ! </tr> ! <!-- BEGIN articlerow --> ! <tr> ! <td width="35%" class="row2" align="left" valign="middle" onmouseout="this.className='row2';" onmouseover="this.className='row3';"><span class="cattitle">{articlerow.ARTICLE}</span></td> ! <td width="20%" class="row2" align="center" valign="middle"><span class="genmed">{articlerow.ARTICLE_TYPE}</span></td> ! <td width="25%" class="row2" align="center" valign="middle"><span class="genmed">{articlerow.ARTICLE_AUTHOR}</span></td> ! <td width="15%" class="row2" align="center" valign="middle" nowrap="nowrap"><span class="gensmall">{articlerow.ARTICLE_DATE}</span></td> ! <td width="5%" class="row2" align="center" valign="middle"><span class="genmed">{articlerow.ART_VIEWS}</span></td> ! </tr> <tr> ! <td class="row1" align="left" colspan="3"><span class="genmed">{articlerow.ARTICLE_DESCRIPTION}</span></td> ! <td class="row1" align="right" colspan="2" >{articlerow.U_APPROVE} {articlerow.U_DELETE}</td> </tr> ! <!-- END articlerow --> ! <!-- BEGIN no_articles --> ! <tr> ! <td class="row1" align="center" colspan="5" height="50"><span class="genmed">{no_articles.COMMENT}</span></td> </tr> ! <!-- END no_articles --> <tr> ! <td class="cat" colspan="5"> </td> </tr> </table> ! <!-- BEGIN pagination --> ! <table width="100%" cellspacing="2" cellpadding="0" border="0"> <tr> ! <td valign="top" align="left" ><span class="nav">{PAGE_NUMBER}</span></td> ! <td valign="top" align="right" ><span class="nav">{PAGINATION}</span></td> </tr> </table> ! <!-- END pagination --> --- 2,152 ---- <tr> <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> ! <!-- BEGIN navlinks --> ! » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> ! <!-- END navlinks --> </td> </tr> </table> ! <!-- BEGIN CAT_NAV_STANDARD --> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" > ! <tr> <th class="thCornerL" width="6%"> </th> <th class="thTop" nowrap="nowrap"> {L_CATEGORY} </th> + <th class="thCornerR" width="10%"> {L_LAST_ARTICLE} </th> <th class="thCornerR" width="50" nowrap="nowrap"> {L_ARTICLES} </th> </tr> <!-- BEGIN catrow --> ! <!-- BEGIN catcol --> ! <tr> ! <td class="row1" align="center" valign="middle"><img src="{CAT_NAV_STANDARD.catrow.catcol.CAT_IMAGE}" border="0" alt="{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}"></td> ! <td class="row1" onmouseout="this.className='row1';" onmouseover="this.className='row2';" ><a href="{CAT_NAV_STANDARD.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_STANDARD.catrow.catcol.CATEGORY}</a><br /><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_DESCRIPTION}</span></td> ! <td class="row2" align="center" valign="middle" nowrap="nowrap"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.LAST_ARTICLE}</span></td> ! <td class="row2" align="center" valign="middle"><span class="genmed">{CAT_NAV_STANDARD.catrow.catcol.CAT_ARTICLES}</span></td> </tr> ! <!-- BEGIN show_subs --> <tr> ! <td class="row2" width="6%"> </td> ! <td class="row2" colspan="2"><span class="genmed"><b>{CAT_NAV_STANDARD.catrow.catcol.L_SUB_CAT}:</b> {CAT_NAV_STANDARD.catrow.catcol.SUB_CAT}</span></td> ! <td class="row2" align="center" valign="middle"> </td> </tr> ! <!-- END show_subs --> ! <!-- END catcol --> ! <!-- END catrow --> ! <!-- BEGIN no_cats --> <tr> ! <td class="row1" align="center" colspan="4" height="50"><span class="genmed">{CAT_NAV_STANDARD.no_cats.COMMENT}</span></td> </tr> ! <!-- END no_cats --> ! <tr> ! <td class="cat" colspan="4"> </td> </tr> ! </table> ! <br> ! <!-- END CAT_NAV_STANDARD --> ! ! <!-- BEGIN CAT_NAV_SIMPLE --> ! <table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> <tr> ! <th class="thHead">{L_CATEGORIES}</th> </tr> + <tr><td class="row1"> + <table border="0" cellpadding="5" cellspacing="1" width="100%"> + <!-- BEGIN catrow --> + <tr> + <!-- BEGIN catcol --> + <td width="{WIDTH}%"> + <table border="0" cellpadding="2" cellspacing="2" width="100%"> + <tr> + <td><a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CATEGORY}"><img src="{CAT_NAV_SIMPLE.catrow.catcol.CAT_IMAGE}" alt="{CAT_NAV_SIMPLE.catrow.catcol.CAT_DESCRIPTION}" align="absmiddle" border="0" /></a></td> + <td width="100%" valign="middle" nowrap="nowrap"><a href="{CAT_NAV_SIMPLE.catrow.catcol.U_CATEGORY}" class="cattitle">{CAT_NAV_SIMPLE.catrow.catcol.CATEGORY}</a> <span class="gensmall">({CAT_NAV_SIMPLE.catrow.catcol.CAT_ARTICLES})</span><br> + {CAT_NAV_SIMPLE.catrow.catcol.SUB_CAT} + </td> + </tr></table> + </td> + <!-- END catcol --> + </tr> + <!-- END catrow --> + </table> + </td></tr> </table> + <br /> + <!-- END CAT_NAV_SIMPLE --> ! <!-- BEGIN ARTICLELIST --> ! <table width="100%" cellpadding="0" cellspacing="0" class="forumline"> <tr> ! <td> ! <table width="100%" cellpadding="3" cellspacing="1"> ! <tr> ! <th class="thHead" colspan="2">{L_ARTICLES}</th> ! </tr> ! <!-- BEGIN articlerow --> ! <tr> ! <td rowspan="2" class="{ARTICLELIST.articlerow.COLOR}" valign="middle"> <img src="{ARTICLELIST.articlerow.ARTICLE_IMAGE}" border="0" class="mx_icon"></td> ! <td width="100%" class="{ARTICLELIST.articlerow.COLOR}"> ! <a href="{ARTICLELIST.articlerow.U_ARTICLE}" class="topictitle">{ARTICLELIST.articlerow.ARTICLE}</a> ! <br><span class="genmed">{ARTICLELIST.articlerow.ARTICLE_DESCRIPTION}</span> ! </td> ! </tr> ! <tr> ! <td valign="top" align="left" class="{ARTICLELIST.articlerow.COLOR}"><span class="gensmall">{L_ARTICLE_TYPE}: {ARTICLELIST.articlerow.ARTICLE_TYPE} • {L_ARTICLE_DATE}: {ARTICLELIST.articlerow.ARTICLE_DATE} • {L_VIEWS}: {ARTICLELIST.articlerow.ART_VIEWS} • {L_ARTICLE_AUTHOR}: {ARTICLELIST.articlerow.ARTICLE_AUTHOR} ! <!-- BEGIN show_ratings --> ! • {ARTICLELIST.articlerow.L_RATING}: {ARTICLELIST.articlerow.RATING} ({ARTICLELIST.articlerow.ARTICLE_VOTES} {L_VOTES}) {ARTICLELIST.articlerow.DO_RATE} ! <!-- END show_ratings --> ! </span> ! </td> ! </tr> ! <!-- END articlerow --> ! ! </table> ! </td> ! </tr> ! <form action="{S_ACTION_SORT}" method="post"> ! <input type="hidden" name="action" value="category"> ! <input type="hidden" name="cat_id" value="{ID}"> ! <input type="hidden" name="start" value="{START}"> ! <tr> ! <td align="center" colspan="2" class="cat"><span class="genmed">{L_SELECT_SORT_METHOD}: ! <select name="sort_method"> ! <option {SORT_ALPHABETIC} value='Alphabetic'>{L_ALPHABETIC}</option> ! <option {SORT_LATEST} value='Latest'>{L_LATEST}</option> ! <option {SORT_TOPRATED} value='Toprated'>{L_TOPRATED}</option> ! <option {SORT_MOST_POPULAR} value='Most_popular'>{L_MOST_POPULAR}</option> ! <option {SORT_USERRANK} value='Userrank'>{L_USERRANK}</option> ! <option {SORT_ID} value='Id'>{L_ID}</option> ! </select> ! {L_ORDER}: ! <select name="sort_order"> ! <option {SORT_ASC} value="ASC">{L_ASC}</option> ! <option {SORT_DESC} value="DESC">{L_DESC}</option> ! </select> ! <input type="submit" name="submit" value="{L_SORT}" class="liteoption" /> ! </span></td> ! </tr> ! </form> ! </table> ! ! <table width="100%" cellspacing="2" border="0" align="center" cellpadding="2"> ! <tr> ! <td align="left" valign="top"><span class="nav">{PAGE_NUMBER}</span></td> ! <td align="right" valign="top" nowrap="nowrap"><span class="nav">{PAGINATION}</span></td> </tr> </table> ! <!-- END ARTICLELIST --> ! ! <!-- BEGIN no_articles --> ! <table class="forumline" width="100%" cellspacing="1" cellpadding="3"> ! <tr> ! <th class="thHead">{no_articles.L_NO_ARTICLES}</th> ! </tr> ! <tr> ! <td class="row1" align="center" height="30"><span class="genmed">{no_articles.L_NO_ARTICLES_CAT}</span></td> ! </tr> ! </table> ! <!-- END no_articles --> ! ! ! Index: kb_post_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_post_body.tpl 17 Jun 2006 20:11:24 -0000 1.8 --- kb_post_body.tpl 1 Aug 2006 21:00:39 -0000 1.9 *************** *** 271,275 **** <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left" class="nav"><a href="{U_KB}" class="nav">{L_KB}</a></td> </tr> </table> --- 271,280 ---- <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left" class="nav"> ! <a href="{U_KB}" class="nav">{L_KB}</a> ! <!-- BEGIN navlinks --> ! » <a href="{navlinks.U_VIEW_CAT}" class="nav">{navlinks.CAT_NAME}</a> ! <!-- END navlinks --> ! </td> </tr> </table> |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:00:42
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/templates/subSilver/admin Modified Files: kb_cat_auth_body.tpl kb_cat_edit_body.tpl kb_config_body.tpl Removed Files: kb_art_body.tpl Log Message: Index: kb_cat_auth_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_auth_body.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_cat_auth_body.tpl 5 Apr 2006 21:19:50 -0000 1.3 --- kb_cat_auth_body.tpl 1 Aug 2006 21:00:38 -0000 1.4 *************** *** 8,18 **** <th class="thCornerL" height="25" nowrap="nowrap">{L_GROUPS}</th> <th class="thTop" nowrap="nowrap">{L_VIEW}</th> - <th class="thTop" nowrap="nowrap">{L_UPLOAD}</th> - <th class="thTop" nowrap="nowrap">{L_RATE}</th> - <th class="thTop" nowrap="nowrap">{L_COMMENT}</th> <th class="thTop" nowrap="nowrap">{L_EDIT}</th> <th class="thTop" nowrap="nowrap">{L_DELETE}</th> ! <!-- <th class="thTop" nowrap="nowrap">{L_APPROVAL}</th> ! <th class="thTop" nowrap="nowrap">{L_APPROVAL_EDIT}</th> --> <th class="thCornerR" nowrap="nowrap">{L_IS_MODERATOR}</th> </tr> --- 8,19 ---- <th class="thCornerL" height="25" nowrap="nowrap">{L_GROUPS}</th> <th class="thTop" nowrap="nowrap">{L_VIEW}</th> <th class="thTop" nowrap="nowrap">{L_EDIT}</th> <th class="thTop" nowrap="nowrap">{L_DELETE}</th> ! <th class="thTop" nowrap="nowrap">{L_UPLOAD}</th> ! <th class="thTop" nowrap="nowrap">{L_RATE}</th> ! <th class="thTop" nowrap="nowrap">{L_VIEW_COMMENT}</th> ! <th class="thTop" nowrap="nowrap">{L_POST_COMMENT}</th> ! <th class="thTop" nowrap="nowrap">{L_EDIT_COMMENT}</th> ! <th class="thTop" nowrap="nowrap">{L_DELETE_COMMENT}</th> <th class="thCornerR" nowrap="nowrap">{L_IS_MODERATOR}</th> </tr> *************** *** 24,49 **** </td> <td class="row2" align="center"> ! <input name="post[]" type="checkbox" {grouprow.POST_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="rate[]" type="checkbox" {grouprow.RATE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="comment[]" type="checkbox" {grouprow.COMMENT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="edit[]" type="checkbox" {grouprow.EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="delete[]" type="checkbox" {grouprow.DELETE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> - <!-- <td class="row2" align="center"> ! <input name="approval[]" type="checkbox" {grouprow.APPROVAL_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="approval_edit[]" type="checkbox" {grouprow.APPROVAL_EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> - --> <td class="row2" align="center"> <input name="moderator[]" type="checkbox" {grouprow.MODERATOR_CHECKED} value="{grouprow.GROUP_ID}" /> --- 25,51 ---- </td> <td class="row2" align="center"> ! <input name="edit[]" type="checkbox" {grouprow.EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="delete[]" type="checkbox" {grouprow.DELETE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="post[]" type="checkbox" {grouprow.POST_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="rate[]" type="checkbox" {grouprow.RATE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="view_comment[]" type="checkbox" {grouprow.COMMENT_VIEW_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="post_comment[]" type="checkbox" {grouprow.COMMENT_POST_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> ! <input name="edit_comment[]" type="checkbox" {grouprow.COMMENT_EDIT_CHECKED} value="{grouprow.GROUP_ID}" /> ! </td> ! <td class="row2" align="center"> ! <input name="delete_comment[]" type="checkbox" {grouprow.COMMENT_DELETE_CHECKED} value="{grouprow.GROUP_ID}" /> </td> <td class="row2" align="center"> <input name="moderator[]" type="checkbox" {grouprow.MODERATOR_CHECKED} value="{grouprow.GROUP_ID}" /> *************** *** 52,56 **** <!-- END grouprow --> <tr> ! <td class="cat" height="25" align="center" colspan="8"><input type="reset" value="{L_RESET}" class="liteoption" /> <input name="submit" type="submit" value="{L_SUBMIT}" class="mainoption" /></td> </tr> </table> --- 54,58 ---- <!-- END grouprow --> <tr> ! <td class="cat" height="25" align="center" colspan="11"><input type="reset" value="{L_RESET}" class="liteoption" /> <input name="submit" type="submit" value="{L_SUBMIT}" class="mainoption" /></td> </tr> </table> --- kb_art_body.tpl DELETED --- Index: kb_cat_edit_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_cat_edit_body.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_cat_edit_body.tpl 3 Jul 2006 12:24:44 -0000 1.7 --- kb_cat_edit_body.tpl 1 Aug 2006 21:00:38 -0000 1.8 *************** *** 1,8 **** <h1>{L_EDIT_TITLE}</h1> <p>{L_EDIT_DESCRIPTION}</p> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> ! <form action="{S_ACTION}" method="post"> <tr> <th class="thHead" colspan="2">{L_CAT_SETTINGS}</th> --- 1,34 ---- + <script language="JavaScript" type="text/javascript"> + <!-- + var error_msg = ""; + function checkAddForm() + { + error_msg = ""; + + if(document.form.catname.value == "") + { + error_msg += "Empty Category name!!"; + } + + if(error_msg != "") + { + alert(error_msg); + error_msg = ""; + return false; + } + else + { + return true; + } + } + // --> + </script> + <h1>{L_EDIT_TITLE}</h1> <p>{L_EDIT_DESCRIPTION}</p> ! <form action="{S_ACTION}" method="post" name="form" onsubmit="return checkAddForm();"> ! <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> <th class="thHead" colspan="2">{L_CAT_SETTINGS}</th> *************** *** 25,28 **** --- 51,61 ---- </select> </tr> + <tr> + <td class="row1">{L_CAT_ALLOWFILE}<br><span class="gensmall">{L_CAT_ALLOWFILE_INFO}</span></td> + <td class="row2"> + <input type="radio" name="cat_allow_file" value="1" {CHECKED_YES}>{L_YES} + <input type="radio" name="cat_allow_file" value="0" {CHECKED_NO}>{L_NO} + </td> + </tr> <!-- BEGIN switch_edit_category --> <tr> *************** *** 91,106 **** </tr> <tr> - <td class="row1" width="50%">{L_UPLOAD_LEVEL}<br><span class="gensmall">{L_UPLOAD_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_UPLOAD_LEVEL}</td> - </tr> - <tr> - <td class="row1" width="50%">{L_RATE_LEVEL}<br><span class="gensmall">{L_RATE_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_RATE_LEVEL}</td> - </tr> - <tr> - <td class="row1" width="50%">{L_COMMENT_LEVEL}<br><span class="gensmall">{L_COMMENT_LEVEL_INFO}</span></td> - <td class="row2" width="50%">{S_COMMENT_LEVEL}</td> - </tr> - <tr> <td class="row1" width="50%">{L_EDIT_LEVEL}<br><span class="gensmall">{L_EDIT_LEVEL_INFO}</span></td> <td class="row2" width="50%">{S_EDIT_LEVEL}</td> --- 124,127 ---- *************** *** 111,114 **** --- 132,139 ---- </tr> <tr> + <td class="row1" width="50%">{L_UPLOAD_LEVEL}<br><span class="gensmall">{L_UPLOAD_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_UPLOAD_LEVEL}</td> + </tr> + <tr> <td class="row1" width="50%">{L_APPROVAL_LEVEL}<br><span class="gensmall">{L_APPROVAL_LEVEL_INFO}</span></td> <td class="row2" width="50%">{S_APPROVAL_LEVEL}</td> *************** *** 118,121 **** --- 143,166 ---- <td class="row2" width="50%">{S_APPROVAL_EDIT_LEVEL}</td> </tr> + <tr> + <td class="row1" width="50%">{L_RATE_LEVEL}<br><span class="gensmall">{L_RATE_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_RATE_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_VIEW_COMMENT_LEVEL}<br><span class="gensmall">{L_VIEW_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_VIEW_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_POST_COMMENT_LEVEL}<br><span class="gensmall">{L_POST_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_POST_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_EDIT_COMMENT_LEVEL}<br><span class="gensmall">{L_EDIT_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_EDIT_COMMENT_LEVEL}</td> + </tr> + <tr> + <td class="row1" width="50%">{L_DELETE_COMMENT_LEVEL}<br><span class="gensmall">{L_DELETE_COMMENT_LEVEL_INFO}</span></td> + <td class="row2" width="50%">{S_DELETE_COMMENT_LEVEL}</td> + </tr> <tr> <td class="cat" colspan="2" align="center">{S_HIDDEN}<input type="submit" name="submit" value="{L_CREATE}" class="mainoption" /></td> Index: kb_config_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/admin/kb_config_body.tpl,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** kb_config_body.tpl 5 Jul 2006 22:48:26 -0000 1.15 --- kb_config_body.tpl 1 Aug 2006 21:00:39 -0000 1.16 *************** *** 110,114 **** </tr> <tr> ! <td class="row1"><span class="genmed">{L_CAT_COL}</span></td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> --- 110,118 ---- </tr> <tr> ! <td class="row1">{L_USE_SIMPLE_NAVIGATION}<br /><span class="gensmall">{L_USE_SIMPLE_NAVIGATION_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="use_simple_navigation" value="1" {S_USE_SIMPLE_NAVIGATION_YES} /> {L_YES} <input type="radio" name="use_simple_navigation" value="0" {S_USE_SIMPLE_NAVIGATION_NO} /> {L_NO}</td> ! </tr> ! <tr> ! <td class="row1">{L_CAT_COL}</td> <td class="row2"><input class="post" type="text" maxlength="2" size="5" name="cat_col" value="{CAT_COL}" /></td> </tr> |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:00:42
|
Update of /cvsroot/mxbb/mx_kb/kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/kb Modified Files: kb_common.php Log Message: Index: kb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/kb_common.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_common.php 8 Jul 2006 10:21:36 -0000 1.7 --- kb_common.php 1 Aug 2006 21:00:38 -0000 1.8 *************** *** 32,35 **** --- 32,36 ---- } } + // =================================================== // to make it work with php version under 4.1 and other stuff *************** *** 61,84 **** // =================================================== ! // Include kb data // =================================================== include_once( $module_root_path . 'kb/includes/kb_constants.' . $phpEx ); include_once( $module_root_path . 'kb/includes/functions.' . $phpEx ); - include_once( $module_root_path . 'kb/includes/functions_cache.' . $phpEx ); include_once( $module_root_path . 'kb/includes/functions_auth.' . $phpEx ); ! include_once( $module_root_path . 'kb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'kb/includes/functions_kb.' . $phpEx ); ! if (defined( 'IN_ADMIN' )) ! { ! include_once( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); ! $mx_kb = new mx_kb_admin(); ! } ! else ! { ! $mx_kb = new mx_kb_public(); ! } ! ! $mx_kb_cache = new mx_kb_cache(); $mx_kb_functions = new mx_kb_functions(); --- 62,89 ---- // =================================================== ! // Include Files // =================================================== include_once( $module_root_path . 'kb/includes/kb_constants.' . $phpEx ); + + // + // Load addon tools + // + // - Class module_cache + // - Class mx_custom_fields + // - Class mx_notification + // - Class mx_text + // - Class mx_text_formatting + // + include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); + include_once( $module_root_path . 'kb/includes/functions.' . $phpEx ); include_once( $module_root_path . 'kb/includes/functions_auth.' . $phpEx ); ! //include_once( $module_root_path . 'kb/includes/functions_mx.' . $phpEx ); include_once( $module_root_path . 'kb/includes/functions_kb.' . $phpEx ); ! // =================================================== ! // Load classes ! // =================================================== ! $mx_kb_cache = new module_cache($module_root_path . 'kb/'); $mx_kb_functions = new mx_kb_functions(); *************** *** 114,116 **** --- 119,131 ---- $smilies_on = $kb_config['allow_smilies'] ? true : false; } + + if (defined( 'IN_ADMIN' )) + { + include_once( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); + $mx_kb = new mx_kb_admin(); + } + else + { + $mx_kb = new mx_kb_public(); + } ?> \ No newline at end of file |
Update of /cvsroot/mxbb/mx_kb/kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/kb/admin Modified Files: admin_auth_manage.php admin_cat_manage.php admin_custom_manage.php admin_settings.php admin_types_manage.php Removed Files: admin_article_manage.php Log Message: Index: admin_cat_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_cat_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_cat_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_cat_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 25,29 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); --- 25,28 ---- *************** *** 50,55 **** $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! $global_auth = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); $auth_select = array(); switch ( $mode ) --- 49,61 ---- $cat_auth_levels = array( 'ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN' ); $cat_auth_const = array( AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN ); ! ! $cat_auth_approval_levels = array( 'NONE', 'MOD', 'ADMIN' ); ! $cat_auth_approval_const = array( AUTH_ALL, AUTH_MOD, AUTH_ADMIN ); ! ! $global_auth = array( 'auth_view', 'auth_edit', 'auth_delete', 'auth_post', 'auth_rate', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment' ); ! $global_approval_auth = array( 'auth_approval', 'auth_approval_edit' ); ! $auth_select = array(); + $auth_select_approval = array(); switch ( $mode ) *************** *** 61,64 **** --- 67,73 ---- $new_cat_name = stripslashes( $_POST['new_cat_name'] ); + $checked_yes = ' checked'; + $checked_no = ''; + // // Comments *************** *** 107,116 **** $cat_rowset['auth_view'] = 0; $cat_rowset['auth_post'] = 1; - $cat_rowset['auth_rate'] = 1; - $cat_rowset['auth_comment'] = 1; $cat_rowset['auth_edit'] = 1; $cat_rowset['auth_delete'] = 2; ! $cat_rowset['auth_approval'] = 5; ! $cat_rowset['auth_approval_edit'] = 5; foreach( $global_auth as $auth ) --- 116,128 ---- $cat_rowset['auth_view'] = 0; $cat_rowset['auth_post'] = 1; $cat_rowset['auth_edit'] = 1; $cat_rowset['auth_delete'] = 2; ! $cat_rowset['auth_approval'] = 0; ! $cat_rowset['auth_approval_edit'] = 0; ! $cat_rowset['auth_rate'] = 1; ! $cat_rowset['auth_view_comment'] = 1; ! $cat_rowset['auth_post_comment'] = 1; ! $cat_rowset['auth_edit_comment'] = 1; ! $cat_rowset['auth_delete_comment'] = 5; foreach( $global_auth as $auth ) *************** *** 120,128 **** { $selected = ( $cat_rowset[$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } // // Generate page --- 132,151 ---- { $selected = ( $cat_rowset[$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_levels[$k]] . '</option>'; } $auth_select[$auth] .= '</select> '; } + foreach( $global_approval_auth as $auth ) + { + $auth_select_approval[$auth] = ' <select name="' . $auth . '">'; + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $cat_rowset[$auth] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $auth_select_approval[$auth] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $auth_select_approval[$auth] .= '</select> '; + } + // // Generate page *************** *** 145,149 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $this->generate_jumpbox( '', 0, 0, 0, true ), 'CAT_NAME' => $new_cat_name, 'DESC' => '', --- 168,178 ---- 'L_NONE' => $lang['None'], ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! ! //'PARENT_LIST' => $this->generate_jumpbox( '', 0, 0, 0, true ), ! 'PARENT_LIST' => $this->generate_jumpbox( ), 'CAT_NAME' => $new_cat_name, 'DESC' => '', *************** *** 236,248 **** 'S_VIEW_LEVEL' => $auth_select['auth_view'], - 'L_UPLOAD_LEVEL' => $lang['Upload_level'], - 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], - - 'L_RATE_LEVEL' => $lang['Rate_level'], - 'S_RATE_LEVEL' => $auth_select['auth_rate'], - - 'L_COMMENT_LEVEL' => $lang['Comment_level'], - 'S_COMMENT_LEVEL' => $auth_select['auth_comment'], - 'L_EDIT_LEVEL' => $lang['Edit_level'], 'S_EDIT_LEVEL' => $auth_select['auth_edit'], --- 265,268 ---- *************** *** 251,259 **** 'S_DELETE_LEVEL' => $auth_select['auth_delete'], 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select['auth_approval_edit'], 'L_DISABLED' => $lang['Disabled'], --- 271,297 ---- 'S_DELETE_LEVEL' => $auth_select['auth_delete'], + 'L_UPLOAD_LEVEL' => $lang['Upload_level'], + 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], + 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select_approval['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select_approval['auth_approval_edit'], ! ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'S_RATE_LEVEL' => $auth_select['auth_rate'], ! ! 'L_VIEW_COMMENT_LEVEL' => $lang['View_Comment_level'], ! 'S_VIEW_COMMENT_LEVEL' => $auth_select['auth_view_comment'], ! ! 'L_POST_COMMENT_LEVEL' => $lang['Post_Comment_level'], ! 'S_POST_COMMENT_LEVEL' => $auth_select['auth_post_comment'], ! ! 'L_EDIT_COMMENT_LEVEL' => $lang['Edit_Comment_level'], ! 'S_EDIT_COMMENT_LEVEL' => $auth_select['auth_edit_comment'], ! ! 'L_DELETE_COMMENT_LEVEL' => $lang['Delete_Comment_level'], ! 'S_DELETE_COMMENT_LEVEL' => $auth_select['auth_delete_comment'], 'L_DISABLED' => $lang['Disabled'], *************** *** 272,275 **** --- 310,314 ---- $cat_desc = $_POST['catdesc']; $parent = intval( $_POST['parent'] ); + $cat_allow_file = intval( $_POST['cat_allow_file'] ); $cat_use_comments = ( isset( $_POST['cat_allow_comments'] ) ) ? intval( $_POST['cat_allow_comments'] ) : 0; *************** *** 291,302 **** $view_level = intval( $_POST['auth_view'] ); - $post_level = intval( $_POST['auth_post'] ); - $rate_level = intval( $_POST['auth_rate'] ); - $comment_level = intval( $_POST['auth_comment'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); $sql = "SELECT MAX(cat_order) AS cat_order FROM " . KB_CATEGORIES_TABLE . " WHERE parent = $parent"; --- 330,345 ---- $view_level = intval( $_POST['auth_view'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); + $post_level = intval( $_POST['auth_post'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); + $rate_level = intval( $_POST['auth_rate'] ); + $comment_view_level = intval( $_POST['auth_view_comment'] ); + $comment_post_level = intval( $_POST['auth_post_comment'] ); + $comment_edit_level = intval( $_POST['auth_edit_comment'] ); + $comment_delete_level = intval( $_POST['auth_delete_comment'] ); + $sql = "SELECT MAX(cat_order) AS cat_order FROM " . KB_CATEGORIES_TABLE . " WHERE parent = $parent"; *************** *** 314,319 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 357,362 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, cat_allow_file, parent, cat_order, auth_view, auth_post, auth_rate, auth_view_comment, auth_post_comment, auth_edit_comment, auth_delete_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, cat_allow_comments, internal_comments, autogenerate_comments, comments_forum_id, cat_allow_ratings, show_pretext, notify, notify_group )" . " VALUES ! ( '$cat_name', '$cat_desc', '0', '$cat_allow_file', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_view_level', '$comment_post_level', '$comment_edit_level', '$comment_delete_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$cat_use_comments', '$cat_internal_comments', '$cat_autogenerate_comments', '$comments_forum_id', '$cat_use_ratings', '$cat_show_pretext', '$cat_notify', '$cat_notify_group')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 332,397 **** if ( !$_POST['submit'] ) { ! $cat_id = intval( $_GET['cat'] ); ! $cat_name = $this->cat_rowset[$cat_id]['category_name']; ! $cat_desc = $this->cat_rowset[$cat_id]['category_details']; ! $number_articles = $this->article_in_cat($cat_id); ! $parent = $this->cat_rowset[$cat_id]['parent']; ! // ! // Comments ! // ! $use_comments_yes = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_comments_default = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $this->cat_rowset[$cat_id]['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( $this->cat_rowset[$cat_id]['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $internal_comments_default = ( $this->cat_rowset[$cat_id]['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $comments_forum_id = $this->cat_rowset[$cat_id]['comments_forum_id']; ! $autogenerate_comments_yes = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 0) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_default = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Ratings ! // ! $use_ratings_yes = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 1) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 0) ? "checked=\"checked\"" : ""; ! $use_ratings_default = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Instructions ! // ! $pretext_show = ( $this->cat_rowset[$cat_id]['show_pretext'] == 1) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( $this->cat_rowset[$cat_id]['show_pretext'] == 0) ? "checked=\"checked\"" : ""; ! $pretext_default = ( $this->cat_rowset[$cat_id]['show_pretext'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Notification ! // ! $notify_none = ( $this->cat_rowset[$cat_id]['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $this->cat_rowset[$cat_id]['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $this->cat_rowset[$cat_id]['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $notify_default = ( $this->cat_rowset[$cat_id]['notify'] == -1 ) ? "checked=\"checked\"" : ""; ! $notify_group_list = mx_get_groups($this->cat_rowset[$cat_id]['notify_group'], 'notify_group'); ! // ! // Permissions ! // ! foreach( $global_auth as $auth ) { ! $auth_select[$auth] = ' <select name="' . $auth . '">'; ! for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) ! { ! $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $cat_auth_levels[$k]] . '</option>'; ! } ! $auth_select[$auth] .= '</select> '; } // --- 375,454 ---- if ( !$_POST['submit'] ) { ! $cat_id = intval( $_GET['cat'] ); ! $cat_name = $this->cat_rowset[$cat_id]['category_name']; ! $cat_desc = $this->cat_rowset[$cat_id]['category_details']; ! $checked_yes = ( $this->cat_rowset[$cat_id]['cat_allow_file'] ) ? ' checked' : ''; ! $checked_no = ( !$this->cat_rowset[$cat_id]['cat_allow_file'] ) ? ' checked' : ''; ! $number_articles = $this->items_in_cat($cat_id); ! $parent = $this->cat_rowset[$cat_id]['parent']; ! // ! // Comments ! // ! $use_comments_yes = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $use_comments_no = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $use_comments_default = ( $this->cat_rowset[$cat_id]['cat_allow_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_internal = ( $this->cat_rowset[$cat_id]['internal_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $internal_comments_phpbb = ( $this->cat_rowset[$cat_id]['internal_comments'] == 0 ) ? "checked=\"checked\"" : ""; ! $internal_comments_default = ( $this->cat_rowset[$cat_id]['internal_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! $comments_forum_id = $this->cat_rowset[$cat_id]['comments_forum_id']; ! $autogenerate_comments_yes = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 1 ) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_no = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == 0) ? "checked=\"checked\"" : ""; ! $autogenerate_comments_default = ( $this->cat_rowset[$cat_id]['autogenerate_comments'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Ratings ! // ! $use_ratings_yes = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 1) ? "checked=\"checked\"" : ""; ! $use_ratings_no = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == 0) ? "checked=\"checked\"" : ""; ! $use_ratings_default = ( $this->cat_rowset[$cat_id]['cat_allow_ratings'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Instructions ! // ! $pretext_show = ( $this->cat_rowset[$cat_id]['show_pretext'] == 1) ? "checked=\"checked\"" : ""; ! $pretext_hide = ( $this->cat_rowset[$cat_id]['show_pretext'] == 0) ? "checked=\"checked\"" : ""; ! $pretext_default = ( $this->cat_rowset[$cat_id]['show_pretext'] == -1 ) ? "checked=\"checked\"" : ""; ! // ! // Notification ! // ! $notify_none = ( $this->cat_rowset[$cat_id]['notify'] == 0 ) ? "checked=\"checked\"" : ""; ! $notify_pm = ( $this->cat_rowset[$cat_id]['notify'] == 1 ) ? "checked=\"checked\"" : ""; ! $notify_email = ( $this->cat_rowset[$cat_id]['notify'] == 2 ) ? "checked=\"checked\"" : ""; ! $notify_default = ( $this->cat_rowset[$cat_id]['notify'] == -1 ) ? "checked=\"checked\"" : ""; ! $notify_group_list = mx_get_groups($this->cat_rowset[$cat_id]['notify_group'], 'notify_group'); ! ! // ! // Permissions ! // ! foreach( $global_auth as $auth ) ! { ! $auth_select[$auth] = ' <select name="' . $auth . '">'; ! for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) { ! $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; ! $auth_select[$auth] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_levels[$k]] . '</option>'; } + $auth_select[$auth] .= '</select> '; + } + + foreach( $global_approval_auth as $auth ) + { + $auth_select_approval[$auth] = ' <select name="' . $auth . '">'; + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $this->cat_rowset[$cat_id][$auth] == $cat_auth_approval_const[$k] ) ? ' selected="selected"' : ''; + $auth_select_approval[$auth] .= '<option value="' . $cat_auth_approval_const[$k] . '"' . $selected . '>' . $lang['Cat_' . $cat_auth_approval_levels[$k]] . '</option>'; + } + $auth_select_approval[$auth] .= '</select> '; + } // *************** *** 415,419 **** 'L_NONE' => $lang['None'], ! 'PARENT_LIST' => $this->generate_jumpbox( '', $cat_id, $parent, true, true ), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=edit" ), --- 472,482 ---- 'L_NONE' => $lang['None'], ! 'CHECKED_YES' => $checked_yes, ! 'CHECKED_NO' => $checked_no, ! 'L_CAT_ALLOWFILE' => $lang['Allow_file'], ! 'L_CAT_ALLOWFILE_INFO' => $lang['Allow_file_info'], ! ! //'PARENT_LIST' => $this->generate_jumpbox( '', $cat_id, $parent, true, true ), ! 'PARENT_LIST' => $this->generate_jumpbox( 0, 0, array( $parent => 1 )), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=edit" ), *************** *** 509,521 **** 'S_VIEW_LEVEL' => $auth_select['auth_view'], - 'L_UPLOAD_LEVEL' => $lang['Upload_level'], - 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], - - 'L_RATE_LEVEL' => $lang['Rate_level'], - 'S_RATE_LEVEL' => $auth_select['auth_rate'], - - 'L_COMMENT_LEVEL' => $lang['Comment_level'], - 'S_COMMENT_LEVEL' => $auth_select['auth_comment'], - 'L_EDIT_LEVEL' => $lang['Edit_level'], 'S_EDIT_LEVEL' => $auth_select['auth_edit'], --- 572,575 ---- *************** *** 524,532 **** 'S_DELETE_LEVEL' => $auth_select['auth_delete'], 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select['auth_approval_edit'], 'L_DISABLED' => $lang['Disabled'], --- 578,604 ---- 'S_DELETE_LEVEL' => $auth_select['auth_delete'], + 'L_UPLOAD_LEVEL' => $lang['Upload_level'], + 'S_UPLOAD_LEVEL' => $auth_select['auth_post'], + 'L_APPROVAL_LEVEL' => $lang['Approval_level'], ! 'S_APPROVAL_LEVEL' => $auth_select_approval['auth_approval'], 'L_APPROVAL_EDIT_LEVEL' => $lang['Approval_edit_level'], ! 'S_APPROVAL_EDIT_LEVEL' => $auth_select_approval['auth_approval_edit'], ! ! 'L_RATE_LEVEL' => $lang['Rate_level'], ! 'S_RATE_LEVEL' => $auth_select['auth_rate'], ! ! 'L_VIEW_COMMENT_LEVEL' => $lang['View_Comment_level'], ! 'S_VIEW_COMMENT_LEVEL' => $auth_select['auth_view_comment'], ! ! 'L_POST_COMMENT_LEVEL' => $lang['Post_Comment_level'], ! 'S_POST_COMMENT_LEVEL' => $auth_select['auth_post_comment'], ! ! 'L_EDIT_COMMENT_LEVEL' => $lang['Edit_Comment_level'], ! 'S_EDIT_COMMENT_LEVEL' => $auth_select['auth_edit_comment'], ! ! 'L_DELETE_COMMENT_LEVEL' => $lang['Delete_Comment_level'], ! 'S_DELETE_COMMENT_LEVEL' => $auth_select['auth_delete_comment'], 'L_DISABLED' => $lang['Disabled'], *************** *** 542,545 **** --- 614,618 ---- $number_articles = intval( $_POST['number_articles'] ); $parent = intval( $_POST['parent'] ); + $cat_allow_file = intval( $_POST['cat_allow_file'] ); $cat_use_comments = ( isset( $_POST['cat_allow_comments'] ) ) ? intval( $_POST['cat_allow_comments'] ) : 0; *************** *** 556,567 **** $view_level = intval( $_POST['auth_view'] ); - $post_level = intval( $_POST['auth_post'] ); - $rate_level = intval( $_POST['auth_rate'] ); - $comment_level = intval( $_POST['auth_comment'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); if ( !$cat_name ) { --- 629,644 ---- $view_level = intval( $_POST['auth_view'] ); $edit_level = intval( $_POST['auth_edit'] ); $delete_level = intval( $_POST['auth_delete'] ); + $post_level = intval( $_POST['auth_post'] ); $approval_level = intval( $_POST['auth_approval'] ); $approval_edit_level = intval( $_POST['auth_approval_edit'] ); + $rate_level = intval( $_POST['auth_rate'] ); + $comment_view_level = intval( $_POST['auth_view_comment'] ); + $comment_post_level = intval( $_POST['auth_post_comment'] ); + $comment_edit_level = intval( $_POST['auth_edit_comment'] ); + $comment_delete_level = intval( $_POST['auth_delete_comment'] ); + if ( !$cat_name ) { *************** *** 569,573 **** } ! $sql = "UPDATE " . KB_CATEGORIES_TABLE . " SET category_name = '" . $cat_name . "', category_details = '" . $cat_desc . "', number_articles = '" . $number_articles . "', parent = '" . $parent . "', auth_view = '" . $view_level . "', auth_post = '" . $post_level . "', auth_rate = '" . $rate_level . "', auth_comment = '" . $comment_level . "', auth_edit = '" . $edit_level . "', auth_delete = '" . $delete_level . "', auth_approval = '" . $approval_level . "', auth_approval_edit = '" . $approval_edit_level . "', cat_allow_comments = '" . $cat_use_comments . "', internal_comments = '" . $cat_internal_comments . "', autogenerate_comments = '" . $cat_autogenerate_comments . "', cat_allow_ratings = '" . $cat_use_ratings . "', notify = '" . $cat_notify . "', notify_group = '" . $cat_notify_group . "', show_pretext = '" . $cat_show_pretext . "', comments_forum_id = '" . $comments_forum_id . "' WHERE category_id = " . $cat_id; if ( !( $results = $db->sql_query( $sql ) ) ) --- 646,650 ---- } ! $sql = "UPDATE " . KB_CATEGORIES_TABLE . " SET category_name = '" . $cat_name . "', category_details = '" . $cat_desc . "', number_articles = '" . $number_articles . "', cat_allow_file = '" . $cat_allow_file . "', parent = '" . $parent . "', auth_view = '" . $view_level . "', auth_post = '" . $post_level . "', auth_rate = '" . $rate_level . "', auth_view_comment = '" . $comment_view_level . "', auth_post_comment = '" . $comment_post_level . "', auth_edit_comment = '" . $comment_edit_level . "', auth_delete_comment = '" . $comment_delete_level . "', auth_edit = '" . $edit_level . "', auth_delete = '" . $delete_level . "', auth_approval = '" . $approval_level . "', auth_approval_edit = '" . $approval_edit_level . "', cat_allow_comments = '" . $cat_use_comments . "', internal_comments = '" . $cat_internal_comments . "', autogenerate_comments = '" . $cat_autogenerate_comments . "', cat_allow_ratings = '" . $cat_use_ratings . "', notify = '" . $cat_notify . "', notify_group = '" . $cat_notify_group . "', show_pretext = '" . $cat_show_pretext . "', comments_forum_id = '" . $comments_forum_id . "' WHERE category_id = " . $cat_id; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 617,621 **** 'S_HIDDEN_FIELDS' => '<input type="hidden" name="catid" value="' . $cat_id . '">', ! 'S_SELECT_TO' => $this->generate_jumpbox( '', $cat_id, 0, true, true ), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=delete" ), --- 694,699 ---- 'S_HIDDEN_FIELDS' => '<input type="hidden" name="catid" value="' . $cat_id . '">', ! //'S_SELECT_TO' => $this->generate_jumpbox( '', $cat_id, 0, true, true ), ! 'S_SELECT_TO' => $this->generate_jumpbox( 0, 0, array( $cat_id => 1 )), 'S_ACTION' => append_sid( "admin_kb.$phpEx?action=cat_manage&mode=delete" ), *************** *** 797,801 **** break; - } --- 875,878 ---- Index: admin_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_settings.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_settings.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_settings.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 116,120 **** $sort_method_options = array(); ! $sort_method_options = array( "Latest", "Creation", "Id", "Userrank", "Alphabetic" ); $sort_method_list = '<select name="sort_method">'; --- 116,120 ---- $sort_method_options = array(); ! $sort_method_options = array( "Alphabetic", "Latest", "Toprated", "Most_popular", "Userrank", "Id" ); $sort_method_list = '<select name="sort_method">'; *************** *** 161,164 **** --- 161,167 ---- $cat_col = $new['cat_col']; + $use_simple_navigation_yes = ( $new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + $use_simple_navigation_no = ( !$new['use_simple_navigation'] ) ? "checked=\"checked\"" : ""; + // // Instructions *************** *** 377,381 **** 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['cat_col'], 'L_NFDAYS' => $lang['Nfdays'], --- 380,389 ---- 'CAT_COL' => $cat_col, ! 'L_CAT_COL' => $lang['Cat_col'], ! ! 'S_USE_SIMPLE_NAVIGATION_YES' => $use_simple_navigation_yes, ! 'S_USE_SIMPLE_NAVIGATION_NO' => $use_simple_navigation_no, ! 'L_USE_SIMPLE_NAVIGATION' => $lang['Use_simple_navigation'], ! 'L_USE_SIMPLE_NAVIGATION_EXPLAIN' => $lang['Use_simple_navigation_explain'], 'L_NFDAYS' => $lang['Nfdays'], Index: admin_auth_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_auth_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_auth_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_auth_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 30,34 **** if ( !isset( $_POST['submit'] ) ) { ! $s_kb_cat_list = $this->generate_jumpbox( '', 0, 0, 0, true ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); --- 30,35 ---- if ( !isset( $_POST['submit'] ) ) { ! //$s_kb_cat_list = $this->generate_jumpbox( '', 0, 0, 0, true ); ! $s_kb_cat_list = $this->generate_jumpbox( ); $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); *************** *** 61,71 **** 'L_VIEW' => $lang['View'], - 'L_UPLOAD' => $lang['Upload'], - 'L_RATE' => $lang['Rate'], - 'L_COMMENT' => $lang['Comment'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! // 'L_APPROVAL' => $lang['Approval'], ! // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], --- 62,73 ---- 'L_VIEW' => $lang['View'], 'L_EDIT' => $lang['Edit'], 'L_DELETE' => $lang['Delete'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_VIEW_COMMENT' => $lang['View_Comment_level'], ! 'L_POST_COMMENT' => $lang['Post_Comment_level'], ! 'L_EDIT_COMMENT' => $lang['Edit_Comment_level'], ! 'L_DELETE_COMMENT' => $lang['Delete_Comment_level'], 'L_IS_MODERATOR' => $lang['Is_Moderator'], *************** *** 93,97 **** // Get info of this cat // ! $sql = "SELECT category_id, category_name, auth_view_groups, auth_post_groups, auth_rate_groups, auth_comment_groups, auth_edit_groups, auth_delete_groups, auth_approval_groups, auth_approval_edit_groups, auth_moderator_groups FROM " . KB_CATEGORIES_TABLE . " WHERE category_id = '$cat_id'"; --- 95,99 ---- // Get info of this cat // ! $sql = "SELECT * FROM " . KB_CATEGORIES_TABLE . " WHERE category_id = '$cat_id'"; *************** *** 104,114 **** $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); - $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); - $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); - $comment_groups = @explode( ',', $thiscat['auth_comment_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! // $approval_groups = @explode( ',', $thiscat['auth_approval_groups'] ); ! // $approval_edit_groups = @explode( ',', $thiscat['auth_approval_edit_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); --- 106,117 ---- $view_groups = @explode( ',', $thiscat['auth_view_groups'] ); $edit_groups = @explode( ',', $thiscat['auth_edit_groups'] ); $delete_groups = @explode( ',', $thiscat['auth_delete_groups'] ); ! $post_groups = @explode( ',', $thiscat['auth_post_groups'] ); ! $rate_groups = @explode( ',', $thiscat['auth_rate_groups'] ); ! $comment_view_groups = @explode( ',', $thiscat['auth_view_comment_groups'] ); ! $comment_post_groups = @explode( ',', $thiscat['auth_post_comment_groups'] ); ! $comment_edit_groups = @explode( ',', $thiscat['auth_edit_comment_groups'] ); ! $comment_delete_groups = @explode( ',', $thiscat['auth_delete_comment_groups'] ); $moderator_groups = @explode( ',', $thiscat['auth_moderator_groups'] ); *************** *** 119,131 **** 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' )); } --- 122,135 ---- 'GROUP_ID' => $groupdata[$i]['group_id'], 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => $thiscat['auth_view'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : ''), ! 'EDIT_CHECKED' => $thiscat['auth_edit'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : ''), ! 'DELETE_CHECKED' => $thiscat['auth_delete'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : ''), ! 'POST_CHECKED' => $thiscat['auth_post'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : ''), ! 'RATE_CHECKED' => $thiscat['auth_rate'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_VIEW_CHECKED' => $thiscat['auth_view_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_view_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_POST_CHECKED' => $thiscat['auth_post_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_post_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_EDIT_CHECKED' => $thiscat['auth_edit_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_edit_groups ) ) ? 'checked="checked"' : ''), ! 'COMMENT_DELETE_CHECKED' => $thiscat['auth_delete_comment'] != AUTH_ACL ? 'disabled' : (( in_array( $groupdata[$i]['group_id'], $comment_delete_groups ) ) ? 'checked="checked"' : ''), ! 'MODERATOR_CHECKED' => (( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '') )); } *************** *** 138,152 **** $view_groups = @implode( ',', $_POST['view'] ); - $post_groups = @implode( ',', $_POST['post'] ); - $rate_groups = @implode( ',', $_POST['rate'] ); - $comment_groups = @implode( ',', $_POST['comment'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! // $approval_groups = @implode( ',', $_POST['approval'] ); ! // $approval_edit_groups = @implode( ',', $_POST['approval_edit'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . KB_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_comment_groups = '$comment_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE category_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) --- 142,157 ---- $view_groups = @implode( ',', $_POST['view'] ); $edit_groups = @implode( ',', $_POST['edit'] ); $delete_groups = @implode( ',', $_POST['delete'] ); ! $post_groups = @implode( ',', $_POST['post'] ); ! $rate_groups = @implode( ',', $_POST['rate'] ); ! $comment_view_groups = @implode( ',', $_POST['view_comment'] ); ! $comment_post_groups = @implode( ',', $_POST['post_comment'] ); ! $comment_edit_groups = @implode( ',', $_POST['edit_comment'] ); ! $comment_delete_groups = @implode( ',', $_POST['delete_comment'] ); $moderator_groups = @implode( ',', $_POST['moderator'] ); $sql = "UPDATE " . KB_CATEGORIES_TABLE . " ! SET auth_view_groups = '$view_groups', auth_post_groups = '$post_groups', auth_rate_groups = '$rate_groups', auth_view_comment_groups = '$comment_view_groups', auth_post_comment_groups = '$comment_post_groups', auth_edit_comment_groups = '$comment_edit_groups', auth_delete_comment_groups = '$comment_delete_groups', auth_edit_groups = '$edit_groups', auth_delete_groups = '$delete_groups', auth_approval_groups = '$approval_groups', auth_approval_edit_groups = '$approval_edit_groups', auth_moderator_groups = '$moderator_groups' WHERE category_id = '$cat_id'"; if ( !$result = $db->sql_query( $sql ) ) Index: admin_types_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_types_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_types_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_types_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 149,154 **** } // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ); --- 149,155 ---- } + // // Generate page ! // $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ); --- admin_article_manage.php DELETED --- Index: admin_custom_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/admin/admin_custom_manage.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** admin_custom_manage.php 8 Jul 2006 10:21:36 -0000 1.1 --- admin_custom_manage.php 1 Aug 2006 21:00:37 -0000 1.2 *************** *** 25,30 **** include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! include_once( $module_root_path . 'kb/includes/functions_field.' . $phpEx ); ! $this_custom_field = new mx_kb_custom_field(); $this_custom_field->init(); --- 25,29 ---- include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! $this_custom_field = new mx_custom_field(KB_CUSTOM_TABLE, KB_CUSTOM_DATA_TABLE); $this_custom_field->init(); |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:00:42
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_main.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** lang_main.php 5 Jul 2006 22:48:26 -0000 1.12 --- lang_main.php 1 Aug 2006 21:00:38 -0000 1.13 *************** *** 9,16 **** --- 9,20 ---- */ + // + // General + // $lang['kb_disable'] = 'Knowledge base is disabled.'; $lang['KB_title'] = 'Knowledge Base'; $lang['Article'] = 'Article'; + $lang['Articles'] = 'Articles'; $lang['Category'] = 'Category'; $lang['Sub_categories'] = 'Subcategories'; *************** *** 18,24 **** $lang['Article_type'] = 'Type'; $lang['Article_keywords'] = 'Keywords'; - $lang['Articles'] = 'Articles'; $lang['Add_article'] = 'Add Article'; - $lang['Click_cat_to_add'] = 'Click on Category to add Article'; $lang['KB_Home'] = 'KB Home'; $lang['No_articles'] = 'No Articles'; --- 22,26 ---- *************** *** 29,41 **** $lang['Article_not_exsist'] = 'Article doesn\'t exist'; $lang['Category_not_exsist'] = 'Category doesn\'t exist'; $lang['Edit'] = 'Edit'; ! $lang['Standalone_Not_Supported'] = 'This module does not support standalone usage. In the AdminCP, add the KB block to a portal page.'; $lang['Article_submitted_Approve'] = 'Article Submitted Successfully.<br />An Administrator will review your article and decide whether to let users view it or not.'; $lang['Article_submitted'] = 'Article Submitted Successfully.'; - $lang['Click_return_kb'] = 'Click %sHere%s to return to the ' . $lang['KB_title']; - $lang['Click_return_article'] = 'Click %sHere%s to return to the ' . $lang['Article']; $lang['Article_Edited_Approve'] = 'Article Edited Successfully.<br />It needs to be approved again before users can view it.'; --- 31,42 ---- $lang['Article_not_exsist'] = 'Article doesn\'t exist'; $lang['Category_not_exsist'] = 'Category doesn\'t exist'; + $lang['Last_article'] = 'Last article'; $lang['Edit'] = 'Edit'; ! $lang['Click_cat_to_add'] = 'Click on Category to add Article'; $lang['Standalone_Not_Supported'] = 'This module does not support standalone usage. In the AdminCP, add the KB block to a portal page.'; $lang['Article_submitted_Approve'] = 'Article Submitted Successfully.<br />An Administrator will review your article and decide whether to let users view it or not.'; $lang['Article_submitted'] = 'Article Submitted Successfully.'; $lang['Article_Edited_Approve'] = 'Article Edited Successfully.<br />It needs to be approved again before users can view it.'; *************** *** 90,95 **** $lang['Comments'] = 'Comments'; - $lang['No_add'] = 'You can\'t add a new article'; - $lang['No_edit'] = 'You can\'t edit this article!'; $lang['Post_comments'] = 'Post your comments'; --- 91,94 ---- *************** *** 97,188 **** $lang['Quick_stats'] = 'Quick Stats'; ! // added ! ! $lang['No_Articles'] = 'There are no articles in this cateogry!'; $lang['Not_authorized'] = 'Sorry, but you are not authorized!'; $lang['TOC'] = 'Contents'; ! // Rate ! $lang['Votes_label'] = 'Rating '; ! $lang['Votes'] = 'Vote(s)'; ! $lang['No_votes'] = 'No votes'; ! $lang['Rate'] = 'Rate Article'; ! $lang['ADD_RATING'] = '[Rate Article]'; ! $lang['Rerror'] = 'Sorry, you have already rated this article.'; ! $lang['Rateinfo'] = 'You are about to rate the article <i>{filename}</i>.<br />Please select a rating. 1 is the worst, 10 is the best.'; ! $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}.<br />This makes the files new rating {newrating}.'; ! $lang['R1'] = '1'; ! $lang['R2'] = '2'; ! $lang['R3'] = '3'; ! $lang['R4'] = '4'; ! $lang['R5'] = '5'; ! $lang['R6'] = '6'; ! $lang['R7'] = '7'; ! $lang['R8'] = '8'; ! $lang['R9'] = '9'; ! $lang['R10'] = '10'; ! $lang['Click_return_rate'] = 'Click %sHere%s to return to article'; ! // Print version $lang['Print_version'] = '[Printable version]'; // Stats $lang['Top_toprated'] = 'Toprated Articles'; $lang['Top_most_popular'] = 'Most Popular'; $lang['Top_latest'] = 'Latest Articles'; // ! // General strings from the news admin panel // ! ! $lang['News_settings'] = "KB Block Settings"; ! $lang['News_settings_short_explain'] = "Configure some options for the front-page news."; ! $lang['News_settings_explain'] = "Here you can edit the configuration for the KB Block. This panel lets you extract what categories the block will display, thus you'll create subinstances of the module."; // ! // Update result messages // ! $lang['News_updated_return_settings'] = "KB block configuration updated successfully.<br /><br />Click %shere%s to return to main page."; // %s's for URI params - DO NOT REMOVE ! $lang['News_update_error'] = "Couldn't update KB block configuration.<br /><br />This mod is designed for MySQL, so please contact the author if you have troubles. If you can offer a translation of the SQL into other database formats, please send them to:<br />"; ! // added ! $lang['Cat_all'] = "All"; ! $lang['L_Pages'] = "Pages"; ! $lang['L_Pages_explain'] = "Use the '[pages]' command to split the article into pages"; ! $lang['L_Toc'] = "Table of contents (TOC)"; ! $lang['L_Toc_explain'] = "Use the '[toc]' command to add entry in the TOC"; ! $lang['L_Abstract'] = "Abstract"; ! $lang['L_Abstract_explain'] = "Use the '[abstract]...[/abstract]' environment to insert an abstract"; ! $lang['L_Title_Format'] = "Title"; ! $lang['L_Title_Format_explain'] = "Use the '[title]...[/title]' environment to insert a main title"; ! $lang['L_Subtitle_Format'] = "Subtitle"; ! $lang['L_Subtitle_Format_explain'] = "Use the '[subtitle]...[/subtitle]' environment to insert a subtitle"; ! $lang['L_Subsubtitle_Format'] = "Sub-subtitle"; ! $lang['L_Subsubtitle_Format'] = "Use the '[subsubtitle]...[/subsubtitle]' environment to insert a small header"; ! $lang['L_Options'] = "Options:"; ! $lang['L_Formatting'] = "Formatting:"; ! $lang['Default_article_id'] = "Set default article, for the article viewer"; ! // Added for v. 2.0 ! $lang['Addtional_field'] = 'More information (optional)'; $lang['No_cat_comments_forum_id'] = 'Comments are enabled but you have not specified the target phpBB forum category in the KB adminCP - Categories'; // Quick Nav $lang['Quick_nav'] = 'Quick Navigation'; $lang['Quick_jump'] = 'Select Category'; $lang['Quick_go'] = 'Go'; // Search $lang['Search'] = 'Search'; $lang['Search_results'] = 'Search Results'; --- 96,198 ---- $lang['Quick_stats'] = 'Quick Stats'; ! $lang['No_Articles'] = 'There are no articles in this category!'; $lang['Not_authorized'] = 'Sorry, but you are not authorized!'; $lang['TOC'] = 'Contents'; ! // // Print version + // $lang['Print_version'] = '[Printable version]'; + // // Stats + // $lang['Top_toprated'] = 'Toprated Articles'; $lang['Top_most_popular'] = 'Most Popular'; $lang['Top_latest'] = 'Latest Articles'; + $lang['Top_id'] = 'Article Id'; + $lang['Top_creation'] = 'Article date'; + $lang['Top_alphabetic'] = 'Alphabetic'; + $lang['Top_userrank'] = 'Author userrank'; // ! // Update result messages // ! $lang['Click_return'] = 'Click %sHere%s to return to previous page'; ! $lang['Click_return_kb'] = 'Click %sHere%s to return to the ' . $lang['KB_title']; ! $lang['Click_return_article'] = 'Click %sHere%s to return to the ' . $lang['Article']; // ! // Article formattting // + $lang['Cat_all'] = 'All'; ! $lang['L_Pages'] = 'Pages'; ! $lang['L_Pages_explain'] = 'Use the \'[pages]\' command to split the article into pages'; ! $lang['L_Toc'] = 'Table of contents (TOC)'; ! $lang['L_Toc_explain'] = 'Use the \'[toc]\' command to add entry in the TOC'; ! $lang['L_Abstract'] = 'Abstract'; ! $lang['L_Abstract_explain'] = 'Use the \'[abstract]...[/abstract]\' environment to insert an abstract'; + $lang['L_Title_Format'] = 'Title'; + $lang['L_Title_Format_explain'] = 'Use the \'[title]...[/title]\' environment to insert a main title'; + $lang['L_Subtitle_Format'] = 'Subtitle'; + $lang['L_Subtitle_Format_explain'] = 'Use the \'[subtitle]...[/subtitle]\' environment to insert a subtitle'; ! $lang['L_Subsubtitle_Format'] = 'Sub-subtitle'; ! $lang['L_Subsubtitle_Format'] = 'Use the \'[subsubtitle]...[/subsubtitle]\' environment to insert a small header'; ! $lang['L_Options'] = 'Options:'; ! $lang['L_Formatting'] = 'Formatting:'; ! $lang['Default_article_id'] = 'Set default article, for the article viewer'; ! // ! // MCP ! // ! $lang['MCP_title'] = 'Moderator Control Panel'; ! $lang['MCP_title_explain'] = 'Here moderators can approve and manage articles'; ! $lang['View'] = 'View'; ! $lang['Approve_selected'] = 'Approve Selected'; ! $lang['Unapprove_selected'] = 'Unapprove Selected'; ! $lang['Delete_selected'] = 'Delete Selected'; ! $lang['No_item'] = 'There is no articles'; ! $lang['All_items'] = 'All articles'; ! $lang['Approved_items'] = 'Approved articles'; ! $lang['Unapproved_items'] = 'Unapproved articles'; ! $lang['Broken_items'] = 'Broken articles'; ! $lang['Item_cat'] = 'Articles in Category'; ! $lang['Approve'] = 'Approve'; ! $lang['Unapprove'] = 'Unapprove'; ! $lang['Sorry_auth_delete'] = 'Sorry, but you cannot delete articles in this category.'; ! $lang['Sorry_auth_mcp'] = 'Sorry, but you cannot moderate this category.'; ! $lang['Sorry_auth_approve'] = 'Sorry, but you cannot approve articles in this category.'; ! $lang['Sorry_auth_post'] = 'Sorry, but you cannot post articles in this category.'; ! $lang['Sorry_auth_edit'] = 'Sorry, but you cannot edit articles in this category.'; ! $lang['Edit_article'] = 'Edit'; ! $lang['Delete_article'] = 'Delete'; + // + // Added for v. 2.0 + // + $lang['Addtional_field'] = 'More information (optional)'; $lang['No_cat_comments_forum_id'] = 'Comments are enabled but you have not specified the target phpBB forum category in the KB adminCP - Categories'; + // // Quick Nav + // $lang['Quick_nav'] = 'Quick Navigation'; $lang['Quick_jump'] = 'Select Category'; $lang['Quick_go'] = 'Go'; + // // Search + // $lang['Search'] = 'Search'; $lang['Search_results'] = 'Search Results'; *************** *** 196,200 **** --- 206,212 ---- $lang['Submiter'] = 'Submitted by'; + // // Comments + // $lang['KB_comment_prefix'] = '[ KB ] '; $lang['Comments'] = 'Comments'; *************** *** 208,212 **** $lang['Comment_deleted'] = 'The comment you selected has been deleted successfully'; $lang['Comment_desc'] = 'Title'; ! $lang['No_comments'] = 'No Comments have been posted yet.'; $lang['Links_are_ON'] = 'Links are <u>ENABLED</u>'; $lang['Links_are_OFF'] = 'Links are <u>DISABLED</u>'; --- 220,224 ---- $lang['Comment_deleted'] = 'The comment you selected has been deleted successfully'; $lang['Comment_desc'] = 'Title'; ! $lang['No_comments'] = 'Not commented'; $lang['Links_are_ON'] = 'Links are <u>ENABLED</u>'; $lang['Links_are_OFF'] = 'Links are <u>DISABLED</u>'; *************** *** 221,223 **** --- 233,263 ---- $lang['Msg_length_6'] = ' characters remaining.'; + // + // Rate + // + $lang['Votes_label'] = 'Rating'; + $lang['Votes'] = 'Votes'; + $lang['No_votes'] = 'No votes'; + $lang['Rate'] = 'Rate Article'; + $lang['ADD_RATING'] = '[Rate Article]'; + $lang['Rerror'] = 'Sorry, you have already rated this article.'; + $lang['Rateinfo'] = 'You are about to rate the article <i>{filename}</i>.<br />Please select a rating. 1 is the worst, 10 is the best.'; + $lang['Rconf'] = 'You have given <i>{filename}</i> a rating of {rate}.<br />This makes the files new rating {newrating}.'; + $lang['R1'] = '1'; + $lang['R2'] = '2'; + $lang['R3'] = '3'; + $lang['R4'] = '4'; + $lang['R5'] = '5'; + $lang['R6'] = '6'; + $lang['R7'] = '7'; + $lang['R8'] = '8'; + $lang['R9'] = '9'; + $lang['R10'] = '10'; + $lang['Click_return_rate'] = 'Click %sHere%s to return to article'; + + // + // Generic Type strings + // - Types are matched against these lang keys...where 'NAME' is the db defined type name + // + $lang['KB_type_NAME'] = 'Example Type'; ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_admin.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lang_admin.php 5 Jul 2006 22:48:26 -0000 1.5 --- lang_admin.php 1 Aug 2006 21:00:38 -0000 1.6 *************** *** 24,40 **** // Parameter Types // ! $lang['ParType_kb_type_select'] = "Advanced phpBB Source Forum Selection"; ! $lang['ParType_kb_type_select_info'] = ""; ! $lang['ParType_default_article_id'] = "Default Article"; ! $lang['ParType_default_article_id_info'] = "- Article Reader"; // // Parameter Names // ! $lang['kb_type_select'] = "KB Source:"; ! $lang['kb_type_select_explain'] = "Select Source KB categories and article types"; ! $lang['default_article_id'] = "Default Article:"; ! $lang['default_article_id_explain'] = "- This article is default (first) displayed if noone else is chosen"; // --- 24,40 ---- // Parameter Types // ! $lang['ParType_kb_type_select'] = 'Advanced phpBB Source Forum Selection'; ! $lang['ParType_kb_type_select_info'] = ''; ! $lang['ParType_default_article_id'] = 'Default Article'; ! $lang['ParType_default_article_id_info'] = '- Article Reader'; // // Parameter Names // ! $lang['kb_type_select'] = 'KB Source:'; ! $lang['kb_type_select_explain'] = 'Select Source KB categories and article types'; ! $lang['default_article_id'] = 'Default Article:'; ! $lang['default_article_id_explain'] = '- This article is default (first) displayed if noone else is chosen'; // *************** *** 58,61 **** --- 58,64 ---- $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB/phpBB root) to the WYSIWYG software folder, eg \'modules/mx_shared/\' if you have uploaded, for example, TinyMCE in modules/mx_shared/tinymce.'; + $lang['Allow_file'] = 'Allow Adding article'; + $lang['Allow_file_info'] = 'If you are not allowed to add articles in this category it will be a higher level category.'; + // // Article *************** *** 83,87 **** $lang['Header_banner_explain'] = 'Show KB logo in the header.'; ! $lang['cat_col'] = 'How many column of categories are to be listed'; $lang['Nfdays'] = 'New Article Days'; --- 86,93 ---- $lang['Header_banner_explain'] = 'Show KB logo in the header.'; ! $lang['Use_simple_navigation'] = 'Simple Category Navigation'; ! $lang['Use_simple_navigation_explain'] = 'If you prefer, this will generate more simple categories and other navigation'; ! ! $lang['Cat_col'] = 'How many column of categories are to be listed (only used for \'Simple Category Navigation\')'; $lang['Nfdays'] = 'New Article Days'; *************** *** 290,294 **** $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; ! $lang['Comment_level'] = 'Comment Level'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; --- 296,303 ---- $lang['Upload_level'] = 'Upload Level'; $lang['Rate_level'] = 'Rate Level'; ! $lang['View_Comment_level'] = 'View Comment'; ! $lang['Post_Comment_level'] = 'Post Comment'; ! $lang['Edit_Comment_level'] = 'Edit Comment'; ! $lang['Delete_Comment_level'] = 'Delete Comment'; $lang['Edit_level'] = ' Edit Level'; $lang['Delete_level'] = 'Delete Level'; *************** *** 344,347 **** --- 353,365 ---- $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; + // These are displayed in the drop down boxes for advanced + // mode auth, try and keep them short! + $lang['Cat_NONE'] = 'NONE'; + $lang['Cat_ALL'] = 'ALL'; + $lang['Cat_REG'] = 'REG'; + $lang['Cat_PRIVATE'] = 'PRIVATE'; + $lang['Cat_MOD'] = 'MOD'; + $lang['Cat_ADMIN'] = 'ADMIN'; + // // Admin Panels - Field Types |
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/kb/includes Modified Files: functions.php functions_admin.php functions_auth.php functions_comment.php functions_kb.php Removed Files: functions_cache.php functions_field.php Log Message: Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** functions.php 5 Jul 2006 22:48:26 -0000 1.11 --- functions.php 1 Aug 2006 21:00:37 -0000 1.12 *************** *** 96,100 **** * @param unknown_type $page_id */ ! function kb_generate_smilies( $mode, $page_id ) { global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; --- 96,100 ---- * @param unknown_type $page_id */ ! function generate_smilies( $mode, $page_id ) { global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; *************** *** 254,258 **** { global $kb_config, $lang, $userdata, $images, $mode; ! global $mx_kb, $HTTP_GET_VARS; global $template, $db, $theme, $gen_simple_header, $starttime, $phpEx, $board_config, $user_ip, $phpbb_root_path; global $admin_level, $level_prior, $tree, $do_gzip_compress; --- 254,258 ---- { global $kb_config, $lang, $userdata, $images, $mode; ! global $mx_kb; global $template, $db, $theme, $gen_simple_header, $starttime, $phpEx, $board_config, $user_ip, $phpbb_root_path; global $admin_level, $level_prior, $tree, $do_gzip_compress; *************** *** 263,285 **** $template->set_filenames( array( 'kb_header' => 'kb_header.tpl' ) ); ! if ( isset ( $HTTP_GET_VARS['cat'] ) ) { ! $category_id = intval ($HTTP_GET_VARS['cat'] ); ! ! if ( $mx_kb->modules[$mx_kb->module_name]->auth_user[$category_id]['auth_post'] || $mx_kb->modules[$mx_kb->module_name]->auth_user[$category_id]['auth_mod'] ) { ! $temp_url = append_sid( $mx_kb->this_mxurl( "mode=add&cat=" . $category_id ) ); ! $add_article = '<a href="' . $temp_url . '">' . $lang['Add_article'] . '</a>'; } - } - else - { - $add_article = $lang['Click_cat_to_add']; } ! $template->assign_block_vars( 'switch_add_article', array() ); ! ! $temp_url = append_sid( $mx_kb->this_mxurl( "mode=search" ) ); ! $search = '<a href="' . $temp_url . '">' . $lang['Search'] . '</a>'; if ( $kb_config['header_banner'] == 1 ) --- 263,281 ---- $template->set_filenames( array( 'kb_header' => 'kb_header.tpl' ) ); ! if ( $mode == 'cat' ) { ! if ( $mx_kb->modules[$mx_kb->module_name]->auth_user[$_REQUEST['cat']]['auth_post'] || $mx_kb->modules[$mx_kb->module_name]->auth_user[$_REQUEST['cat']]['auth_mod'] ) { ! $add_article_url = append_sid( $mx_kb->this_mxurl( "mode=add&cat=" . $_REQUEST['cat'] ) ); ! $template->assign_block_vars( 'switch_add_article', array() ); ! } ! $mcp_url = append_sid( $mx_kb->this_mxurl( "mode=mcp&cat_id={$_REQUEST['cat']}" ) ); ! if ( $mx_kb->modules[$mx_kb->module_name]->auth_user[$_REQUEST['cat']]['auth_mod'] ) ! { ! $template->assign_block_vars( 'MCP', array() ); } } ! $search_url = append_sid( $mx_kb->this_mxurl( "mode=search" ) ); if ( $kb_config['header_banner'] == 1 ) *************** *** 295,302 **** $template->assign_vars( array( 'L_KB_TITLE' => $block_title, ! 'L_ADD_ARTICLE' => $add_article, ! 'L_SEARCH_MODULE' => $search, 'SPACER_IMG' => $images['mx_spacer'], 'U_TOPRATED' => append_sid( $mx_kb->this_mxurl( "mode=stats&stats=toprated" ) ), 'L_TOPRATED' => $lang['Top_toprated'], --- 291,302 ---- $template->assign_vars( array( 'L_KB_TITLE' => $block_title, ! 'L_ADD_ARTICLE' => $lang['Add_article'], ! 'L_MCP' => $lang['MCP_title'], ! 'L_SEARCH' => $lang['Search'], 'SPACER_IMG' => $images['mx_spacer'], + 'U_ADD_ARTICLE' => $add_article_url, + 'U_MCP' => $mcp_url, + 'U_SEARCH' => $search_url, 'U_TOPRATED' => append_sid( $mx_kb->this_mxurl( "mode=stats&stats=toprated" ) ), 'L_TOPRATED' => $lang['Top_toprated'], *************** *** 307,313 **** )); if ( $kb_config['stats_list'] == 1 ) { ! $this->get_quick_stats( $category_id ); } --- 307,328 ---- )); + // + // Ratings enabled for any category ? + // + if ( !empty( $mx_kb->modules[$mx_kb->module_name]->cat_rowset ) ) + { + foreach( $mx_kb->modules[$mx_kb->module_name]->cat_rowset as $cat_id => $cat_row ) + { + if ( $mx_kb->modules[$mx_kb->module_name]->ratings[$cat_id]['activated'] ) + { + $template->assign_block_vars( 'switch_toprated', array() ); + break; + } + } + } + if ( $kb_config['stats_list'] == 1 ) { ! $this->get_quick_stats( $_REQUEST['cat'] ); } *************** *** 404,408 **** $ii++; $type_id = $type['id']; ! $type_name = $type['type']; $sql = "SELECT article_id FROM " . KB_ARTICLES_TABLE . " --- 419,423 ---- $ii++; $type_id = $type['id']; ! $type_name = isset($lang['KB_type_' . $type['type']]) ? $lang['KB_type_' . $type['type']] : $type['type']; $sql = "SELECT article_id FROM " . KB_ARTICLES_TABLE . " *************** *** 424,428 **** if ( !empty( $category_id ) && $number_count > 0 ) { ! $stats_list .= empty($stats_list) ? ':: ' . $type_name . '(' . $number_count . ') :: ' : $type_name . '(' . $number_count . ') ::' ; } } --- 439,443 ---- if ( !empty( $category_id ) && $number_count > 0 ) { ! $stats_list .= empty($stats_list) ? $type_name . '(' . $number_count . ') ' : '• ' . $type_name . '(' . $number_count . ') ' ; } } *************** *** 456,460 **** while ( $type = $db->sql_fetchrow( $type_result ) ) { ! $type_name = $type['type']; $type_id = $type['id']; --- 471,475 ---- while ( $type = $db->sql_fetchrow( $type_result ) ) { ! $type_name = isset($lang['KB_type_' . $type['type']]) ? $lang['KB_type_' . $type['type']] : $type['type']; $type_id = $type['id']; *************** *** 677,682 **** } - include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); - /** * mx_kb_notification. --- 692,695 ---- Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_admin.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_admin.php 8 Jul 2006 10:21:36 -0000 1.7 --- functions_admin.php 1 Aug 2006 21:00:37 -0000 1.8 *************** *** 66,73 **** $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=edit&cat=$category_id" ); ! $edit = '<a href="' . $temp_url . '"><img src="' . $images['kb_icon_edit'] . '" border="0" alt="' . $lang['Edit'] . '"></a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=delete&cat=$category_id" ); ! $delete = '<a href="' . $temp_url . '" class="gen"><img src="' . $images['kb_icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=up&cat=$category_id" ); --- 66,73 ---- $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=edit&cat=$category_id" ); ! $edit = '<a href="' . $temp_url . '">'.$lang['Edit'].'</a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=delete&cat=$category_id" ); ! $delete = '<a href="' . $temp_url . '" class="gen">'.$lang['Delete'].'</a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb.$phpEx?action=cat_manage&mode=up&cat=$category_id" ); --- functions_cache.php DELETED --- Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_comment.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions_comment.php 5 Jul 2006 22:48:26 -0000 1.8 --- functions_comment.php 1 Aug 2006 21:00:37 -0000 1.9 *************** *** 94,101 **** $this->forum_id = $mx_kb->modules[$mx_kb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_comment']; ! $this->auth['auth_post'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_comment']; ! $this->auth['auth_edit'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_comment']; ! $this->auth['auth_delete'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_comment']; $this->auth['auth_mod'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_mod']; --- 94,101 ---- $this->forum_id = $mx_kb->modules[$mx_kb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_view_comment']; ! $this->auth['auth_post'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_post_comment']; ! $this->auth['auth_edit'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_edit_comment']; ! $this->auth['auth_delete'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_delete_comment']; $this->auth['auth_mod'] = $mx_kb->modules[$mx_kb->module_name]->auth_user[$this->cat_id]['auth_mod']; *************** *** 378,382 **** // Instantiate the mx_text and mx_text_formatting classes // - include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); // Note: allowed_html_tags is altered above --- 378,381 ---- Index: functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_auth.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_auth.php 7 Jun 2006 20:28:54 -0000 1.3 --- functions_auth.php 1 Aug 2006 21:00:37 -0000 1.4 *************** *** 15,18 **** --- 15,58 ---- /** + * Auth Defs. + * + */ + define('KB_AUTH_ALL', 0); // In reality only option used ;) + define('KB_AUTH_VIEW', 1); + define('KB_AUTH_EDIT', 2); + define('KB_AUTH_DELETE', 3); + define('KB_AUTH_POST', 4); + define('KB_AUTH_RATE', 5); + + define('KB_AUTH_VIEW_COMMENT', 10); + define('KB_AUTH_POST_COMMENT', 11); + define('KB_AUTH_EDIT_COMMENT', 12); + define('KB_AUTH_DELETE_COMMENT', 13); + + define('KB_AUTH_APPROVAL', 20); + define('KB_AUTH_APPROVAL_EDIT', 21); + + /** + * Auth API. + * + * $class->auth_user['auth_view']; + * $class->auth_user['auth_post']; + * $class->auth_user['auth_edit']; + * $class->auth_user['auth_delete']; + * + * $class->auth_user['auth_approval']; + * $class->auth_user['auth_approval_edit']; + * + * $class->auth_user['auth_rate']; + * + * $class->auth_user['auth_view_comment']; + * $class->auth_user['auth_post_comment']; + * $class->auth_user['auth_edit_comment']; + * $class->auth_user['auth_delete_comment']; + * + * $class->auth_user['auth_mod']; + */ + + /** * Enter description here... * *************** *** 29,36 **** * @param unknown_type $userdata * @param unknown_type $f_access - * @param unknown_type $f_access_group * @return unknown */ ! function auth( $type, $cat_id, $userdata, $f_access = '', $f_access_group = '' ) { global $db, $lang; --- 69,75 ---- * @param unknown_type $userdata * @param unknown_type $f_access * @return unknown */ ! function auth( $type, $cat_id, $userdata, $f_access = '' ) { global $db, $lang; *************** *** 38,49 **** switch ( $type ) { ! case AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_post, a.auth_rate, a.auth_comment, a.auth_edit, a.auth_delete, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_comment_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_post', 'auth_rate', 'auth_comment', 'auth_edit', 'auth_delete', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_comment_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); break; ! case AUTH_VIEW: $a_sql = 'a.auth_view'; $a_sql_groups = 'a.auth_view_groups'; --- 77,88 ---- switch ( $type ) { ! case KB_AUTH_ALL: ! $a_sql = 'a.auth_view, a.auth_edit, a.auth_delete, a.auth_post, a.auth_rate, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_approval, a.auth_approval_edit'; ! $a_sql_groups = 'a.auth_view_groups, a.auth_edit_groups, a.auth_delete_groups, a.auth_post_groups, a.auth_rate_groups, a.auth_view_comment_groups, a.auth_post_comment_groups, a.auth_edit_comment_groups, a.auth_delete_comment_groups, a.auth_approval_groups, a.auth_approval_edit_groups'; ! $auth_fields = array( 'auth_view', 'auth_edit', 'auth_delete', 'auth_post', 'auth_rate', 'auth_view_comment', 'auth_post_comment', 'auth_edit_comment', 'auth_delete_comment', 'auth_approval', 'auth_approval_edit' ); ! $auth_fields_groups = array( 'auth_view_groups', 'auth_edit_groups', 'auth_delete_groups', 'auth_post_groups', 'auth_rate_groups', 'auth_view_comment_groups', 'auth_post_comment_groups', 'auth_edit_comment_groups', 'auth_delete_comment_groups', 'auth_approval_groups', 'auth_approval_edit_groups' ); break; ! case KB_AUTH_VIEW: $a_sql = 'a.auth_view'; $a_sql_groups = 'a.auth_view_groups'; *************** *** 52,56 **** break; ! case AUTH_POST: $a_sql = 'a.auth_post'; $a_sql_groups = 'a.auth_post_groups'; --- 91,109 ---- break; ! case KB_AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); ! break; ! ! case KB_AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); ! break; ! ! case KB_AUTH_POST: $a_sql = 'a.auth_post'; $a_sql_groups = 'a.auth_post_groups'; *************** *** 59,63 **** break; ! case AUTH_RATE: $a_sql = 'a.auth_rate'; $a_sql_groups = 'a.auth_rate_groups'; --- 112,116 ---- break; ! case KB_AUTH_RATE: $a_sql = 'a.auth_rate'; $a_sql_groups = 'a.auth_rate_groups'; *************** *** 66,91 **** break; ! case AUTH_COMMENT: ! $a_sql = 'a.auth_comment'; ! $a_sql_groups = 'a.auth_comment_groups'; ! $auth_fields = array( 'auth_comment' ); ! $auth_fields_groups = array( 'auth_comment_groups' ); break; ! case AUTH_EDIT: ! $a_sql = 'a.auth_edit'; ! $a_sql_groups = 'a.auth_edit_groups'; ! $auth_fields = array( 'auth_edit' ); ! $auth_fields_groups = array( 'auth_edit_groups' ); break; ! case AUTH_DELETE: ! $a_sql = 'a.auth_delete'; ! $a_sql_groups = 'a.auth_delete_groups'; ! $auth_fields = array( 'auth_delete' ); ! $auth_fields_groups = array( 'auth_delete_groups' ); break; ! case AUTH_APPROVAL: $a_sql = 'a.auth_approval'; $a_sql_groups = 'a.auth_approval_groups'; --- 119,151 ---- break; ! case KB_AUTH_VIEW_COMMENT: ! $a_sql = 'a.auth_view_comment'; ! $a_sql_groups = 'a.auth_view_comment_groups'; ! $auth_fields = array( 'auth_view_comment' ); ! $auth_fields_groups = array( 'auth_view_comment_groups' ); break; ! case KB_AUTH_POST_COMMENT: ! $a_sql = 'a.auth_post_comment'; ! $a_sql_groups = 'a.auth_post_comment_groups'; ! $auth_fields = array( 'auth_post_comment' ); ! $auth_fields_groups = array( 'auth_post_comment_groups' ); break; ! case KB_AUTH_EDIT_COMMENT: ! $a_sql = 'a.auth_edit_comment'; ! $a_sql_groups = 'a.auth_edit_comment_groups'; ! $auth_fields = array( 'auth_edit_comment' ); ! $auth_fields_groups = array( 'auth_edit_comment_groups' ); break; ! case KB_AUTH_DELETE_COMMENT: ! $a_sql = 'a.auth_delete_comment'; ! $a_sql_groups = 'a.auth_delete_comment_groups'; ! $auth_fields = array( 'auth_delete_comment' ); ! $auth_fields_groups = array( 'auth_delete_comment_groups' ); ! break; ! ! case KB_AUTH_APPROVAL: $a_sql = 'a.auth_approval'; $a_sql_groups = 'a.auth_approval_groups'; *************** *** 94,98 **** break; ! case AUTH_APPROVAL_EDIT: $a_sql = 'a.auth_approval_edit'; $a_sql_groups = 'a.auth_approval_edit_groups'; --- 154,158 ---- break; ! case KB_AUTH_APPROVAL_EDIT: $a_sql = 'a.auth_approval_edit'; $a_sql_groups = 'a.auth_approval_edit_groups'; *************** *** 115,119 **** $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! $sql = "SELECT a.category_id, $a_sql FROM " . KB_CATEGORIES_TABLE . " a $forum_match_sql"; --- 175,179 ---- $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; ! $sql = "SELECT * FROM " . KB_CATEGORIES_TABLE . " a $forum_match_sql"; *************** *** 133,162 **** } - // - // If f_access_group has not been passed, or auth is needed to return an array of forums - // then we need to pull the auth information on the given forum (or all forums) - // - if ( empty($f_access_group) ) - { - $forum_match_sql = ( $cat_id != AUTH_LIST_ALL ) ? "WHERE a.category_id = $cat_id" : ''; - - $sql = "SELECT a.category_id, $a_sql_groups, a.auth_moderator_groups - FROM " . KB_CATEGORIES_TABLE . " a - $forum_match_sql"; - if ( !($result = $db->sql_query($sql)) ) - { - mx_message_die(GENERAL_ERROR, 'Failed obtaining forum access control lists', '', __LINE__, __FILE__, $sql); - } - - $sql_fetchrow = ( $cat_id != AUTH_LIST_ALL ) ? 'sql_fetchrow' : 'sql_fetchrowset'; - - if ( !($f_access_group = $db->$sql_fetchrow($result)) ) - { - $db->sql_freeresult($result); - return array(); - } - $db->sql_freeresult($result); - } - $auth_user = array(); for( $i = 0; $i < count( $auth_fields ); $i++ ) --- 193,196 ---- *************** *** 175,179 **** { $value = $f_access[$key]; ! $value_groups = $f_access_group[$key_groups]; switch ( $value ) --- 209,213 ---- { $value = $f_access[$key]; ! $value_groups = $f_access[$key_groups]; switch ( $value ) *************** *** 195,204 **** case AUTH_ACL: // PRIVATE ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; --- 229,238 ---- case AUTH_ACL: // PRIVATE ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth_user[$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 213,216 **** --- 247,255 ---- break; } + + // + // Fix for multiblocks + // + $this->auth_user[$key] = $this->ns_auth_cat($cat_id) && $this->auth_user[$key]; } else *************** *** 219,223 **** { $value = $f_access[$k][$key]; ! $value_groups = $f_access_group[$k][$key_groups]; $f_cat_id = $f_access[$k]['category_id']; --- 258,262 ---- { $value = $f_access[$k][$key]; ! $value_groups = $f_access[$k][$key_groups]; $f_cat_id = $f_access[$k]['category_id']; *************** *** 242,251 **** case AUTH_ACL: // PRIVATE ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; --- 281,290 ---- case AUTH_ACL: // PRIVATE ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $value_groups ) || mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth_user[$f_cat_id][$key] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; $this->auth_user[$f_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; *************** *** 260,263 **** --- 299,308 ---- break; } + + // + // Fix for multiblocks + // + $this->auth_user[$f_cat_id][$key] = $this->ns_auth_cat($f_cat_id) && $this->auth_user[$f_cat_id][$key]; + } } *************** *** 269,273 **** if ( $cat_id != AUTH_LIST_ALL ) { ! $this->auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group['auth_moderator_groups'] ) || $is_admin : 0; } else --- 314,323 ---- if ( $cat_id != AUTH_LIST_ALL ) { ! $this->auth_user['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access['auth_moderator_groups'] ) || $is_admin : 0; ! ! // ! // Fix for multiblocks ! // ! $this->auth_user['auth_mod'] = $this->ns_auth_cat($cat_id) && $this->auth_user['auth_mod']; } else *************** *** 277,284 **** $f_cat_id = $f_access[$k]['category_id']; ! $this->auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access_group[$k]['auth_moderator_groups'] ) || $is_admin : 0; } } - return $this->auth_user; } --- 327,338 ---- $f_cat_id = $f_access[$k]['category_id']; ! $this->auth_user[$f_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? mx_is_group_member( $f_access[$k]['auth_moderator_groups'] ) || $is_admin : 0; ! ! // ! // Fix for multiblocks ! // ! $this->auth_user[$f_cat_id]['auth_mod'] = $this->ns_auth_cat($f_cat_id) && $this->auth_user[$f_cat_id]['auth_mod']; } } } *************** *** 298,304 **** } ! $tmp_kb = $kb_type_select_data[$cat_id] == 1; ! ! return $tmp_kb; } } --- 352,356 ---- } ! return $kb_type_select_data[$cat_id] == 1; } } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** functions_kb.php 8 Jul 2006 10:21:36 -0000 1.14 --- functions_kb.php 1 Aug 2006 21:00:37 -0000 1.15 *************** *** 146,180 **** $this->subcat_rowset[$cat_rowset[$i]['parent']][$cat_rowset[$i]['category_id']] = $cat_rowset[$i]; $this->total_cat++; - } ! // ! // Comments ! // Note: some settings are category dependent, but may use default config settings ! // ! $this->comments[$cat_rowset[$i]['category_id']]['activated'] = $cat_rowset[$i]['cat_allow_comments'] == -1 ? ($kb_config['use_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['cat_allow_comments'] == 1 ? true : false ); ! $this->comments[$cat_rowset[$i]['category_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($kb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments [...1682 lines suppressed...] *************** *** 1819,1825 **** // Just to be safe ;o) // if ( !defined( "ENT_COMPAT" ) ) define( "ENT_COMPAT", 2 ); if ( !defined( "ENT_NOQUOTES" ) ) define( "ENT_NOQUOTES", 0 ); if ( !defined( "ENT_QUOTES" ) ) define( "ENT_QUOTES", 3 ); ! ?> \ No newline at end of file --- 2196,2203 ---- // Just to be safe ;o) // + /* if ( !defined( "ENT_COMPAT" ) ) define( "ENT_COMPAT", 2 ); if ( !defined( "ENT_NOQUOTES" ) ) define( "ENT_NOQUOTES", 0 ); if ( !defined( "ENT_QUOTES" ) ) define( "ENT_QUOTES", 3 ); ! */ ?> \ No newline at end of file --- functions_field.php DELETED --- |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:00:42
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21873/modules/mx_kb/kb/modules Modified Files: kb_article.php kb_cat.php kb_main.php kb_post.php kb_post_comment.php kb_search.php kb_stats.php Added Files: kb_mcp.php Removed Files: kb_moderator.php Log Message: Index: kb_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_stats.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_stats.php 5 Jul 2006 22:48:26 -0000 1.5 --- kb_stats.php 1 Aug 2006 21:00:38 -0000 1.6 *************** *** 36,40 **** $stats = $mx_request_vars->request('stats', MX_TYPE_NO_TAGS, ''); ! $this->generate_jumpbox( 'auth_view', 0, 0, true ); $template->set_filenames( array( 'body' => 'kb_stats_body.tpl' ) ); --- 36,41 ---- $stats = $mx_request_vars->request('stats', MX_TYPE_NO_TAGS, ''); ! //$this->generate_jumpbox( 'auth_view', 0, 0, true ); ! $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); $template->set_filenames( array( 'body' => 'kb_stats_body.tpl' ) ); *************** *** 70,74 **** $this->display_stats( $start, $stats ); - //$this->display_stats( $stats, '1', 'articlerow', $start, $kb_config['pagination'] ); // --- 71,74 ---- *************** *** 88,92 **** // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 'auth_view', 0, 0, true ); } --- 88,93 ---- // Get footer quick dropdown jumpbox // ! //$this->generate_jumpbox( 'auth_view', 0, 0, true ); ! $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); } --- kb_moderator.php DELETED --- Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_post.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_post.php 5 Jul 2006 22:48:26 -0000 1.8 --- kb_post.php 1 Aug 2006 21:00:38 -0000 1.9 *************** *** 27,34 **** function main( $action ) { ! global $template, $mx_kb_functions, $lang, $board_config, $phpEx, $kb_config, $db, $images, $userdata, $_POST; ! global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $theme; ! global $HTTP_POST_VARS; // --- 27,33 ---- function main( $action ) { ! global $template, $mx_kb_functions, $lang, $board_config, $phpEx, $kb_config, $db, $images, $userdata; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars, $theme; ! global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; // *************** *** 36,92 **** // $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); $kb_post_mode = empty( $article_id ) ? 'add' : 'edit'; //Main mode toggle $this->page_title = $kb_post_mode == 'add' ? $lang['Add_article'] : $lang['Edit_article']; $delete = $mx_request_vars->request('delete', MX_TYPE_NO_TAGS, ''); - $submit = $mx_request_vars->is_request('article_submit'); $preview = $mx_request_vars->is_request('preview'); $cancel = $mx_request_vars->is_request('cancel'); ! if ( $mx_request_vars->is_request('cat') ) ! { ! $category_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); ! ! } ! else if( $kb_post_mode == 'edit') { ! $category_id = $this->get_cat_id($article_id); } else { ! mx_message_die( GENERAL_MESSAGE, $lang['Category_not_exsist'] ); } // ! // First (re)declare basic variables // ! $kb_row = array(); ! if ( $kb_post_mode == 'edit' ) { ! $sql = "SELECT * ! FROM " . KB_ARTICLES_TABLE . " ! WHERE article_id = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, "Could not obtain article data", '', __LINE__, __FILE__, $sql ); } ! $kb_row = $db->sql_fetchrow( $result ); } ! $kb_title = $preview || isset($HTTP_POST_VARS['article_name']) ? $HTTP_POST_VARS['article_name'] : $kb_row['article_title']; ! $kb_desc = $preview || isset($HTTP_POST_VARS['article_desc']) ? $HTTP_POST_VARS['article_desc'] : $kb_row['article_description']; ! $kb_text = $preview || isset($HTTP_POST_VARS['message']) ? $HTTP_POST_VARS['message'] : $kb_row['article_body']; ! $bbcode_uid = $preview ? '' : $kb_row['bbcode_uid']; ! $username = $preview || isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : $kb_row['username']; ! $type_id = $preview || isset($HTTP_POST_VARS['type_id']) ? intval($HTTP_POST_VARS['type_id']) : $kb_row['article_type']; // // Instatiate custom fields (only used in kb_article) // ! include_once( $module_root_path . 'kb/includes/functions_field.' . $phpEx ); ! $mx_kb_custom_field = new mx_kb_custom_field(); $mx_kb_custom_field->init(); --- 35,166 ---- // $article_id = $mx_request_vars->request('k', MX_TYPE_INT, ''); + $cat_id = $mx_request_vars->request('cat', MX_TYPE_INT, 0); + + $do = ( isset( $_REQUEST['do'] ) ) ? intval( $_REQUEST['do'] ) : ''; $kb_post_mode = empty( $article_id ) ? 'add' : 'edit'; //Main mode toggle $this->page_title = $kb_post_mode == 'add' ? $lang['Add_article'] : $lang['Edit_article']; $delete = $mx_request_vars->request('delete', MX_TYPE_NO_TAGS, ''); $preview = $mx_request_vars->is_request('preview'); $cancel = $mx_request_vars->is_request('cancel'); ! // ! // Main Auth ! // ! if ( !empty( $cat_id ) ) { ! if ( !$this->auth_user[$cat_id]['auth_post'] ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); ! } } else { ! $dropmenu = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true, true, 'auth_post' ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true, 'auth_post' ); ! ! if ( empty( $dropmenu ) ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); ! } } // ! // Load article info...if $article_id is set // ! if ( $article_id ) { ! $sql = 'SELECT * ! FROM ' . KB_ARTICLES_TABLE . " ! WHERE article_id = '" . $article_id . "'"; if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query Article data', '', __LINE__, __FILE__, $sql ); } ! $article_data = $db->sql_fetchrow( $result ); ! ! $db->sql_freeresult( $result ); } ! // ! // Further security. ! // Reset vars if no related data exist. ! // ! if ( $article_id && !$article_data['article_category_id'] ) ! { ! $article_id = 0; ! } ! if ( $cat_id && !$this->cat_rowset[$cat_id]['category_id'] ) ! { ! $cat_id = 0; ! } ! ! // ======================================================= ! // Delete ! // ======================================================= ! if ( $do == 'delete' && $article_id) ! { ! if ( ( $this->auth_user[$article_data['article_category_id']]['auth_delete'] && $article_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$article_data['article_category_id']]['auth_mod'] ) ! { ! // ! // Notification ! // ! $this->update_add_item_notify($article_id, 'delete'); ! ! // ! // Comments ! // ! if ($this->comments[$article_data['article_category_id']]['activated'] && $kb_config['del_topic']) ! { ! if ( $this->comments[$article_data['article_category_id']]['internal_comments'] ) ! { ! $sql = 'DELETE FROM ' . KB_COMMENTS_TABLE . " ! WHERE article_id = '" . $article_id . "'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! if ( $article_data['topic_id'] ) ! { ! include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); ! $mx_kb_comments = new mx_kb_comments(); ! $mx_kb_comments->init( $article_data, 'phpbb'); ! $mx_kb_comments->post('delete_all', $article_data['topic_id']); ! } ! } ! } ! ! $this->delete_items( $article_id ); ! $this->_kb(); ! $message = $lang['Articledeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "mode=cat&cat=" . $article_data['article_category_id'] ) ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! } ! else ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_delete'] ); ! } ! } ! ! // ! // Define more vars ! // ! $kb_title = $preview || isset($_POST['article_name']) ? $_POST['article_name'] : $article_data['article_title']; ! $kb_desc = $preview || isset($_POST['article_desc']) ? $_POST['article_desc'] : $article_data['article_description']; ! $kb_text = $preview || isset($_POST['message']) ? $_POST['message'] : $article_data['article_body']; ! $bbcode_uid = $preview ? '' : $article_data['bbcode_uid']; ! ! $username = $preview || isset($_POST['username']) ? $_POST['username'] : $article_data['username']; ! $type_id = $preview || isset($_POST['type_id']) ? intval($_POST['type_id']) : $article_data['article_type']; // // Instatiate custom fields (only used in kb_article) // ! $mx_kb_custom_field = new mx_custom_field(KB_CUSTOM_TABLE, KB_CUSTOM_DATA_TABLE); $mx_kb_custom_field->init(); *************** *** 127,131 **** // Instantiate the mx_text and mx_text_formatting classes // - include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); --- 201,204 ---- *************** *** 140,146 **** // ! // post article ----------------------------------------------------------------------------ADD/EDIT // ! if ( $submit ) { if ( !$mx_request_vars->is_request('article_name') || !$mx_request_vars->is_request('article_desc') || !$mx_request_vars->is_request('message') ) --- 213,219 ---- // ! // IF submit then upload the article and update the sql for it // ! if ( isset( $_POST['submit'] ) && $cat_id ) { if ( !$mx_request_vars->is_request('article_name') || !$mx_request_vars->is_request('article_desc') || !$mx_request_vars->is_request('message') ) *************** *** 162,182 **** $author_id = $userdata['user_id'] > 0 ? intval( $userdata['user_id'] ) : '-1'; ! switch ( $kb_post_mode ) { ! case 'edit': // UPDATE Article ------------------------------------------- ! if ( !($this->auth_user[$category_id]['auth_edit'] || $this->auth_user[$category_id]['auth_mod']) ) { ! $message = $lang['No_edit'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } // // Approve // ! $approve = $this->auth_user[$category_id]['auth_mod'] || $this->auth_user[$category_id]['auth_approval_edit'] ? 1 : 2; // approved $sql = "UPDATE " . KB_ARTICLES_TABLE . " ! SET article_category_id = '$category_id', article_title = '" . str_replace( "\'", "''", $article_title ) . "', article_description = '" . str_replace( "\'", "''", $article_description ) . "', --- 235,290 ---- $author_id = $userdata['user_id'] > 0 ? intval( $userdata['user_id'] ) : '-1'; ! if ( !$article_id ) { ! if ( $this->auth_user[$cat_id]['auth_post'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! // ! // Approve ! // ! $approve = $this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod'] ? 1 : 0; // approved ! $sql = "INSERT INTO " . KB_ARTICLES_TABLE . " ( article_category_id , article_title , article_description , article_date , article_author_id , username , bbcode_uid , article_body , article_type , approved, views ) ! VALUES ( '$cat_id', '" . str_replace( "\'", "''", $article_title ) . "', '" . str_replace( "\'", "''", $article_description ) . "', '$date', '$author_id', '" . str_replace( "\'", "''", $username ) . "', '$bbcode_uid', '" . str_replace( "\'", "''", $article_text ) . "', '$type_id', '$approve', '0')"; ! ! if ( !( $results = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, "Could not submit aritcle", '', __LINE__, __FILE__, $sql ); ! } ! ! // ! // Get new article id ! // ! $sql = "SELECT MAX(article_id) AS new_id FROM " . KB_ARTICLES_TABLE; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't find max article_id", "", __LINE__, __FILE__, $sql); } + $temp_row = $db->sql_fetchrow($result); + $article_id = $temp_row['new_id']; // + // Update custom fields + // + $mx_kb_custom_field->file_update_data( $article_id ); + + $this->modified( true ); + $this->_kb(); + } + else + { + $message = $lang['Sorry_auth_post']; + } + } + else + { + if ( ($this->auth_user[$cat_id]['auth_edit'] && $article_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) + { + // // Approve // ! $approve = $this->auth_user[$cat_id]['auth_mod'] || $this->auth_user[$cat_id]['auth_approval_edit'] ? 1 : 0; // approved $sql = "UPDATE " . KB_ARTICLES_TABLE . " ! SET article_category_id = '$cat_id', article_title = '" . str_replace( "\'", "''", $article_title ) . "', article_description = '" . str_replace( "\'", "''", $article_description ) . "', *************** *** 193,253 **** } - $this->modified( true ); - - break; - - case 'add': // ADD NEW --------------------------------------------------------------------------------- - - if ( !($this->auth_user[$category_id]['auth_post'] || $this->auth_user[$category_id]['auth_mod']) ) - { - $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); - } - - // - // Approve // ! $approve = $this->auth_user[$category_id]['auth_approval'] || $this->auth_user[$category_id]['auth_mod'] ? 1 : 0; // approved ! ! $sql = "INSERT INTO " . KB_ARTICLES_TABLE . " ( article_category_id , article_title , article_description , article_date , article_author_id , username , bbcode_uid , article_body , article_type , approved, views ) ! VALUES ( '$category_id', '" . str_replace( "\'", "''", $article_title ) . "', '" . str_replace( "\'", "''", $article_description ) . "', '$date', '$author_id', '" . str_replace( "\'", "''", $username ) . "', '$bbcode_uid', '" . str_replace( "\'", "''", $article_text ) . "', '$type_id', '$approve', '0')"; ! ! if ( !( $results = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not submit aritcle", '', __LINE__, __FILE__, $sql ); ! } ! ! // ! // Get new article id // ! $sql = "SELECT MAX(article_id) AS new_id FROM " . KB_ARTICLES_TABLE; ! if( !($result = $db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, "Couldn't find max article_id", "", __LINE__, __FILE__, $sql); ! } ! $temp_row = $db->sql_fetchrow($result); ! $article_id = $temp_row['new_id']; $this->modified( true ); ! ! break; } // - // Update custom fields - // - $mx_kb_custom_field->file_update_data( $article_id ); - - $this->_kb(); - - // // Notification // ! $this->update_add_article_notify($article_id, $kb_post_mode); // // Auto comment // ! if ( $this->comments[$category_id]['activated'] && $this->comments[$category_id]['autogenerate_comments'] ) { // --- 301,327 ---- } // ! // Update custom fields // ! $mx_kb_custom_field->file_update_data( $article_id ); $this->modified( true ); ! $this->_kb(); ! } ! else ! { ! $message = $lang['Sorry_auth_edit']; ! } } // // Notification // ! $this->update_add_item_notify($article_id, $kb_post_mode); // // Auto comment // ! if ( $this->comments[$cat_id]['activated'] && $this->comments[$cat_id]['autogenerate_comments'] ) { // *************** *** 272,404 **** $message = $lang['Article_submitted_Approve'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } - mx_message_die( GENERAL_MESSAGE, $message ); - } ! // ---------------------------------------------------------------------------------------------------------- MAIN FORM ! // ---------------------------------------------------------------------------------------------------------- ! // ---------------------------------------------------------------------------------------------------------- ! ! // ! // PreText HIDE/SHOW ! // ! if ( $kb_config['show_pretext'] ) ! { ! // Pull Header/Body info. ! $pt_header = $kb_config['pt_header']; ! $pt_body = $kb_config['pt_body']; ! ! $template->set_filenames( array( 'pretext' => 'kb_post_pretext.tpl' ) ); ! ! $template->assign_vars( array( ! 'PRETEXT_HEADER' => $pt_header, ! 'PRETEXT_BODY' => $pt_body ) ); ! ! $template->assign_var_from_handle( 'KB_PRETEXT_BOX', 'pretext' ); } ! ! // ! // Security ! // ! if ( !$this->auth_user[$category_id]['auth_mod'] ) { ! if ( $kb_post_mode == 'edit' && !$this->auth_user[$category_id]['auth_edit'] ) { ! $message = $lang['No_edit'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } ! ! if ( $kb_post_mode == 'add' && ( !$this->auth_user[$category_id]['auth_post'] || $kb_config['enable_module'] == 0 ) ) { ! $message = $lang['No_add'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } - } - if ( $preview ) - { // ! // Encode for preview // ! $preview_title = $mx_text->encode_preview_simple($kb_title); ! $preview_desc = $mx_text->encode_preview_simple($kb_desc); ! $preview_text = $mx_text->encode_preview($kb_text); ! ! if (!$kb_config['allow_images'] || !$kb_config['allow_links']) { ! $preview_text = $mx_text_formatting->remove_images_links( $preview_text, $kb_config['allow_images'], $kb_config['no_image_message'], $kb_config['allow_links'], $kb_config['no_link_message'] ); } ! $template->set_filenames( array( 'preview' => 'kb_post_preview.tpl' ) ); ! $template->assign_vars( array( ! 'L_PREVIEW' => $lang['Preview'], ! 'ARTICLE_TITLE' => $preview_title, ! 'ARTICLE_DESC' => $preview_desc, ! 'ARTICLE_BODY' => $preview_text, ! 'PREVIEW_MESSAGE' => $preview_text ) ! ); ! $template->assign_var_from_handle( 'KB_PREVIEW_BOX', 'preview' ); // ! // Decode for form editing // ! $kb_title = $mx_text->decode_simple($kb_title, true); ! $kb_desc = $mx_text->decode_simple($kb_desc, true); ! $kb_text = $mx_text->decode($kb_text, '', true); ! } ! else ! { // ! // Decode for form editing // ! $kb_title = $mx_text->decode_simple($kb_title, true); ! $kb_desc = $mx_text->decode_simple($kb_desc, true); ! $kb_text = $mx_text->decode($kb_text, $bbcode_uid, true); ! ! } ! ! // ! // show article form - MAIN ! // ! if ( $kb_post_mode == 'edit' ) ! { ! $s_hidden_vars = '<input type="hidden" name="k" value="' . $article_id . '"><input type="hidden" name="bbcode_uid" value="' . $bbcode_uid . '"><input type="hidden" name="author_id" value="' . $author_id . '">'; ! } ! else ! { ! $s_hidden_vars = '<input type="hidden" name="cat" value="' . $category_id . '">'; ! } ! ! // ! // Toggle selection ! // ! $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; ! $bbcode_status = ( $bbcode_on ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF']; ! $smilies_status = ( $smilies_on ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF']; ! $links_status = ( $links_on ) ? $lang['Links_are_ON'] : $lang['Links_are_OFF']; ! $images_status = ( $images_on ) ? $lang['Images_are_ON'] : $lang['Images_are_OFF']; ! // ! // set up page ! // ! $template->set_filenames( array( 'body' => 'kb_post_body.tpl' ) ); ! if ( !$userdata['session_logged_in'] ) ! { ! $template->assign_block_vars( 'switch_name', array() ); ! } ! $kb_action_url = $kb_post_mode == 'add' ? $this->this_mxurl( 'mode=add' ) : $this->this_mxurl( 'mode=edit' ); ! $custom_data = $kb_post_mode == 'add' ? $mx_kb_custom_field->display_edit() : $mx_kb_custom_field->display_edit( $article_id ); ! if ( $custom_data ) ! { ! $template->assign_block_vars( 'custom_data_fields', array( ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'] ! )); ! } ! $template->assign_vars( array( 'S_ACTION' => $kb_action_url, 'S_HIDDEN_FIELDS' => $s_hidden_vars, --- 346,479 ---- $message = $lang['Article_submitted_Approve'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx" ) . '">', '</a>' ); } ! mx_message_die( GENERAL_MESSAGE, $message ); } ! else ! // ======================================================= ! // IF not submit then load data MAIN form ! // ======================================================= { ! if ( !$article_id ) { ! if ( !$this->auth_user[$article_data['article_category_id']]['auth_post'] ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); ! } } ! else { ! $cat_id = $article_data['article_category_id']; ! if ( !( ( $this->auth_user[$article_data['article_category_id']]['auth_edit'] && $article_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$article_data['article_category_id']]['auth_mod'] ) ) ! { ! mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_edit'] ); ! } } // ! // PreText HIDE/SHOW // ! if ( $kb_config['show_pretext'] ) { ! // ! // Pull Header/Body info. ! // ! $pt_header = $kb_config['pt_header']; ! $pt_body = $kb_config['pt_body']; ! ! $template->set_filenames( array( 'pretext' => 'kb_post_pretext.tpl' ) ); ! ! $template->assign_vars( array( ! 'PRETEXT_HEADER' => $pt_header, ! 'PRETEXT_BODY' => $pt_body ) ); ! ! $template->assign_var_from_handle( 'KB_PRETEXT_BOX', 'pretext' ); } ! if ( $preview ) ! { ! // ! // Encode for preview ! // ! $preview_title = $mx_text->encode_preview_simple($kb_title); ! $preview_desc = $mx_text->encode_preview_simple($kb_desc); ! $preview_text = $mx_text->encode_preview($kb_text); ! if (!$kb_config['allow_images'] || !$kb_config['allow_links']) ! { ! $preview_text = $mx_text_formatting->remove_images_links( $preview_text, $kb_config['allow_images'], $kb_config['no_image_message'], $kb_config['allow_links'], $kb_config['no_link_message'] ); ! } ! $template->set_filenames( array( 'preview' => 'kb_post_preview.tpl' ) ); ! ! $template->assign_vars( array( ! 'L_PREVIEW' => $lang['Preview'], ! 'ARTICLE_TITLE' => $preview_title, ! 'ARTICLE_DESC' => $preview_desc, ! 'ARTICLE_BODY' => $preview_text, ! 'PREVIEW_MESSAGE' => $preview_text ) ! ); ! ! $template->assign_var_from_handle( 'KB_PREVIEW_BOX', 'preview' ); ! ! // ! // Decode for form editing ! // ! $kb_title = $mx_text->decode_simple($kb_title, true); ! $kb_desc = $mx_text->decode_simple($kb_desc, true); ! $kb_text = $mx_text->decode($kb_text, '', true); ! } ! else ! { ! // ! // Decode for form editing ! // ! $kb_title = $mx_text->decode_simple($kb_title, true); ! $kb_desc = $mx_text->decode_simple($kb_desc, true); ! $kb_text = $mx_text->decode($kb_text, $bbcode_uid, true); ! ! } // ! // show article form - MAIN // ! if ( $kb_post_mode == 'edit' ) ! { ! $s_hidden_vars = '<input type="hidden" name="k" value="' . $article_id . '"><input type="hidden" name="bbcode_uid" value="' . $bbcode_uid . '"><input type="hidden" name="author_id" value="' . $author_id . '">'; ! } ! else ! { ! $s_hidden_vars = '<input type="hidden" name="cat" value="' . $cat_id . '">'; ! } ! // ! // Toggle selection // ! $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; ! $bbcode_status = ( $bbcode_on ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF']; ! $smilies_status = ( $smilies_on ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF']; ! $links_status = ( $links_on ) ? $lang['Links_are_ON'] : $lang['Links_are_OFF']; ! $images_status = ( $images_on ) ? $lang['Images_are_ON'] : $lang['Images_are_OFF']; ! // ! // set up page ! // ! $template->set_filenames( array( 'body' => 'kb_post_body.tpl' ) ); ! if ( !$userdata['session_logged_in'] ) ! { ! $template->assign_block_vars( 'switch_name', array() ); ! } ! $kb_action_url = $kb_post_mode == 'add' ? $this->this_mxurl( 'mode=add' ) : $this->this_mxurl( 'mode=edit' ); ! $custom_data = $kb_post_mode == 'add' ? $mx_kb_custom_field->display_edit() : $mx_kb_custom_field->display_edit( $article_id ); ! if ( $custom_data ) ! { ! $template->assign_block_vars( 'custom_data_fields', array( ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'] ! )); ! } ! $template->assign_vars( array( 'S_ACTION' => $kb_action_url, 'S_HIDDEN_FIELDS' => $s_hidden_vars, *************** *** 489,523 **** 'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'], 'L_STYLES_TIP' => $lang['Styles_tip'] ! ) ); ! ! $mx_kb_functions->get_kb_type_list( $type_id ); ! if ( $kb_post_mode == 'edit' ) ! { ! $template->assign_block_vars( 'switch_edit', array( ! 'CAT_LIST' => $this->generate_jumpbox( 'auth_edit', $category_id, $category_id, true ) ! )); ! } ! if ( $bbcode_on ) ! { ! $template->assign_block_vars( 'switch_bbcodes', array()); ! } ! // =================================================== ! // assign var for top navigation ! // =================================================== ! $this->generate_navigation( $category_id ); ! // ! // User authorisation levels output ! // ! $this->auth_can($category_id); ! // ! // Get footer quick dropdown jumpbox ! // ! $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } --- 564,598 ---- 'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'], 'L_STYLES_TIP' => $lang['Styles_tip'] + ) ); ! $mx_kb_functions->get_kb_type_list( $type_id ); ! if ( $kb_post_mode == 'edit' ) ! { ! $template->assign_block_vars( 'switch_edit', array( ! 'CAT_LIST' => $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), false, true, 'auth_edit') ! )); ! } ! if ( $bbcode_on ) ! { ! $template->assign_block_vars( 'switch_bbcodes', array()); ! } ! // =================================================== ! // assign var for top navigation ! // =================================================== ! $this->generate_navigation( $cat_id ); ! // ! // User authorisation levels output ! // ! $this->auth_can( $cat_id ); ! // ! // Get footer quick dropdown jumpbox ! // ! $this->generate_jumpbox( 0, 0, array( $cat_id => 1 )); ! } } } --- NEW FILE: kb_mcp.php --- <?php /** * * @package mxBB Portal Module - mx_kb * @version $Id: kb_mcp.php,v 1.1 2006/08/01 21:00:38 jonohlsson Exp $ * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, linkdb, Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } /** * Enter description here... * */ class mx_kb_mcp extends mx_kb_public { /** * Enter description here... * * @param unknown_type $action */ function main( $action ) { global $db, $lang, $userdata, $board_config, $phpEx, $images, $debug; global $mx_root_path, $phpbb_root_path, $module_root_path, $is_block, $phpEx; global $mx_kb_functions, $template, $kb_config; $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $id = ( isset( $_REQUEST['id'] ) ) ? intval( $_REQUEST['id'] ) : 0; $ids = ( isset( $_POST['ids'] ) ) ? array_map( 'intval', $_POST['ids'] ) : array(); $start = ( isset( $_REQUEST['start'] ) ) ? intval( $_REQUEST['start'] ) : 0; $mode = $mode_notification = ( isset( $_REQUEST['mode_mcp'] ) ) ? htmlspecialchars( $_REQUEST['mode_mcp'] ) : 'all'; $do_mode = ( isset( $_REQUEST['do_mode'] ) ) ? htmlspecialchars( $_REQUEST['do_mode'] ) : ''; $do_mode = ( isset( $_POST['do_approve'] ) ) ? 'do_approve' : $do_mode; $do_mode = ( isset( $_POST['do_unapprove'] ) ) ? 'do_unapprove' : $do_mode; $do_mode = ( isset( $_POST['do_delete'] ) ) ? 'do_delete' : $do_mode; // =================================================== // Auth for mcp // =================================================== if ( !($this->auth_user[$cat_id]['auth_mod']) && $mode == 'cat') { $message = sprintf( $lang['Sorry_auth_mcp'], $this->auth_user[$cat_id]['auth_mod'] ); mx_message_die( GENERAL_MESSAGE, $message ); } // // Determine all categories in which user is moderator // $moderator_cat_ids = ''; if ( isset( $this->cat_rowset ) ) { foreach( $this->cat_rowset as $auth_cat_id => $cat_row ) { if ($this->auth_user[$auth_cat_id]['auth_mod']) { $moderator_cat_ids .= !empty($moderator_cat_ids) ? ',' . $auth_cat_id : $auth_cat_id; } } } if (empty($moderator_cat_ids)) { mx_message_die( GENERAL_MESSAGE, 'Sorry, you have no moderator permissions...' ); } if ( isset( $_REQUEST['sort_method'] ) ) { switch ( $_REQUEST['sort_method'] ) { case 'Alphabetic': $sort_method = 'article_title'; break; case 'Latest': $sort_method = 'article_date'; break; case 'Views': $sort_method = 'views'; break; case 'Rating': $sort_method = 'rating'; break; default: $sort_method = $kb_config['sort_method']; } } else { $sort_method = $kb_config['sort_method']; } if ( isset( $_REQUEST['sort_order'] ) ) { switch ( $_REQUEST['sort_order'] ) { case 'ASC': $sort_order = 'ASC'; break; case 'DESC': $sort_order = 'DESC'; break; default: $sort_order = $kb_config['sort_order']; } } else { $sort_order = $kb_config['sort_order']; } $s_actions = array( 'unapproved' => $lang['Unapproved_items'], 'cat' => $lang['Item_cat'], 'all' => $lang['All_items'] ); switch ( $mode ) { case '': case 'unapproved': case 'cat': case 'all': default: $template_item = 'kb_mcp.tpl'; $l_title = $lang['MCP_title']; $l_explain = $lang['MCP_title_explain']; break; } // // Approve/Unapprove // if ( $do_mode == 'do_approve' || $do_mode == 'do_unapprove' ) { if ( is_array( $ids ) && !empty( $ids ) ) { foreach( $ids as $temp_id ) { $this->approve_item( $do_mode, $temp_id ); } // // Notification // $this->update_add_item_notify($ids, $do_mode); } else { $this->approve_item( $do_mode, $id ); // // Notification // $this->update_add_item_notify($id, $do_mode); } $this->_kb(); } // // Delete // else if ( $do_mode == 'do_delete' ) { if ( is_array( $ids ) && !empty( $ids ) ) { foreach( $ids as $temp_id ) { $sql = 'SELECT * FROM ' . KB_ARTICLES_TABLE . " WHERE article_id = $temp_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $item_info = $db->sql_fetchrow( $result ); // // Notification // $this->update_add_item_notify($temp_id, 'delete'); // // Comments // if ($this->comments[$item_info['article_category_id']]['activated'] && $kb_config['del_topic']) { if ( $this->comments[$item_info['article_category_id']]['internal_comments'] ) { $sql = 'DELETE FROM ' . KB_COMMENTS_TABLE . " WHERE article_id = '" . $temp_id . "'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); } } else { if ( $item_info['topic_id'] ) { include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); $mx_kb_comments = new mx_kb_comments(); $mx_kb_comments->init( $item_info, 'phpbb'); $mx_kb_comments->post('delete_all', $item_info['topic_id']); } } } $this->delete_items( $temp_id ); } } else { $sql = 'SELECT * FROM ' . KB_ARTICLES_TABLE . " WHERE article_id = $id"; if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $item_info = $db->sql_fetchrow( $result ); // // Notification // $this->update_add_item_notify($id, 'delete'); // // Comments // if ($this->comments[$item_info['article_category_id']]['activated'] && $kb_config['del_topic']) { if ( $this->comments[$item_info['article_category_id']]['internal_comments'] ) { $sql = 'DELETE FROM ' . KB_COMMENTS_TABLE . " WHERE article_id = '" . $id . "'"; if ( !( $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); } } else { if ( $item_info['topic_id'] ) { include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); $mx_kb_comments = new mx_kb_comments(); $mx_kb_comments->init( $item_info, 'phpbb'); $mx_kb_comments->post('delete_all', $item_info['topic_id']); } } } $this->delete_items( $id ); } $this->_kb(); } $template->set_filenames( array( 'body' => $template_item ) ); if ($mode == 'cat') { //$s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; } $template->assign_vars( array( 'ARTICLES' => $kb_config['module_name'], 'U_ARTICLES' => append_sid( $this->this_mxurl() ), 'L_MCP_TITLE' => $l_title, 'L_MCP_EXPLAIN' => $l_explain, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_ACTION' => append_sid( $this->this_mxurl( "mode=mcp" ) ) )); // // Lets start displaying... // if ( in_array( $mode, array( 'unapproved', 'cat', 'all' ) ) ) { // // All items (or all items in cat) // if ( $mode == 'all' || $mode == 'cat' ) { $where_sql = ($mode == 'cat') ? "AND article_category_id = '$cat_id'" : ''; $sql = "SELECT article_title, approved, article_id FROM " . KB_ARTICLES_TABLE . " as f1 WHERE approved = '1' ".$where_sql." AND article_category_id IN (".$moderator_cat_ids.") ORDER BY article_date DESC"; if ( ( !$result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $total_num = $db->sql_numrows( $result ); if ( !( $result = $mx_kb_functions->sql_query_limit( $sql, $kb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { $all_rowset[] = $row; } } // // Unapproved files only // if ( $mode == 'unapproved' || $mode == 'all' || $mode == 'cat') { $sql = "SELECT article_title, approved, article_id FROM " . KB_ARTICLES_TABLE . " WHERE approved = '0' AND article_category_id IN (".$moderator_cat_ids.") ORDER BY article_date DESC"; if ($mode == 'unapproved') { if ( !( $result = $mx_kb_functions->sql_query_limit( $sql, $kb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } $total_num = $db->sql_numrows( $result ); } else { if ( ( !$result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get item info', '', __LINE__, __FILE__, $sql ); } } while ( $row = $db->sql_fetchrow( $result ) ) { $unapproved_rowset[] = $row; } } // // Ensure $total_num nonzero to validate pagination // $total_num = empty($total_num) ? 1 : $total_num; // // Define display sets // if ( $mode == '' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'all' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'cat' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ), 1 => array( 'lang_var' => $lang['Approved_items'], 'row_set' => $all_rowset, 'approval' => 'unapprove' ) ); } elseif ( $mode == 'unapproved' ) { $global_array = array( 0 => array( 'lang_var' => $lang['Unapproved_items'], 'row_set' => $unapproved_rowset, 'approval' => 'approve' ) ); } // // Generate Select dropdown navigation // $s_list = ''; foreach( $s_actions as $item_mode => $lang_var ) { $s = ''; if ( $mode == $item_mode ) { $s = ' selected="selected"'; } $s_list .= '<option value="' . $item_mode . '"' . $s . '>' . $lang_var . '</option>'; } $cat_list = '<select name="cat_id">'; if ( !$this->cat_rowset[$cat_id]['cat_parent'] ) { $cat_list .= '<option value="0" selected>' . $lang['None'] . '</option>\n'; } else { $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } $cat_list .= $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), false, true, 'auth_mod' ); $cat_list .= '</select>'; $template->assign_vars( array( 'L_EDIT' => $lang['Edit_article'], // Module specific 'L_DELETE' => $lang['Delete_article'], // Module specific 'L_CATEGORY' => $lang['Category'], 'L_MODE' => $lang['View'], 'L_GO' => $lang['Go'], 'L_DELETE_ITEM' => $lang['Delete_selected'], 'L_APPROVE' => $lang['Approve'], 'L_UNAPPROVE' => $lang['Unapprove'], 'L_APPROVE_ITEM' => $lang['Approve_selected'], 'L_UNAPPROVE_ITEM' => $lang['Unapprove_selected'], 'L_NO_ITEMS' => $lang['No_item'], 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "mode=mcp&mode_mcp=$mode&sort_method=$sort_method&sort_order=$sort_order" ) . ($mode == 'cat' ? "&cat_id=$cat_id" : '') ), $total_num, $kb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $kb_config['pagination'] ) + 1 ), ceil( $total_num / $kb_config['pagination'] ) ), 'S_CAT_LIST' => $cat_list, 'S_MODE_SELECT' => $s_list ) ); foreach( $global_array as $data ) { $approve = false; $unapprove = false; if ( $data['approval'] == 'both' ) { $approve = $unapprove = true; } elseif ( $data['approval'] == 'approve' ) { $approve = true; } elseif ( $data['approval'] == 'unapprove' ) { $unapprove = true; } $template->assign_block_vars( 'mcp_mode', array( 'L_MODE' => $data['lang_var'], 'DATA' => ( isset( $data['row_set'] ) ) ? true : false, 'APPROVE' => $approve, 'UNAPPROVE' => $unapprove ) ); if ( isset( $data['row_set'] ) ) { $i = ( $mode == 'unapproved' || ( count($global_array) > 1 && $data['approval'] == 'unapprove' ) ) ? $start + 1 : '1'; foreach( $data['row_set'] as $item_data ) { $approve_mode = ( $item_data['approved'] ) ? 'do_unapprove' : 'do_approve'; $template->assign_block_vars( 'mcp_mode.row', array( 'NAME' => $item_data['article_title'], 'NUMBER' => $i++, 'ID' => $item_data['article_id'], 'U_EDIT' => append_sid( $this->this_mxurl( "mode=edit&k={$item_data['article_id']}" ) ), 'U_DELETE' => append_sid( $this->this_mxurl( "mode=mcp&mode_mcp=$mode&do_mode=do_delete&id={$item_data['article_id']}" ) ), 'U_APPROVE' => append_sid( $this->this_mxurl( "mode=mcp&mode_mcp=$mode&do_mode=$approve_mode&id={$item_data['article_id']}" ) . ($mode == 'cat' ? "&cat_id=$cat_id" : '') ), 'L_APPROVE' => ( $item_data['approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ) ); } } else { $template->assign_block_vars( 'mcp_mode.no_data', array()); } } } // // Notification // $itemId = !empty($id) ? $id : $ids; $this->update_add_item_notify($itemId, $mode_notification); $template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ); $this->_kb(); } } ?> Index: kb_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_main.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kb_main.php 7 Jun 2006 20:28:54 -0000 1.3 --- kb_main.php 1 Aug 2006 21:00:38 -0000 1.4 *************** *** 33,39 **** $template->set_filenames( array( 'body' => 'kb_index_body.tpl' )); $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_ARTICLES' => $lang['Articles'] ) ); --- 33,42 ---- $template->set_filenames( array( 'body' => 'kb_index_body.tpl' )); + // + // Assign vars + // $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_ARTICLES' => $lang['Articles'] ) ); *************** *** 46,50 **** // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 'auth_view', 0, 0, true ); } } --- 49,53 ---- // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); } } Index: kb_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_search.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_search.php 5 Jul 2006 22:48:26 -0000 1.6 --- kb_search.php 1 Aug 2006 21:00:38 -0000 1.7 *************** *** 592,596 **** if ( !isset( $_POST['submit'] ) || ( $search_author == '' && $search_keywords == '' && !$search_id ) ) { ! $dropmenu = $this->generate_jumpbox( 'auth_view', 0, 0, true ); $template->set_filenames( array( 'body' => 'kb_search_body.tpl' ) ); --- 592,597 ---- if ( !isset( $_POST['submit'] ) || ( $search_author == '' && $search_keywords == '' && !$search_id ) ) { ! //$dropmenu = $this->generate_jumpbox( 'auth_view', 0, 0, true ); ! $dropmenu = $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); $template->set_filenames( array( 'body' => 'kb_search_body.tpl' ) ); *************** *** 638,642 **** // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 'auth_view', 0, 0, true ); } } --- 639,644 ---- // Get footer quick dropdown jumpbox // ! //$this->generate_jumpbox( 'auth_view', 0, 0, true ); ! $this->generate_jumpbox( 0, 0, array( $_GET['cat'] => 1 )); } } Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_cat.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** kb_cat.php 5 Jul 2006 22:48:26 -0000 1.6 --- kb_cat.php 1 Aug 2006 21:00:38 -0000 1.7 *************** *** 41,44 **** --- 41,91 ---- } + // + // Sorting of items + // + if ( isset( $_REQUEST['sort_method'] ) ) + { + switch ( $_REQUEST['sort_method'] ) + { + case 'Id': + $this->sort_method = 't.article_id'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + case 'Latest': + $this->sort_method = 't.article_date'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + case 'Toprated': + $this->sort_method = 'rating'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + case 'Most_popular': + $this->sort_method = 't.views'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + case 'Userrank': + $this->sort_method = 'u.user_rank'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + case 'Alphabetic': + $this->sort_method = 't.article_title'; + $this->sort_method_extra = 't.article_type' . " DESC, " ; + break; + } + } + + if ( isset( $_REQUEST['sort_order'] ) ) + { + switch ( $_REQUEST['sort_order'] ) + { + case 'ASC': + $this->sort_order = 'ASC'; + break; + case 'DESC': + $this->sort_order = 'DESC'; + break; + } + } + // ======================================================= // If user not allowed to view article listing (read) and there is no sub Category *************** *** 95,122 **** $template->set_filenames( array( 'body' => 'kb_cat_body.tpl' ) ); - // - // Pagination - // - $sql_pag = "SELECT count(article_id) AS total - FROM " . KB_ARTICLES_TABLE . " - WHERE "; - $sql_pag .= " article_category_id = '$category_id'"; - - if ( !( $result = $db->sql_query( $sql_pag ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); - } - - if ( $total = $db->sql_fetchrow( $result ) ) - { - $total_articles = $total['total']; - $pagination = generate_pagination( $this->this_mxurl( "mode=cat&cat=$category_id" ), $total_articles, $kb_config['pagination'], $start ) . ' '; - } - - if ( $total_articles > 0 ) - { - $template->assign_block_vars( 'pagination', array() ); - } - $template->assign_vars( array( 'PAGINATION' => $pagination, --- 142,145 ---- *************** *** 159,169 **** // Get articles // ! $this->display_articles( $start, $category_id ); ! //$this->display_articles( $category_id, '1', 'articlerow', $start, $kb_config['pagination'] ); // // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); } } --- 182,192 ---- // Get articles // ! $this->display_items( $start, $category_id ); // // Get footer quick dropdown jumpbox // ! //$this->generate_jumpbox( 'auth_view', $category_id, $category_id, true ); ! $this->generate_jumpbox( 0, 0, array( $category_id => 1 )); } } Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** kb_article.php 5 Jul 2006 22:48:26 -0000 1.10 --- kb_article.php 1 Aug 2006 21:00:38 -0000 1.11 *************** *** 103,107 **** $approved = $kb_row['approved']; $date = create_date( $board_config['default_dateformat'], $kb_row['article_date'], $board_config['board_timezone'] ); ! $type = $kb_row['type']; $new_views = $kb_row['views'] + 1; --- 103,109 ---- $approved = $kb_row['approved']; $date = create_date( $board_config['default_dateformat'], $kb_row['article_date'], $board_config['board_timezone'] ); ! ! $article_type = isset($lang['KB_type_' . $kb_row['type']]) ? $lang['KB_type_' . $kb_row['type']] : $kb_row['type']; ! $new_views = $kb_row['views'] + 1; *************** *** 125,129 **** // Instantiate the mx_text and mx_text_formatting classes // - include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); // Note: allowed_html_tags is altered above --- 127,130 ---- *************** *** 220,224 **** // If this is an allowed article, go ahead and display it // ! if ( !$this->auth_user[$article_category_id]['auth_view'] || !$article_title || ( !$approved && !$this->auth_user[$article_category_id]['auth_mod'] ) || ( !$this->ns_auth_cat( $article_category_id ) && !$print_version ) ) { $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); --- 221,225 ---- // If this is an allowed article, go ahead and display it // ! if ( !$this->auth_user[$article_category_id]['auth_view'] || !$article_title || ( !$approved && !$this->auth_user[$article_category_id]['auth_mod'] ) ) { $message = $lang['Article_not_exsist'] . '<br /><br />' . sprintf( $lang['Click_return_kb'], '<a href="' . append_sid( $this->this_mxurl() ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_index'], '<a href="' . append_sid( $phpbb_root_path . "index.$phpEx" ) . '">', '</a>' ); *************** *** 272,276 **** 'ARTICLE_DESCRIPTION' => $article_description, 'ARTICLE_DATE' => $date, ! 'ARTICLE_TYPE' => $type, 'EDIT_IMG' => $edit_img, 'EDIT' => $edit, --- 273,277 ---- 'ARTICLE_DESCRIPTION' => $article_description, 'ARTICLE_DATE' => $date, ! 'ARTICLE_TYPE' => $article_type, 'EDIT_IMG' => $edit_img, 'EDIT' => $edit, *************** *** 361,368 **** // ! // Instantiate custom fields (only used in kb_article) // ! include_once( $module_root_path . 'kb/includes/functions_field.' . $phpEx ); ! $mx_kb_custom_field = new mx_kb_custom_field(); $mx_kb_custom_field->init(); $mx_kb_custom_field->display_data( $article_id ); --- 362,368 ---- // ! // Instantiate custom fields // ! $mx_kb_custom_field = new mx_custom_field(KB_CUSTOM_TABLE, KB_CUSTOM_DATA_TABLE); $mx_kb_custom_field->init(); $mx_kb_custom_field->display_data( $article_id ); *************** *** 373,377 **** if ( $this->ratings[$article_category_id]['activated'] ) { ! $article_rating = ( $kb_row['rating'] != 0 ) ? round( $kb_row['rating'] / $kb_row['total_votes'], 2 ) . ' / 10' : $lang['No_votes']; if ( $this->auth_user[$article_category_id]['auth_rate'] ) --- 373,377 ---- if ( $this->ratings[$article_category_id]['activated'] ) { ! $article_rating = ( $kb_row['rating'] != 0 ) ? round( $kb_row['rating'], 2 ) . '/10' : $lang['No_votes']; if ( $this->auth_user[$article_category_id]['auth_rate'] ) *************** *** 384,388 **** 'L_RATE' => $lang['Rate'], 'L_VOTES' => $lang['Votes'], ! 'FILE_VOTES' => $kb_row['article_totalvotes'], 'RATING' => $article_rating, --- 384,389 ---- 'L_RATE' => $lang['Rate'], 'L_VOTES' => $lang['Votes'], ! 'DO_RATE' => $this->auth_user[$article_category_id]['auth_rate'] ? $lang['ADD_RATING'] : '', ! 'VOTES' => $kb_row['total_votes'], 'RATING' => $article_rating, *************** *** 398,402 **** // Comments // ! if ( $this->comments[$article_category_id]['activated'] && $this->auth_user[$article_category_id]['auth_comment']) { $comments_type = $this->comments[$article_category_id]['internal_comments'] ? 'internal' : 'phpbb'; --- 399,403 ---- // Comments // ! if ( $this->comments[$article_category_id]['activated'] && $this->auth_user[$article_category_id]['auth_view_comment']) { $comments_type = $this->comments[$article_category_id]['internal_comments'] ? 'internal' : 'phpbb'; *************** *** 424,428 **** // Get footer quick dropdown jumpbox // ! $this->generate_jumpbox( 'auth_view', $article_category_id, $article_category_id, true ); } } --- 425,430 ---- // Get footer quick dropdown jumpbox // ! //$this->generate_jumpbox( 'auth_view', $article_category_id, $article_category_id, true ); ! $this->generate_jumpbox( 0, 0, array( $article_category_id => 1 )); } } Index: kb_post_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_post_comment.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** kb_post_comment.php 5 Jul 2006 22:48:26 -0000 1.8 --- kb_post_comment.php 1 Aug 2006 21:00:38 -0000 1.9 *************** *** 66,70 **** $db->sql_freeresult( $result ); ! if ( ( !$this->auth_user[$article_data['article_category_id']]['auth_comment'] ) ) { if ( !$userdata['session_logged_in'] ) --- 66,70 ---- $db->sql_freeresult( $result ); ! if ( ( !$this->auth_user[$article_data['article_category_id']]['auth_post_comment'] ) ) { if ( !$userdata['session_logged_in'] ) *************** *** 135,139 **** // Instantiate the mx_text and mx_text_formatting classes // - include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); --- 135,138 ---- *************** *** 161,165 **** $article_info = $db->sql_fetchrow( $result ); ! if ( ( $this->auth_user[$article_info['article_category_id']]['auth_comment'] && $article_info['article_author_id'] == $userdata['user_id'] ) || $this->auth_user[$article_info['article_category_id']]['auth_mod'] ) { if ( $this->comments[$article_data['article_category_id']]['internal_comments'] ) --- 160,164 ---- $article_info = $db->sql_fetchrow( $result ); ! if ( ( $this->auth_user[$article_info['article_category_id']]['auth_delete_comment'] && $article_info['article_author_id'] == $userdata['user_id'] ) || $this->auth_user[$article_info['article_category_id']]['auth_mod'] ) { if ( $this->comments[$article_data['article_category_id']]['internal_comments'] ) *************** *** 210,214 **** // Generate smilies listing for page output // ! $mx_kb_functions->kb_generate_smilies( 'inline', PAGE_POSTING ); $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; --- 209,213 ---- // Generate smilies listing for page output // ! $mx_kb_functions->generate_smilies( 'inline', PAGE_POSTING ); $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; |
|
From: Jon O. <jon...@us...> - 2006-08-01 20:56:59
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv20319/modules/mx_pafiledb/pafiledb/admin Modified Files: admin_file_manage.php Log Message: before removing Index: admin_file_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/admin/admin_file_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_file_manage.php 8 Jul 2006 16:28:46 -0000 1.2 --- admin_file_manage.php 1 Aug 2006 20:56:56 -0000 1.3 *************** *** 18,22 **** function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $pafiledb_functions, $pafiledb_cache, $pafiledb_config, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; // --- 18,23 ---- function main( $action ) { ! global $db, $images, $template, $pafiledb_template, $lang, $phpEx, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $pafiledb_functions, $pafiledb_cache, $pafiledb_config; // *************** *** 24,28 **** // include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); // --- 25,28 ---- *************** *** 120,189 **** // $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; - case 'add': - $template_file = 'admin/pa_admin_file_edit.tpl'; - $l_title = $lang['Afiletitle']; - $l_explain = $lang['Fileexplain']; - $s_hidden_fields = '<input type="hidden" name="mode" value="do_add">'; - break; - case 'edit': - case 'do_add': - $template_file = 'admin/pa_admin_file_edit.tpl'; - $l_title = $lang['Efiletitle']; - $l_explain = $lang['Fileexplain']; - $s_hidden_fields = '<input type="hidden" name="mode" value="do_add">'; - $s_hidden_fields .= '<input type="hidden" name="file_id" value="' . $file_id . '">'; - break; - case 'maintenance': - $template_file = 'admin/pa_admin_file_checker.tpl'; - $l_title = $lang['File_checker']; - $l_explain = $lang['File_checker_explain']; - $s_hidden_fields = '<input type="hidden" name="mode" value="do_maintenace">'; - break; - case 'mirrors': - $template_file = 'admin/pa_admin_file_mirrors.tpl'; - $l_title = $lang['Mirrors']; - $l_explain = $lang['Mirrors_explain']; - $s_hidden_fields = '<input type="hidden" name="mode" value="mirrors">'; - $s_hidden_fields .= '<input type="hidden" name="file_id" value="' . $file_id . '">'; - break; } ! if ( $mode == 'do_add' && !$file_id ) { ! $file_id = $this->update_add_file(); ! $custom_field->file_update_data( $file_id ); ! $this->_pafiledb(); ! $mode = 'edit'; ! ! if ( !$mirrors ) { // // Notification // ! $this->update_add_file_notify($file_id, 'add'); ! ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=file_manage" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_add' && $file_id ) ! { ! $file_id = $this->update_add_file( $file_id ); ! $custom_field->file_update_data( $file_id ); ! $this->_pafiledb(); ! $mode = 'edit'; ! ! if ( !$mirrors ) { // // Notification // ! $this->update_add_file_notify($file_id, 'edit'); ! ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pafiledb.$phpEx?action=file_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } ! elseif ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) --- 120,149 ---- // $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; } ! if ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { ! if ( is_array( $file_ids ) && !empty( $file_ids ) ) { + foreach( $file_ids as $temp_file_id ) + { + $this->approve_item( $mode, $temp_file_id ); + } // // Notification // ! $this->update_add_item_notify($file_ids, $mode); } ! else { + $this->approve_item( $mode, $file_id ); // // Notification // ! $this->update_add_item_notify($file_id, $mode); } + $this->_pafiledb(); } ! else if ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) *************** *** 204,208 **** // Notification // ! $this->update_add_file_notify($temp_file_id, 'delete'); // --- 164,168 ---- // Notification // ! $this->update_add_item_notify($temp_file_id, 'delete'); // *************** *** 214,218 **** { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " ! WHERE file_id = '" . $file_id . "'"; if ( !( $db->sql_query( $sql ) ) ) --- 174,178 ---- { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " ! WHERE file_id = '" . $temp_file_id . "'"; if ( !( $db->sql_query( $sql ) ) ) *************** *** 233,237 **** } ! $this->delete_files( $temp_file_id ); } } --- 193,197 ---- } ! $this->delete_items( $temp_file_id ); } } *************** *** 250,254 **** // Notification // ! $this->update_add_file_notify($file_id, 'delete'); // --- 210,214 ---- // Notification // ! $this->update_add_item_notify($file_id, 'delete'); // *************** *** 279,314 **** } ! $this->delete_files( $file_id ); } $this->_pafiledb(); } - elseif ( $mode == 'do_maintenace' ) - { - $this->file_mainenance(); - } - elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) - { - if ( is_array( $file_ids ) && !empty( $file_ids ) ) - { - foreach( $file_ids as $temp_file_id ) - { - $this->file_approve( $mode, $temp_file_id ); - } - // - // Notification - // - $this->update_add_file_notify($file_ids, $mode); - } - else - { - $this->file_approve( $mode, $file_id ); - // - // Notification - // - $this->update_add_file_notify($file_id, $mode); - } - $this->_pafiledb(); - } $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); --- 239,247 ---- } ! $this->delete_items( $file_id ); } $this->_pafiledb(); } $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); |
|
From: Jon O. <jon...@us...> - 2006-08-01 20:52:48
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv18719/modules/mx_linkdb/linkdb/admin Modified Files: admin_link_manage.php Log Message: before removing Index: admin_link_manage.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/admin/admin_link_manage.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_link_manage.php 8 Jul 2006 10:22:38 -0000 1.7 --- admin_link_manage.php 1 Aug 2006 20:52:45 -0000 1.8 *************** *** 9,13 **** */ ! if ( !defined( 'IN_PORTAL' ) || IN_ADMIN != true ) { die( "Hacking attempt" ); --- 9,13 ---- */ ! if ( !defined( 'IN_PORTAL' ) || !defined( 'IN_ADMIN' ) ) { die( "Hacking attempt" ); *************** *** 18,25 **** function main( $action ) { ! global $module_root_path, $phpbb_root_path, $db, $template, $lang, $phpEx, $linkdb_functions, $linkdb_config; ! include( $module_root_path . 'linkdb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); $custom_field->init(); --- 18,32 ---- function main( $action ) { ! global $db, $images, $template, $lang, $phpEx, $phpbb_root_path, $module_root_path, $mx_root_path, $mx_request_vars; ! global $linkdb_functions, $linkdb_cache, $linkdb_config; ! // ! // Includes ! // ! include_once( $module_root_path . 'linkdb/includes/functions_field.' . $phpEx ); + // + // Init + // $custom_field = new custom_field(); $custom_field->init(); *************** *** 31,34 **** --- 38,42 ---- $mode = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; + $mode_notification = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; $mode_js = ( isset( $_REQUEST['mode_js'] ) ) ? htmlspecialchars( $_REQUEST['mode_js'] ) : ''; $mode = ( isset( $_POST['addfile'] ) ) ? 'add' : $mode; *************** *** 36,39 **** --- 44,48 ---- $mode = ( isset( $_POST['approve'] ) ) ? 'do_approve' : $mode; $mode = ( isset( $_POST['unapprove'] ) ) ? 'do_unapprove' : $mode; + $mode = ( empty( $mode ) ) ? $mode_js : $mode; *************** *** 123,131 **** if ( $mode == 'do_add' && !$link_id ) { ! $link_id = $this->update_add_link(); $custom_field->file_update_data( $link_id ); $this->_linkdb(); $mode = 'edit'; $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); --- 132,145 ---- if ( $mode == 'do_add' && !$link_id ) { ! $link_id = $this->update_add_item(); $custom_field->file_update_data( $link_id ); $this->_linkdb(); $mode = 'edit'; + // + // Notification + // + $this->update_add_item_notify($link_id, 'add'); + $message = $lang['Linkadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 133,141 **** elseif ( $mode == 'do_add' && $link_id ) { ! $link_id = $this->update_add_link( $link_id ); $custom_field->file_update_data( $link_id ); $this->_linkdb(); $mode = 'edit'; ! $message = $lang['Linkeedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( "index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 147,161 ---- elseif ( $mode == 'do_add' && $link_id ) { ! $link_id = $this->update_add_item( $link_id ); $custom_field->file_update_data( $link_id ); $this->_linkdb(); $mode = 'edit'; ! ! // ! // Notification ! // ! $this->update_add_item_notify($link_id, 'edit'); ! ! $message = $lang['Linkedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_linkdb.$phpEx?action=link_manage" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( "index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 146,155 **** foreach( $file_ids as $temp_file_id ) { ! $this->delete_links( $temp_file_id ); } } else { ! $this->delete_links( $link_id ); } $this->_linkdb(); --- 166,258 ---- foreach( $file_ids as $temp_file_id ) { ! $sql = 'SELECT * ! FROM ' . LINKS_TABLE . " ! WHERE link_id = $temp_file_id"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get link info', '', __LINE__, __FILE__, $sql ); ! } ! $file_info = $db->sql_fetchrow( $result ); ! ! // ! // Notification ! // ! $this->update_add_item_notify($temp_file_id, 'delete'); ! ! // ! // Comments ! // ! if ($this->comments[$file_info['link_catid']]['activated'] && $linkdb_config['del_topic']) ! { ! if ( $this->comments[$file_info['link_catid']]['internal_comments'] ) ! { ! $sql = 'DELETE FROM ' . LINK_COMMENTS_TABLE . " ! WHERE link_id = '" . $temp_file_id . "'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! if ( $file_info['topic_id'] ) ! { ! include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $file_info, 'phpbb'); ! $linkdb_comments->post('delete_all', $file_info['topic_id']); ! } ! } ! } ! ! $this->delete_items( $temp_file_id ); } } else { ! $sql = 'SELECT * ! FROM ' . LINKS_TABLE . " ! WHERE link_id = $link_id"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get link info', '', __LINE__, __FILE__, $sql ); ! } ! $file_info = $db->sql_fetchrow( $result ); ! ! // ! // Notification ! // ! $this->update_add_item_notify($link_id, 'delete'); ! ! // ! // Comments ! // ! if ($this->comments[$file_info['link_catid']]['activated'] && $linkdb_config['del_topic']) ! { ! if ( $this->comments[$file_info['link_catid']]['internal_comments'] ) ! { ! $sql = 'DELETE FROM ' . LINK_COMMENTS_TABLE . " ! WHERE link_id = '" . $link_id . "'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! if ( $file_info['topic_id'] ) ! { ! include( $module_root_path . 'linkdb/includes/functions_comment.' . $phpEx ); ! $linkdb_comments = new linkdb_comments(); ! $linkdb_comments->init( $file_info, 'phpbb'); ! $linkdb_comments->post('delete_all', $file_info['topic_id']); ! } ! } ! } ! ! $this->delete_items( $link_id ); } $this->_linkdb(); *************** *** 161,170 **** foreach( $file_ids as $temp_file_id ) { ! $this->link_approve( $mode, $temp_file_id ); } } else { ! $this->link_approve( $mode, $link_id ); } $this->_linkdb(); --- 264,281 ---- foreach( $file_ids as $temp_file_id ) { ! $this->approve_item( $mode, $temp_file_id ); } + // + // Notification + // + $this->update_add_item_notify($file_ids, $mode); } else { ! $this->approve_item( $mode, $link_id ); ! // ! // Notification ! // ! $this->update_add_item_notify($link_id, $mode); } $this->_linkdb(); *************** *** 206,210 **** } ! if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['settings_link_page'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); --- 317,321 ---- } ! if ( !( $result = $linkdb_functions->sql_query_limit( $sql, $linkdb_config['pagination'], $start ) ) ) { mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); *************** *** 225,229 **** else { ! $limit = $linkdb_config['settings_link_page']; $temp_start = $start; } --- 336,340 ---- else { ! $limit = $linkdb_config['pagination']; $temp_start = $start; } *************** *** 355,360 **** 'L_NO_FILES' => $lang['No_link'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $linkdb_config['settings_link_page'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['settings_link_page'] ) + 1 ), ceil( $total_files / $linkdb_config['settings_link_page'] ) ), 'S_CAT_LIST' => $cat_list, --- 466,471 ---- 'L_NO_FILES' => $lang['No_link'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_linkdb.$phpEx?action=link_manage&mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $linkdb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $linkdb_config['pagination'] ) + 1 ), ceil( $total_files / $linkdb_config['pagination'] ) ), 'S_CAT_LIST' => $cat_list, *************** *** 369,376 **** { $approve = $unapprove = true; ! }elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! }elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; --- 480,489 ---- { $approve = $unapprove = true; ! } ! elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! } ! elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; *************** *** 414,418 **** } } ! }elseif ( $mode == 'add' || $mode == 'edit' || $mirrors ) { if ( $mode == 'add' ) --- 527,532 ---- } } ! } ! elseif ( $mode == 'add' || $mode == 'edit' || $mirrors ) { if ( $mode == 'add' ) |