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-04 16:32:22
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26533/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_user_upload.php Log Message: finetuning of - notifications - approval Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** pa_user_upload.php 1 Aug 2006 21:03:25 -0000 1.21 --- pa_user_upload.php 4 Aug 2006 16:32:19 -0000 1.22 *************** *** 83,86 **** --- 83,87 ---- $file_data = $db->sql_fetchrow( $result ); + $cat_id = $file_data['file_catid']; $db->sql_freeresult( $result ); *************** *** 91,95 **** // Reset vars if no related data exist. // ! if ( $file_id && !$file_data['file_catid'] ) { $file_id = 0; --- 92,96 ---- // Reset vars if no related data exist. // ! if ( $file_id && !$cat_id ) { $file_id = 0; *************** *** 112,116 **** if ( $do == 'delete' && $file_id ) { ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { // --- 113,117 ---- if ( $do == 'delete' && $file_id ) { ! if ( ( $this->auth_user[$cat_id]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { // *************** *** 122,128 **** // Comments // ! if ($this->comments[$file_data['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " --- 123,129 ---- // Comments // ! if ($this->comments[$cat_id]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$cat_id]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " *************** *** 148,152 **** $this->delete_items( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $file_data['file_catid'] ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 149,153 ---- $this->delete_items( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 274,278 **** // AUTH CHECK // ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { $file_name = $file_data['file_name']; --- 275,279 ---- // AUTH CHECK // ! if ( ( $this->auth_user[$cat_id]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { $file_name = $file_data['file_name']; *************** *** 283,287 **** $file_website = $file_data['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_data['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $file_data['file_catid'] => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_data['file_license'] ); $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; --- 284,288 ---- $file_website = $file_data['file_docsurl']; $file_posticons = $pafiledb_functions->post_icons( $file_data['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $file_license = $pafiledb_functions->license_list( $file_data['file_license'] ); $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:32:21
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26533/modules/mx_pafiledb/admin Modified Files: admin_pafiledb.php Log Message: finetuning of - notifications - approval Index: admin_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pafiledb.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_pafiledb.php 1 Aug 2006 21:03:24 -0000 1.3 --- admin_pafiledb.php 4 Aug 2006 16:32:19 -0000 1.4 *************** *** 59,63 **** $module['pafileDB_Download']['0_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; $module['pafileDB_Download']['1_Cat_manage'] = $setmodules_admin_path . $filename . "?action=cat_manage"; ! $module['pafileDB_Download']['2_File_manage'] = $setmodules_admin_path . $filename . "?action=file_manage"; $module['pafileDB_Download']['3_Permissions'] = $setmodules_admin_path . $filename . "?action=catauth_manage"; $module['pafileDB_Download']['4_License'] = $setmodules_admin_path . $filename . "?action=license_manage"; --- 59,63 ---- $module['pafileDB_Download']['0_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; $module['pafileDB_Download']['1_Cat_manage'] = $setmodules_admin_path . $filename . "?action=cat_manage"; ! //$module['pafileDB_Download']['2_File_manage'] = $setmodules_admin_path . $filename . "?action=file_manage"; $module['pafileDB_Download']['3_Permissions'] = $setmodules_admin_path . $filename . "?action=catauth_manage"; $module['pafileDB_Download']['4_License'] = $setmodules_admin_path . $filename . "?action=license_manage"; *************** *** 96,100 **** 'settings' => 'settings', 'cat_manage' => 'cat_manage', ! 'file_manage' => 'file_manage', 'catauth_manage' => 'catauth_manage', 'ug_auth_manage' => 'ug_auth_manage', --- 96,100 ---- 'settings' => 'settings', 'cat_manage' => 'cat_manage', ! //'file_manage' => 'file_manage', 'catauth_manage' => 'catauth_manage', 'ug_auth_manage' => 'ug_auth_manage', |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_comment.php functions_linkdb.php Log Message: fixes for - comments - notifications - approvals Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** functions.php 1 Aug 2006 21:02:19 -0000 1.13 --- functions.php 4 Aug 2006 16:31:34 -0000 1.14 *************** *** 508,513 **** } - include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); - /** * mx_linkdb_notification. --- 508,511 ---- *************** *** 548,596 **** // Build up generic lang keys // ! $this->langs['item_not_exist'] = $lang['File_not_exist']; ! $this->langs['module_title'] = $lang['PA_title']; ! $this->langs['notify_subject_new'] = $lang['PA_notify_subject_new']; ! $this->langs['notify_subject_edited'] = $lang['PA_notify_subject_edited']; ! $this->langs['notify_subject_approved'] = $lang['PA_notify_subject_approved']; ! $this->langs['notify_subject_unapproved'] = $lang['PA_notify_subject_unapproved']; ! $this->langs['notify_subject_deleted'] = $lang['PA_notify_subject_deleted']; ! $this->langs['notify_new_body'] = $lang['PA_notify_new_body']; ! $this->langs['notify_edited_body'] = $lang['PA_notify_edited_body']; ! $this->langs['notify_approved_body'] = $lang['PA_notify_approved_body']; ! $this->langs['notify_unapproved_body'] = $lang['PA_notify_unapproved_body']; ! $this->langs['notify_deleted_body'] = $lang['PA_notify_deleted_body']; ! $this->langs['item_title'] = $lang['File']; ! $this->langs['author'] = $lang['Creator']; $this->langs['item_description'] = $lang['Desc']; $this->langs['item_type'] = ''; ! $this->langs['category'] = $lang['Category']; ! $this->langs['read_full_item'] = $lang['PA_goto']; ! $this->langs['edited_item_info'] = $lang['Edited_Article_info']; switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments ! FROM " . PA_FILES_TABLE . " AS f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm ! WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) ! AND f.file_id = cm.file_id(+) ! AND c.cat_id = a.file_catid ! AND f.file_id = '" . $item_id . "' ! GROUP BY f.file_id "; break; default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) as total_comments ! FROM " . PA_FILES_TABLE . " AS f, " . PA_CATEGORY_TABLE . " AS cat ! LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id ! LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id ! WHERE cat.cat_id = f.file_catid ! AND f.file_id = '" . $item_id . "' ! GROUP BY f.file_id "; break; } --- 546,592 ---- // Build up generic lang keys // ! $this->langs['item_not_exist'] = $lang['Link_not_exist']; ! $this->langs['module_title'] = $lang['LinkDb_title']; ! $this->langs['notify_subject_new'] = $lang['LinkDb_notify_subject_new']; ! $this->langs['notify_subject_edited'] = $lang['LinkDb_notify_subject_edited']; ! $this->langs['notify_subject_approved'] = $lang['LinkDb_notify_subject_approved']; ! $this->langs['notify_subject_unapproved'] = $lang['LinkDb_notify_subject_unapproved']; ! $this->langs['notify_subject_deleted'] = $lang['LinkDb_notify_subject_deleted']; ! $this->langs['notify_new_body'] = $lang['LinkDb_notify_new_body']; ! $this->langs['notify_edited_body'] = $lang['LinkDb_notify_edited_body']; ! $this->langs['notify_approved_body'] = $lang['LinkDb_notify_approved_body']; ! $this->langs['notify_unapproved_body'] = $lang['LinkDb_notify_unapproved_body']; ! $this->langs['notify_deleted_body'] = $lang['LinkDb_notify_deleted_body']; ! $this->langs['item_title'] = $lang['Link']; ! $this->langs['author'] = $lang['Submiter']; $this->langs['item_description'] = $lang['Desc']; $this->langs['item_type'] = ''; ! $this->langs['category'] = $lang['Sitecat']; ! $this->langs['read_full_item'] = $lang['Read_full_link']; ! $this->langs['edited_item_info'] = $lang['Edited_Link_info']; switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username ! FROM " . LINKS_TABLE . " AS f, " . LINK_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . LINK_CATEGORIES_TABLE . " AS c ! WHERE f.link_id = r.votes_link(+) AND f.user_id = u.user_id(+) ! AND c.cat_id = a.link_catid ! AND f.link_id = '" . $item_id . "' ! GROUP BY f.link_id "; break; default: ! $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username ! FROM " . LINKS_TABLE . " AS f, " . LINK_CATEGORIES_TABLE . " AS cat ! LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f.link_id = r.votes_link LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id ! WHERE cat.cat_id = f.link_catid ! AND f.link_id = '" . $item_id . "' ! GROUP BY f.link_id "; break; } *************** *** 598,602 **** if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query file info', '', __LINE__, __FILE__, $sql ); } --- 594,598 ---- if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query link info', '', __LINE__, __FILE__, $sql ); } *************** *** 617,622 **** // $this->data['item_id'] = $item_id; ! $this->data['item_title'] = $item_data['file_name']; ! $this->data['item_desc'] = $item_data['file_desc']; --- 613,618 ---- // $this->data['item_id'] = $item_id; ! $this->data['item_title'] = $item_data['link_name']; ! $this->data['item_desc'] = $item_data['link_longdesc']; *************** *** 639,643 **** $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $linkdb->this_mxurl("action=" . "link&link_id=" . $this->data['item_id'], false, true); } } --- 635,639 ---- $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $linkdb->this_mxurl("action=" . "jump&link_id=" . $this->data['item_id'], false, true); } } Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_comment.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_comment.php 1 Aug 2006 21:02:19 -0000 1.3 --- functions_comment.php 4 Aug 2006 16:31:34 -0000 1.4 *************** *** 100,104 **** // Pagination // ! $this->pagination_action = 'action=file'; $this->pagination_target = 'link_id='; --- 100,104 ---- // Pagination // ! $this->pagination_action = 'action=link'; $this->pagination_target = 'link_id='; *************** *** 146,152 **** // Toggles // ! $bbcode_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_smilies'] ? true : false) : false; // --- 146,152 ---- // Toggles // ! $bbcode_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_smilies'] ? true : false) : false; // *************** *** 165,169 **** // 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 --- 165,168 ---- *************** *** 351,357 **** // Toggles // ! $bbcode_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$linkdb_config['allow_wysiwyg'] ? ($linkdb_config['allow_smilies'] ? true : false) : false; // --- 350,356 ---- // Toggles // ! $bbcode_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$linkdb_config['allow_comment_wysiwyg'] ? ($linkdb_config['allow_comment_smilies'] ? true : false) : false; // *************** *** 370,374 **** // 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 --- 369,372 ---- Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** functions_linkdb.php 1 Aug 2006 21:02:19 -0000 1.16 --- functions_linkdb.php 4 Aug 2006 16:31:34 -0000 1.17 *************** *** 1172,1176 **** * Enter description here... * ! * @param unknown_type $article_data * @param unknown_type $item_id * @param unknown_type $cid --- 1172,1176 ---- * Enter description here... * ! * @param unknown_type $link_data * @param unknown_type $item_id * @param unknown_type $cid *************** *** 1181,1185 **** * @param unknown_type $smilies_on */ ! function update_add_comment($file_data = '', $item_id, $cid, $subject = '', $message = '', $html_on = false, $bbcode_on = true, $smilies_on = false) { global $template, $linkdb_functions, $lang, $board_config, $phpEx, $linkdb_config, $db, $images, $userdata; --- 1181,1185 ---- * @param unknown_type $smilies_on */ ! function update_add_comment($link_data = '', $item_id, $cid, $subject = '', $message = '', $html_on = false, $bbcode_on = true, $smilies_on = false) { global $template, $linkdb_functions, $lang, $board_config, $phpEx, $linkdb_config, $db, $images, $userdata; *************** *** 1190,1194 **** // Ensure we have article_data defined // ! if (!is_array($article_data) && !empty($item_id) && $item_id > 0) { $sql = "SELECT * --- 1190,1194 ---- // Ensure we have article_data defined // ! if (!is_array($link_data) && !empty($item_id) && $item_id > 0) { $sql = "SELECT * *************** *** 1201,1207 **** } ! if ( !$article_data = $db->sql_fetchrow( $result ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); } --- 1201,1207 ---- } ! if ( !$link_data = $db->sql_fetchrow( $result ) ) { ! mx_message_die( GENERAL_MESSAGE, $lang['Link_not_exsist'] ); } *************** *** 1221,1225 **** // Instantiate the mx_text class // - include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); $mx_text = new mx_text(); $mx_text->init($html_on, $bbcode_on, $smilies_on); --- 1221,1224 ---- *************** *** 1240,1244 **** if ( $update_comment ) { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) { $sql = "UPDATE " . LINK_COMMENTS_TABLE . " --- 1239,1243 ---- if ( $update_comment ) { ! if ( $this->comments[$link_data['link_catid']]['internal_comments'] ) { $sql = "UPDATE " . LINK_COMMENTS_TABLE . " *************** *** 1266,1270 **** else { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) { $time = time(); --- 1265,1269 ---- else { ! if ( $this->comments[$link_data['link_catid']]['internal_comments'] ) { $time = time(); *************** *** 1288,1292 **** } ! if ( !$this->comments[$file_data['file_catid']]['internal_comments'] ) { --- 1287,1291 ---- } ! if ( !$this->comments[$link_data['link_catid']]['internal_comments'] ) { *************** *** 1321,1325 **** function update_add_item( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $userdata, $linkdb_config, $_FILES, $linkdb_functions, $user_ip; $link_poster = ( !empty( $_POST['post_username'] ) ) ? $_POST['post_username'] : ''; --- 1320,1324 ---- function update_add_item( $file_id = false ) { ! global $db, $phpbb_root_path, $userdata, $linkdb_config, $linkdb_functions, $user_ip; $link_poster = ( !empty( $_POST['post_username'] ) ) ? $_POST['post_username'] : ''; *************** *** 1375,1378 **** --- 1374,1401 ---- } + if ( !$file_id ) + { + if ($this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod']) + { + $file_approved = 1; + } + else + { + $file_approved = 0; + } + } + else + { + if ($this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod']) + { + $file_approved = 1; + } + else + { + $file_approved = 0; + } + } + + /* if ( $linkdb->modules[$linkdb->module_name]->auth_user[$cat_id]['auth_approval'] || ( $linkdb->modules[$linkdb->module_name]->auth_user[$cat_id]['auth_mod'] && $userdata['session_logged_in'] ) ) { *************** *** 1390,1393 **** --- 1413,1417 ---- $file_approved = 0; } + */ if ( !$file_id ) *************** *** 1507,1511 **** $mx_linkdb_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$cat_id]['notify_group'] > 0 ) { $mx_linkdb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); --- 1531,1535 ---- $mx_linkdb_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$catId]['notify_group'] > 0 ) { $mx_linkdb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb/templates/subSilver Modified Files: link_add.tpl link_link_body.tpl subSilver.cfg Log Message: fixes for - comments - notifications - approvals Index: subSilver.cfg =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/subSilver.cfg,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** subSilver.cfg 1 Aug 2006 21:02:20 -0000 1.4 --- subSilver.cfg 4 Aug 2006 16:31:34 -0000 1.5 *************** *** 33,36 **** --- 33,37 ---- // Define images // ------------------------------------------------------------------------- + $mx_images['linkdb_comment_post'] = $images['reply_new']; // ------------------------------------------------------------------------- *************** *** 41,47 **** $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 --- 42,48 ---- $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_link_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_link_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** link_link_body.tpl 1 Aug 2006 21:02:20 -0000 1.1 --- link_link_body.tpl 4 Aug 2006 16:31:34 -0000 1.2 *************** *** 1,2 **** --- 1,18 ---- + <script language='javascript'> + <!-- + 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.'); + } + } + --> + </script> + <table width="100%" cellpadding="2" cellspacing="2"> <tr> *************** *** 51,55 **** <!-- 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> --- 67,71 ---- <!-- END AUTH_EDIT --> <!-- BEGIN AUTH_DELETE --> ! <a href="javascript:delete_item('{U_DELETE}')"><img src="{DELETE_IMG}" border="0" alt="{L_DELETE}" /></a> <!-- END AUTH_DELETE --> </td> Index: link_add.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/templates/subSilver/link_add.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** link_add.tpl 1 Aug 2006 21:02:20 -0000 1.3 --- link_add.tpl 4 Aug 2006 16:31:34 -0000 1.4 *************** *** 74,78 **** <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_LINK}" class="nav">{LINKS}</a> » {L_UPLOAD}</span> </td> </tr> --- 74,78 ---- <tr> <td valign="bottom"> ! <span class="nav"><a href="{U_LINK}" class="nav">{LINKS}</a> » {L_FILE_TITLE}</span> </td> </tr> |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb/admin Modified Files: admin_linkdb.php Log Message: fixes for - comments - notifications - approvals Index: admin_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/admin/admin_linkdb.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_linkdb.php 1 Aug 2006 21:02:19 -0000 1.10 --- admin_linkdb.php 4 Aug 2006 16:31:33 -0000 1.11 *************** *** 16,20 **** $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"; --- 16,20 ---- $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"; *************** *** 53,57 **** 'cat_manage' => 'cat_manage', 'auth_manage' => 'auth_manage', ! 'link_manage' => 'link_manage', 'custom_manage' => 'custom_manage' ); --- 53,57 ---- 'cat_manage' => 'cat_manage', 'auth_manage' => 'auth_manage', ! //'link_manage' => 'link_manage', 'custom_manage' => 'custom_manage' ); |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb/linkdb/modules Modified Files: link_user_upload.php Log Message: fixes for - comments - notifications - approvals Index: link_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/modules/link_user_upload.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** link_user_upload.php 1 Aug 2006 21:02:20 -0000 1.10 --- link_user_upload.php 4 Aug 2006 16:31:34 -0000 1.11 *************** *** 73,76 **** --- 73,77 ---- $link_data = $db->sql_fetchrow( $result ); + $cat_id = $link_data['link_catid']; $db->sql_freeresult( $result ); *************** *** 81,85 **** // Reset vars if no related data exist. // ! if ( $link_id && !$link_data['link_catid'] ) { $link_id = 0; --- 82,86 ---- // Reset vars if no related data exist. // ! if ( $link_id && !$cat_id ) { $link_id = 0; *************** *** 102,106 **** 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'] ) { // --- 103,107 ---- if ( $do == 'delete' && $link_id) { ! if ( ( $this->auth_user[$cat_id]['auth_delete'] && $link_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { // *************** *** 112,118 **** // 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 . " --- 113,119 ---- // Comments // ! if ($this->comments[$cat_id]['activated'] && $linkdb_config['del_topic']) { ! if ( $this->comments[$cat_id]['internal_comments'] ) { $sql = 'DELETE FROM ' . LINK_COMMENTS_TABLE . " *************** *** 138,142 **** $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 ); } --- 139,143 ---- $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=" . $cat_id ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 158,163 **** $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'] ) --- 159,164 ---- $link_post_mode = 'add'; ! $link_id = $this->update_add_item(); ! $linkdb_custom_field->file_update_data( $link_id ); if ( $this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod'] ) *************** *** 183,188 **** $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'] ) --- 184,189 ---- $link_post_mode = 'edit'; ! $link_id = $this->update_add_item( $link_id ); ! $linkdb_custom_field->file_update_data( $link_id ); if ( $this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod'] ) *************** *** 217,228 **** // 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))); } --- 218,229 ---- // Autogenerate comment (duplicate the notification message) // ! $mx_linkdb_notification = new mx_linkdb_notification(); ! $mx_linkdb_notification->init( $link_id ); ! $mx_linkdb_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_linkdb_notification->subject)), addslashes(trim($mx_linkdb_notification->message))); } *************** *** 253,256 **** --- 254,258 ---- } + $l_title = $lang['AddLink']; $link_name = ''; $link_longdesc = ''; *************** *** 270,274 **** // 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() ); --- 272,276 ---- // Auth check // ! if ( ( $this->auth_user[$cat_id]['auth_edit'] && $link_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { if ( $userdata['user_level'] == ADMIN ) $template->assign_block_vars( 'ADMIN', array() ); *************** *** 289,295 **** } $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' : ''; --- 291,298 ---- } + $l_title = $lang['Elinktitle']; $link_name = $link_data['link_name']; $link_longdesc = $link_data['link_longdesc']; ! $link_cat_list = $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true ); $link_download = $link_data['link_hits']; $approved_checked_yes = $link_data['link_approved'] == 1 ? ' checked' : ''; *************** *** 325,329 **** 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $lang['AddLink'], 'L_FILE_APPROVED' => $lang['Approved'], 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], --- 328,332 ---- 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $l_title, 'L_FILE_APPROVED' => $lang['Approved'], 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb Modified Files: db_install.php db_upgrade.php Log Message: fixes for - comments - notifications - approvals Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_install.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** db_install.php 1 Aug 2006 21:02:19 -0000 1.14 --- db_install.php 4 Aug 2006 16:31:34 -0000 1.15 *************** *** 130,133 **** --- 130,134 ---- last_user_ip varchar(8) NOT NULL default '', link_hits int(10) unsigned NOT NULL default '0', + topic_id mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (link_id) Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/db_upgrade.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** db_upgrade.php 1 Aug 2006 21:02:19 -0000 1.15 --- db_upgrade.php 4 Aug 2006 16:31:34 -0000 1.16 *************** *** 112,115 **** --- 112,116 ---- // $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb ADD link_desc text "; + $sql[] = "ALTER TABLE " . $mx_table_prefix . "linkdb ADD topic_id mediumint(8) unsigned NOT NULL default '0' "; // |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:31:39
|
Update of /cvsroot/mxbb/mx_linkdb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26034/modules/mx_linkdb/language/lang_english Modified Files: lang_main.php Log Message: fixes for - comments - notifications - approvals Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/language/lang_english/lang_main.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang_main.php 1 Aug 2006 21:02:19 -0000 1.6 --- lang_main.php 4 Aug 2006 16:31:34 -0000 1.7 *************** *** 12,15 **** --- 12,16 ---- // Main // + $lang['LinkDb_title'] = 'Linkdb'; $lang['linkdb_disable'] = 'Linkdb is disabled.'; *************** *** 194,196 **** --- 195,216 ---- $lang['R10'] = '10'; $lang['Not_rated'] = 'Not Rated'; + + // + // Notification + // + $lang['LinkDb_notify_subject_new'] = 'New Link!'; + $lang['LinkDb_notify_subject_edited'] = 'Edited Link!'; + $lang['LinkDb_notify_subject_approved'] = 'Approved Link!'; + $lang['LinkDb_notify_subject_unapproved'] = 'Unapproved Link!'; + $lang['LinkDb_notify_subject_deleted'] = 'Deleted Link!'; + + $lang['LinkDb_notify_new_body'] = 'A new link has been submitted.'; + $lang['LinkDb_notify_edited_body'] = 'A link has been modified.'; + $lang['LinkDb_notify_approved_body'] = 'A link has been approved.'; + $lang['LinkDb_notify_unapproved_body'] = 'A link has been unapproved.'; + $lang['LinkDb_notify_deleted_body'] = 'A link has been deleted.'; + $lang['Edited_Link_info'] = 'Link updated by '; + + $lang['Read_full_link'] = '>> Visist Site'; + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:30:38
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25418/modules/mx_kb/admin Modified Files: admin_kb.php Log Message: finetuning of - notifications - approval Index: admin_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_kb.php 1 Aug 2006 21:00:36 -0000 1.2 --- admin_kb.php 4 Aug 2006 16:30:30 -0000 1.3 *************** *** 60,64 **** $module['KB_title']['1_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; $module['KB_title']['2_Cat_man'] = $setmodules_admin_path . $filename . "?action=cat_manage"; ! $module['KB_title']['3_Art_man'] = $setmodules_admin_path . $filename . "?action=article_manage"; $module['KB_title']['4_Permissions'] = $setmodules_admin_path . $filename . "?action=auth_manage"; $module['KB_title']['5_Types_man'] = $setmodules_admin_path . $filename . "?action=types_manage"; --- 60,64 ---- $module['KB_title']['1_Configuration'] = $setmodules_admin_path . $filename . "?action=settings"; $module['KB_title']['2_Cat_man'] = $setmodules_admin_path . $filename . "?action=cat_manage"; ! //$module['KB_title']['3_Art_man'] = $setmodules_admin_path . $filename . "?action=article_manage"; $module['KB_title']['4_Permissions'] = $setmodules_admin_path . $filename . "?action=auth_manage"; $module['KB_title']['5_Types_man'] = $setmodules_admin_path . $filename . "?action=types_manage"; *************** *** 96,100 **** 'settings' => 'settings', 'cat_manage' => 'cat_manage', ! 'article_manage' => 'article_manage', 'auth_manage' => 'auth_manage', 'types_manage' => 'types_manage', --- 96,100 ---- 'settings' => 'settings', 'cat_manage' => 'cat_manage', ! //'article_manage' => 'article_manage', 'auth_manage' => 'auth_manage', 'types_manage' => 'types_manage', |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:30:35
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25418/modules/mx_kb/kb/includes Modified Files: functions.php functions_comment.php functions_kb.php Log Message: finetuning of - notifications - approval Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** functions.php 1 Aug 2006 21:00:37 -0000 1.12 --- functions.php 4 Aug 2006 16:30:30 -0000 1.13 *************** *** 756,764 **** { case 'oracle': ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments ! FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . KB_CATEGORIES_TABLE . " AS c, " . KB_COMMENTS_TABLE . " AS cm WHERE a.article_id = r.votes_article(+) AND a.article_author_id = u.user_id(+) - AND a.article_id = cm.article_id(+) AND c.category_id = a.article_category_id AND a.article_id = '" . $item_id . "' --- 756,763 ---- { case 'oracle': ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name ! FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . KB_CATEGORIES_TABLE . " AS c WHERE a.article_id = r.votes_article(+) AND a.article_author_id = u.user_id(+) AND c.category_id = a.article_category_id AND a.article_id = '" . $item_id . "' *************** *** 767,775 **** default: ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name, COUNT(cm.comments_id) AS total_comments FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_CATEGORIES_TABLE . " AS c LEFT JOIN " . KB_VOTES_TABLE . " AS r ON a.article_id = r.votes_article LEFT JOIN " . USERS_TABLE . " AS u ON a.article_author_id = u.user_id - LEFT JOIN " . KB_COMMENTS_TABLE . " AS cm ON a.article_id = cm.article_id WHERE c.category_id = a.article_category_id AND a.article_id = '" . $item_id . "' --- 766,773 ---- default: ! $sql = "SELECT a.*, AVG(r.rate_point) AS rating, COUNT(r.votes_article) AS total_votes, u.user_id, u.username, c.category_id, c.category_name FROM " . KB_ARTICLES_TABLE . " AS a, " . KB_CATEGORIES_TABLE . " AS c LEFT JOIN " . KB_VOTES_TABLE . " AS r ON a.article_id = r.votes_article LEFT JOIN " . USERS_TABLE . " AS u ON a.article_author_id = u.user_id WHERE c.category_id = a.article_category_id AND a.article_id = '" . $item_id . "' Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_comment.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** functions_comment.php 1 Aug 2006 21:00:37 -0000 1.9 --- functions_comment.php 4 Aug 2006 16:30:30 -0000 1.10 *************** *** 153,159 **** // Toggles // ! $bbcode_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_smilies'] ? true : false) : false; // --- 153,159 ---- // Toggles // ! $bbcode_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_smilies'] ? true : false) : false; // *************** *** 172,176 **** // 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 --- 172,175 ---- *************** *** 179,183 **** $mx_text_formatting = new mx_text_formatting(); - $template->assign_block_vars( 'use_comments', array( 'L_COMMENTS' => $lang['Comments'], --- 178,181 ---- *************** *** 318,322 **** 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), ! 'REPLY_IMG' => $images['kb_icon_reply'], )); } --- 316,320 ---- 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), ! 'REPLY_IMG' => $images['kb_comment_post'], )); } *************** *** 359,365 **** // Toggles // ! $bbcode_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_bbcode'] ? true : false) : false; ! $html_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_html'] ? true : false) : true; ! $smilies_on = !$kb_config['allow_wysiwyg'] ? ($kb_config['allow_smilies'] ? true : false) : false; // --- 357,363 ---- // Toggles // ! $bbcode_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_bbcode'] ? true : false) : false; ! $html_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_html'] ? true : false) : true; ! $smilies_on = !$kb_config['allow_comment_wysiwyg'] ? ($kb_config['allow_comment_smilies'] ? true : false) : false; // Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** functions_kb.php 1 Aug 2006 21:00:37 -0000 1.15 --- functions_kb.php 4 Aug 2006 16:30:30 -0000 1.16 *************** *** 1834,1838 **** $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$cat_id]['notify_group'] > 0 ) { $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); --- 1834,1838 ---- $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action ); ! if ( $this->notification[$catId]['notify_group'] > 0 ) { $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:30:35
|
Update of /cvsroot/mxbb/mx_kb/kb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25418/modules/mx_kb/kb/modules Modified Files: kb_article.php kb_post.php kb_rate.php Log Message: finetuning of - notifications - approval Index: kb_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_rate.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_rate.php 5 Jul 2006 22:48:26 -0000 1.7 --- kb_rate.php 4 Aug 2006 16:30:30 -0000 1.8 *************** *** 97,101 **** $result_msg = str_replace( "{newrating}", $rate_info, $result_msg ); ! $message = $result_msg . '<br /><br />' . sprintf( $lang['Click_return'], "<a href=\"" . append_sid( $this->this_mxurl( "action=link&link_id=$article_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 97,101 ---- $result_msg = str_replace( "{newrating}", $rate_info, $result_msg ); ! $message = $result_msg . '<br /><br />' . sprintf( $lang['Click_return'], "<a href=\"" . append_sid( $this->this_mxurl( "mode=article&k=$article_id" ) ) . "\">", "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_article.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** kb_article.php 1 Aug 2006 21:00:38 -0000 1.11 --- kb_article.php 4 Aug 2006 16:30:30 -0000 1.12 *************** *** 219,222 **** --- 219,237 ---- // + // Delete buttons + // + if ( ( $userdata['user_id'] == $author_id && $this->auth_user[$article_category_id]['auth_delete'] ) || $this->auth_user[$article_category_id]['auth_mod'] ) + { + $temp_url = append_sid( $this->this_mxurl( "mode=edit&do=delete&k=" . $article_id ) ); + $delete_img = '<a href="javascript:delete_item(\'' . $temp_url . '\')"><img src="' . $images['kb_icon_delpost'] . '" alt="' . $lang['Edit_delete_post'] . '" title="' . $lang['Edit_delete_post'] . '" border="0" /></a>'; + $delete = '<a href="javascript:delete_item(\'' . $temp_url . '\')">' . $lang['Edit_delete_post'] . '</a>'; + } + else + { + $delete_img = ''; + $delete = ''; + } + + // // If this is an allowed article, go ahead and display it // *************** *** 274,279 **** --- 289,297 ---- 'ARTICLE_DATE' => $date, 'ARTICLE_TYPE' => $article_type, + 'EDIT_IMG' => $edit_img, + 'DELETE_IMG' => $delete_img, 'EDIT' => $edit, + 'DELETE' => $delete, 'VIEWS' => $views Index: kb_post.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/modules/kb_post.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** kb_post.php 1 Aug 2006 21:00:38 -0000 1.9 --- kb_post.php 4 Aug 2006 16:30:30 -0000 1.10 *************** *** 30,33 **** --- 30,34 ---- 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; + global $HTTP_SERVER_VARS; // *************** *** 80,83 **** --- 81,85 ---- $article_data = $db->sql_fetchrow( $result ); + $cat_id = $article_data['article_category_id']; $db->sql_freeresult( $result ); *************** *** 88,92 **** // Reset vars if no related data exist. // ! if ( $article_id && !$article_data['article_category_id'] ) { $article_id = 0; --- 90,94 ---- // Reset vars if no related data exist. // ! if ( $article_id && !$cat_id ) { $article_id = 0; *************** *** 103,107 **** 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'] ) { // --- 105,109 ---- if ( $do == 'delete' && $article_id) { ! if ( ( $this->auth_user[$cat_id]['auth_delete'] && $article_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) { // *************** *** 113,119 **** // 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 . " --- 115,121 ---- // Comments // ! if ($this->comments[$cat_id]['activated'] && $kb_config['del_topic']) { ! if ( $this->comments[$cat_id]['internal_comments'] ) { $sql = 'DELETE FROM ' . KB_COMMENTS_TABLE . " *************** *** 139,143 **** $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 ); } --- 141,145 ---- $this->delete_items( $article_id ); $this->_kb(); ! $message = $lang['Article_Deleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "mode=cat&cat=" . $cat_id ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 283,287 **** // 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 . " --- 285,289 ---- // Approve // ! $approve = $this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod'] ? 1 : 0; // approved $sql = "UPDATE " . KB_ARTICLES_TABLE . " *************** *** 291,295 **** article_body = '" . str_replace( "\'", "''", $article_text ) . "', article_type = '" . $type_id . "', - article_date = '" . $date . "', approved = '" . $approve . "', bbcode_uid = '" . $bbcode_uid . "' --- 293,296 ---- *************** *** 356,360 **** if ( !$article_id ) { ! if ( !$this->auth_user[$article_data['article_category_id']]['auth_post'] ) { mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); --- 357,361 ---- if ( !$article_id ) { ! if ( !$this->auth_user[$cat_id]['auth_post'] ) { mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_post'] ); *************** *** 363,368 **** 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'] ); --- 364,368 ---- else { ! if ( !( ( $this->auth_user[$cat_id]['auth_edit'] && $article_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) ) { mx_message_die( GENERAL_MESSAGE, $lang['Sorry_auth_edit'] ); *************** *** 411,415 **** 'ARTICLE_DESC' => $preview_desc, 'ARTICLE_BODY' => $preview_text, ! 'PREVIEW_MESSAGE' => $preview_text ) ); --- 411,415 ---- 'ARTICLE_DESC' => $preview_desc, 'ARTICLE_BODY' => $preview_text, ! 'PRE_COMMENT' => $preview_text ) ); |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:30:35
|
Update of /cvsroot/mxbb/mx_kb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25418/modules/mx_kb/language/lang_english Modified Files: lang_main.php Log Message: finetuning of - notifications - approval Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/language/lang_english/lang_main.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** lang_main.php 1 Aug 2006 21:00:38 -0000 1.13 --- lang_main.php 4 Aug 2006 16:30:30 -0000 1.14 *************** *** 44,47 **** --- 44,49 ---- $lang['Edit_article'] = 'Edit Article'; + $lang['Article_Deleted'] = 'Article Deleted Successfully.'; + // // Notification *************** *** 53,57 **** $lang['KB_notify_subject_deleted'] = 'Deleted Article!'; ! $lang['KB_notify_new_body'] = 'An new article has been submitted.'; $lang['KB_notify_edited_body'] = 'An article has been modified.'; $lang['KB_notify_approved_body'] = 'An article has been approved.'; --- 55,59 ---- $lang['KB_notify_subject_deleted'] = 'Deleted Article!'; ! $lang['KB_notify_new_body'] = 'A new article has been submitted.'; $lang['KB_notify_edited_body'] = 'An article has been modified.'; $lang['KB_notify_approved_body'] = 'An article has been approved.'; |
|
From: Jon O. <jon...@us...> - 2006-08-04 16:30:34
|
Update of /cvsroot/mxbb/mx_kb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv25418/modules/mx_kb/templates/subSilver Modified Files: kb_article_body.tpl kb_comment_posting.tpl kb_post_body.tpl Log Message: finetuning of - notifications - approval Index: kb_article_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_article_body.tpl,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** kb_article_body.tpl 1 Aug 2006 21:00:39 -0000 1.19 --- kb_article_body.tpl 4 Aug 2006 16:30:30 -0000 1.20 *************** *** 1,2 **** --- 1,18 ---- + <script language='javascript'> + <!-- + 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.'); + } + } + --> + </script> + <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> *************** *** 61,65 **** <!-- END switch_pages --> <tr> ! <td class="cat" valign="middle" align="center"><span class="cattitle"> {EDIT_IMG}</span> </td> </tr> </table> --- 77,81 ---- <!-- END switch_pages --> <tr> ! <td class="cat" valign="middle" align="center"><span class="cattitle"> {EDIT_IMG} {DELETE_IMG}</span> </td> </tr> </table> Index: kb_post_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_post_body.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** kb_post_body.tpl 1 Aug 2006 21:00:39 -0000 1.9 --- kb_post_body.tpl 4 Aug 2006 16:30:31 -0000 1.10 *************** *** 301,375 **** <input type="text" name="article_desc" size="45" maxlength="255" style="width:450px" class="post" value="{ARTICLE_DESC}" /></span></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 --> <tr> <td class="row1" valign="top"><span class="gen"><b><nobr>{L_ARTICLE_TEXT}</nobr></b><br /><br /> --- 301,304 ---- *************** *** 503,508 **** </tr> <!-- END switch_edit --> <tr> ! <td class="cat" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="preview" value="{L_PREVIEW}" class="mainoption"> <input type="submit" name="article_submit" class="mainoption" value="{L_SUBMIT}" /></td> </tr> </table> --- 432,508 ---- </tr> <!-- END switch_edit --> + <!-- 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 --> ! <tr> ! <td class="cat" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" name="preview" value="{L_PREVIEW}" class="mainoption"> <input type="submit" name="submit" class="mainoption" value="{L_SUBMIT}" /></td> </tr> </table> Index: kb_comment_posting.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_kb/templates/subSilver/kb_comment_posting.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** kb_comment_posting.tpl 1 Aug 2006 21:00:39 -0000 1.5 --- kb_comment_posting.tpl 4 Aug 2006 16:30:31 -0000 1.6 *************** *** 394,408 **** </form> </tr> ! </table> ! ! ! ! ! ! ! ! ! ! ! ! --- 394,396 ---- </form> </tr> ! </table> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-04 12:43:56
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13822/modules/mx_kb Modified Files: kb.php Log Message: fix Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** kb.php 1 Aug 2006 21:00:37 -0000 1.38 --- kb.php 4 Aug 2006 12:43:51 -0000 1.39 *************** *** 167,171 **** 'rate' => 'rate', 'stats' => 'stats', - 'moderate' => 'moderator', 'mcp' => 'mcp', 'post_comment' => 'post_comment', --- 167,170 ---- |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:19
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/modules/mx_phpbb2blocks Modified Files: mx_poll.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: mx_poll.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_poll.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_poll.php 2 May 2006 23:22:17 -0000 1.1 --- mx_poll.php 1 Aug 2006 21:06:13 -0000 1.2 *************** *** 144,148 **** $message .= '<br /><br />' . sprintf($lang['Click_view_voted'], '<a href="' . append_sid(PORTAL_URL . "index.$phpEx?page=$current_page&vote=viewresult") . '">', '</a>'); ! mx_block_message($lang['Surveys/Polls'], $message); return; } --- 144,148 ---- $message .= '<br /><br />' . sprintf($lang['Click_view_voted'], '<a href="' . append_sid(PORTAL_URL . "index.$phpEx?page=$current_page&vote=viewresult") . '">', '</a>'); ! mx_block_message($lang['Surveys_Polls'], $message); return; } *************** *** 244,248 **** $template->assign_vars(array( ! 'L_TITLE' => $lang['Surveys/Polls'], 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, --- 244,248 ---- $template->assign_vars(array( ! 'L_TITLE' => $lang['Surveys_Polls'], 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, *************** *** 274,278 **** $template->assign_vars(array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => $lang['Surveys/Polls'], 'L_SUBMIT_VOTE' => $lang['Submit_vote'], 'L_VIEW_RESULTS' => $lang['View_results'], --- 274,278 ---- $template->assign_vars(array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => $lang['Surveys_Polls'], 'L_SUBMIT_VOTE' => $lang['Submit_vote'], 'L_VIEW_RESULTS' => $lang['View_results'], |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/modules/mx_textblocks/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/language/lang_english/lang_main.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang_main.php 5 Apr 2006 21:07:17 -0000 1.7 --- lang_main.php 1 Aug 2006 21:06:13 -0000 1.8 *************** *** 4,16 **** * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ ! $lang['Toc_title'] = "Contents:"; ! $lang['Goto_page'] = "Goto page:"; ! $lang['Blog_id'] = "Blog id:<br />- \"%s\" is replaced by the username."; ?> \ No newline at end of file --- 4,16 ---- * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ ! $lang['Toc_title'] = 'Contents:'; ! $lang['Goto_page'] = 'Goto page:'; ! $lang['Blog_id'] = 'Blog id:<br />- "%s" is replaced by the username.'; ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/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 29 May 2006 15:37:04 -0000 1.5 --- lang_admin.php 1 Aug 2006 21:06:13 -0000 1.6 *************** *** 4,8 **** * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * --- 4,8 ---- * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * *************** *** 12,33 **** // Parameter Types // ! $lang['ParType_phpBBTextBlock'] = "Standard phpBB TextBlock"; ! $lang['ParType_phpBBTextBlock_info'] = "This is a Standard phpBB TextBlock, parsing bbcodes, html och smilies as defined by the phpBB config settings."; ! $lang['ParType_CustomizedTextBlock'] = "Customized TextBlock"; ! $lang['ParType_CustomizedTextBlock_info'] = "This is a Customized TextBlock, parsing bbcodes, html och smilies as defined by this block settings"; ! $lang['ParType_WysiwygTextBlock'] = "Wysiwyg TextBlock"; ! $lang['ParType_WysiwygTextBlock_info'] = "This is a Wysiwyg TextBlock, featuring a html editor"; // // Parameter Names // ! $lang['block_style'] = "Block Border:"; ! $lang['title_style'] = "Title Header Style:"; ! $lang['allow_bbcode'] = "Allow BBCodes:"; ! $lang['allow_html'] = "Allow Html:"; ! $lang['allow_smilies'] = "Allow smilies:"; ! $lang['html_tags'] = "Allowed Html tags:"; ! $lang['block_style_explain'] = "Show border around textblock:"; ! $lang['title_style_explain'] = "Use css style for title row:"; ?> \ No newline at end of file --- 12,33 ---- // Parameter Types // ! $lang['ParType_phpBBTextBlock'] = 'Standard phpBB TextBlock'; ! $lang['ParType_phpBBTextBlock_info'] = 'This is a Standard phpBB TextBlock, parsing bbcodes, html och smilies as defined by the phpBB config settings.'; ! $lang['ParType_CustomizedTextBlock'] = 'Customized TextBlock'; ! $lang['ParType_CustomizedTextBlock_info'] = 'This is a Customized TextBlock, parsing bbcodes, html och smilies as defined by this block settings'; ! $lang['ParType_WysiwygTextBlock'] = 'Wysiwyg TextBlock'; ! $lang['ParType_WysiwygTextBlock_info'] = 'This is a Wysiwyg TextBlock, featuring a html editor'; // // Parameter Names // ! $lang['block_style'] = 'Block Border:'; ! $lang['title_style'] = 'Title Header Style:'; ! $lang['allow_bbcode'] = 'Allow BBCodes:'; ! $lang['allow_html'] = 'Allow Html:'; ! $lang['allow_smilies'] = 'Allow smilies:'; ! $lang['html_tags'] = 'Allowed Html tags:'; ! $lang['block_style_explain'] = 'Show border around textblock:'; ! $lang['title_style_explain'] = 'Use css style for title row:'; ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/includes Modified Files: mx_functions_tools.php page_header.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** page_header.php 27 Jun 2006 18:12:22 -0000 1.38 --- page_header.php 1 Aug 2006 21:06:13 -0000 1.39 *************** *** 337,342 **** 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_FORUM' => $lang['Forum'], ! 'L_HOME' => $lang['Home Page'], 'U_INDEX_FORUM' => append_sid(PORTAL_URL . 'index.' . $phpEx . '?page=2'), --- 337,342 ---- 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_HOME' => $lang['MX_home'], ! 'L_FORUM' => $lang['MX_forum'], 'U_INDEX_FORUM' => append_sid(PORTAL_URL . 'index.' . $phpEx . '?page=2'), Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_functions_tools.php 5 Jul 2006 22:51:13 -0000 1.5 --- mx_functions_tools.php 1 Aug 2006 21:06:13 -0000 1.6 *************** *** 1982,1986 **** // Compose phpBB post header // ! $this->temp_url = PORTAL_URL . this_kb_mxurl("mode=" . "article&k=" . $this->data['item_id'], false, true); $this->auto_message = "[b]" . $this->langs['item_title'] . ":[/b] " . $this->data['item_title'] . "\n"; --- 1982,1986 ---- // Compose phpBB post header // ! //$this->temp_url = PORTAL_URL . this_kb_mxurl("mode=" . "article&k=" . $this->data['item_id'], false, true); $this->auto_message = "[b]" . $this->langs['item_title'] . ":[/b] " . $this->data['item_title'] . "\n"; *************** *** 2111,2113 **** --- 2111,2937 ---- } } + + /** + * Generic module cache. + * + */ + class module_cache + { + var $vars = ''; + var $vars_ts = array(); + var $modified = false; + + /** + * Enter description here... + * + * @return module_cache + */ + function module_cache($dir=false) + { + global $phpbb_root_path; + global $mx_root_path, $module_root_path, $is_block, $phpEx; + + if (!$dir) + { + mx_message_die(GENERAL_ERROR, 'The module cache need a init dir.'); + } + + $this->cache_dir = $dir . 'cache/'; + } + + /** + * Enter description here... + * + */ + function load() + { + global $phpEx; + @include( $this->cache_dir . 'data_global.' . $phpEx ); + } + + /** + * Enter description here... + * + */ + function unload() + { + $this->save(); + unset( $this->vars ); + unset( $this->vars_ts ); + } + + /** + * Enter description here... + * + */ + function save() + { + if ( !$this->modified ) + { + return; + } + + global $phpEx; + $file = '<?php $this->vars=' . $this->format_array( $this->vars ) . ";\n\$this->vars_ts=" . $this->format_array( $this->vars_ts ) . ' ?>'; + + if ( $fp = @fopen( $this->cache_dir . 'data_global.' . $phpEx, 'wb' ) ) + { + @flock( $fp, LOCK_EX ); + fwrite( $fp, $file ); + @flock( $fp, LOCK_UN ); + fclose( $fp ); + } + } + + /** + * Enter description here... + * + * @param unknown_type $expire_time + */ + function tidy( $expire_time = 0 ) + { + global $phpEx; + + $dir = opendir( $this->cache_dir ); + while ( $entry = readdir( $dir ) ) + { + if ( $entry{0} == '.' || substr( $entry, 0, 4 ) != 'sql_' ) + { + continue; + } + + if ( time() - $expire_time >= filemtime( $this->cache_dir . $entry ) ) + { + unlink( $this->cache_dir . $entry ); + } + } + + if ( file_exists( $this->cache_dir . 'data_global.' . $phpEx ) ) + { + foreach ( $this->vars_ts as $varname => $timestamp ) + { + if ( time() - $expire_time >= $timestamp ) + { + $this->destroy( $varname ); + } + } + } + else + { + $this->vars = $this->vars_ts = array(); + $this->modified = true; + } + } + + /** + * Enter description here... + * + * @param unknown_type $varname + * @param unknown_type $expire_time + * @return unknown + */ + function get( $varname, $expire_time = 0 ) + { + return ( $this->exists( $varname, $expire_time ) ) ? $this->vars[$varname] : null; + } + + /** + * Enter description here... + * + * @param unknown_type $varname + * @param unknown_type $var + */ + function put( $varname, $var ) + { + $this->vars[$varname] = $var; + $this->vars_ts[$varname] = time(); + $this->modified = true; + } + + /** + * Enter description here... + * + * @param unknown_type $varname + */ + function destroy( $varname ) + { + if ( isset( $this->vars[$varname] ) ) + { + $this->modified = true; + unset( $this->vars[$varname] ); + unset( $this->vars_ts[$varname] ); + } + } + + /** + * Enter description here... + * + * @param unknown_type $varname + * @param unknown_type $expire_time + * @return unknown + */ + function exists( $varname, $expire_time = 0 ) + { + if ( !is_array( $this->vars ) ) + { + $this->load(); + } + + if ( $expire_time > 0 && isset( $this->vars_ts[$varname] ) ) + { + if ( $this->vars_ts[$varname] <= time() - $expire_time ) + { + $this->destroy( $varname ); + return false; + } + } + + return isset( $this->vars[$varname] ); + } + + /** + * Enter description here... + * + * @param unknown_type $array + * @return unknown + */ + function format_array( $array ) + { + $lines = array(); + foreach ( $array as $k => $v ) + { + if ( is_array( $v ) ) + { + $lines[] = "'$k'=>" . $this->format_array( $v ); + }elseif ( is_int( $v ) ) + { + $lines[] = "'$k'=>$v"; + }elseif ( is_bool( $v ) ) + { + $lines[] = "'$k'=>" . ( ( $v ) ? 'TRUE' : 'FALSE' ); + } + else + { + $lines[] = "'$k'=>'" . str_replace( "'", "\'", str_replace( '\\', '\\\\', $v ) ) . "'"; + } + } + return 'array(' . implode( ',', $lines ) . ')'; + } + } + + /** + * This is a generic class for custom fields. + * + */ + class mx_custom_field + { + var $field_rowset = array(); + var $field_data_rowset = array(); + + var $custom_table = KB_CUSTOM_TABLE; + var $custom_data_table = KB_CUSTOM_DATA_TABLE; + + /** + * Constructor. + * + * @return mx_custom_field + */ + function mx_custom_field($custom_table, $custom_data_table) + { + $this->custom_table = $custom_table; + $this->custom_data_table = $custom_data_table; + } + + /** + * prepare data + * + */ + function init() + { + global $db; + + $sql = "SELECT * + FROM " . $this->custom_table . " + ORDER BY field_order ASC"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); + } + + while ( $row = $db->sql_fetchrow( $result ) ) + { + $this->field_rowset[$row['custom_id']] = $row; + } + unset( $row ); + $db->sql_freeresult( $result ); + + $sql = "SELECT * + FROM " . $this->custom_data_table; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); + } + + while ( $row = $db->sql_fetchrow( $result ) ) + { + $this->field_data_rowset[$row['customdata_file']][$row['customdata_custom']] = $row; + } + + unset( $row ); + + $db->sql_freeresult( $result ); + } + + /** + * check if there is a data in the database. + * + * @return unknown + */ + function field_data_exist() + { + if ( !empty( $this->field_data_rowset ) ) + { + return true; + } + return false; + } + + /** + * Enter description here... + * + * @return unknown + */ + function field_exist() + { + if ( !empty( $this->field_rowset ) ) + { + return true; + } + return false; + } + + /** + * display data in the comment. + * + * @param unknown_type $file_id + * @return unknown + */ + function add_comment( $file_id ) + { + global $template; + if ( $this->field_data_exist() ) + { + if ( isset( $this->field_data_rowset[$file_id] ) ) + { + $message = ''; + foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) + { + if ( !empty( $data['data'] ) ) + { + switch ( $this->field_rowset[$field_id]['field_type'] ) + { + case INPUT: + case TEXTAREA: + case RADIO: + case SELECT: + $field_data = $data['data']; + break; + case SELECT_MULTIPLE: + case CHECKBOX: + $field_data = @implode( ', ', unserialize( $data['data'] ) ); + break; + } + $message .= "\n" . "[b]" . $this->field_rowset[$field_id]['custom_name'] . ":[/b] " . $field_data . "\n"; + } + else + { + global $db; + + $sql = "DELETE FROM " . $this->custom_data_table . " + WHERE customdata_file = '$file_id' + AND customdata_custom = '$field_id'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); + } + } + } + return $message; + } + else + { + return false; + } + } + else + { + return false; + } + } + + /** + * display data in the file page. + * + * @param unknown_type $file_id + * @return unknown + */ + function display_data( $file_id ) + { + global $template; + if ( $this->field_data_exist() ) + { + if ( isset( $this->field_data_rowset[$file_id] ) ) + { + foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) + { + if ( !empty( $data['data'] ) ) + { + switch ( $this->field_rowset[$field_id]['field_type'] ) + { + case INPUT: + case TEXTAREA: + case RADIO: + case SELECT: + $field_data = $data['data']; + break; + case SELECT_MULTIPLE: + case CHECKBOX: + $field_data = @implode( ', ', unserialize( $data['data'] ) ); + break; + } + + $template->assign_block_vars( 'custom_field', array( + 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], + 'DATA' => $field_data ) + ); + } + else + { + global $db; + + $sql = "DELETE FROM " . $this->custom_data_table . " + WHERE customdata_file = '$file_id' + AND customdata_custom = '$field_id'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); + } + } + } + } + else + { + return false; + } + } + else + { + return false; + } + } + + /** + * display custom field and data in the add/edit page. + * + * @param unknown_type $file_id + * @return unknown + */ + function display_edit( $file_id = false ) + { + $return = false; + if ( $this->field_exist() ) + { + foreach( $this->field_rowset as $field_id => $field_data ) + { + switch ( $field_data['field_type'] ) + { + case INPUT: + $this->display_edit_input( $file_id, $field_id, $field_data ); + break; + case TEXTAREA: + $this->display_edit_textarea( $file_id, $field_id, $field_data ); + break; + case RADIO: + $this->display_edit_radio( $file_id, $field_id, $field_data ); + break; + case SELECT: + $this->display_edit_select( $file_id, $field_id, $field_data ); + break; + case SELECT_MULTIPLE: + $this->display_edit_select_multiple( $file_id, $field_id, $field_data ); + break; + case CHECKBOX: + $this->display_edit_checkbox( $file_id, $field_id, $field_data ); + break; + } + + $return = true; + } + } + return $return; + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_input( $file_id, $field_id, $field_data ) + { + global $template; + $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; + $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; + $template->assign_block_vars( 'input', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'], + 'FIELD_VALUE' => $field_value ) + ); + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_textarea( $file_id, $field_id, $field_data ) + { + global $template; + $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; + $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; + $template->assign_block_vars( 'textarea', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'], + 'FIELD_VALUE' => $field_value ) + ); + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_radio( $file_id, $field_id, $field_data ) + { + global $template; + $template->assign_block_vars( 'radio', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) + ); + + $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); + $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; + $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); + + if ( !empty( $field_datas ) ) + { + foreach( $field_datas as $key => $value ) + { + $template->assign_block_vars( 'radio.row', array( + 'FIELD_VALUE' => $value, + 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) + ); + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_select( $file_id, $field_id, $field_data ) + { + global $template; + $template->assign_block_vars( 'select', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) + ); + + $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; + $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; + $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); + + if ( !empty( $field_datas ) ) + { + foreach( $field_datas as $key => $value ) + { + $template->assign_block_vars( 'select.row', array( + 'FIELD_VALUE' => $value, + 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) + ); + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_select_multiple( $file_id, $field_id, $field_data ) + { + global $template; + $template->assign_block_vars( 'select_multiple', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) + ); + + $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); + $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; + $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); + + if ( !empty( $field_datas ) ) + { + foreach( $field_datas as $key => $value ) + { + $selected = ''; + foreach( $data as $field_value ) + { + if ( $field_value == $value ) + { + $selected = ' selected="selected"'; + break; + } + } + $template->assign_block_vars( 'select_multiple.row', array( + 'FIELD_VALUE' => $value, + 'FIELD_SELECTED' => $selected ) + ); + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $file_id + * @param unknown_type $field_id + * @param unknown_type $field_data + */ + function display_edit_checkbox( $file_id, $field_id, $field_data ) + { + global $template; + $template->assign_block_vars( 'checkbox', array( + 'FIELD_NAME' => $field_data['custom_name'], + 'FIELD_ID' => $field_data['custom_id'], + 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) + ); + + $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); + $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; + $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); + + if ( !empty( $field_datas ) ) + { + foreach( $field_datas as $key => $value ) + { + $checked = ''; + foreach( $data as $field_value ) + { + if ( $field_value == $value ) + { + $checked = ' checked'; + break; + } + } + $template->assign_block_vars( 'checkbox.row', array( + 'FIELD_VALUE' => $value, + 'FIELD_CHECKED' => $checked ) + ); + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $field_type + * @param unknown_type $field_id + */ + function update_add_field( $field_type, $field_id = false ) + { + global $db, $db, $_POST, $lang; + + $field_name = ( isset( $_POST['field_name'] ) ) ? htmlspecialchars( $_POST['field_name'] ) : ''; + $field_desc = ( isset( $_POST['field_desc'] ) ) ? htmlspecialchars( $_POST['field_desc'] ) : ''; + $regex = ( isset( $_POST['regex'] ) ) ? $_POST['regex'] : ''; + $data = ( isset( $_POST['data'] ) ) ? $_POST['data'] : ''; + $field_order = ( isset( $_POST['field_order'] ) ) ? $_POST['field_order'] : ''; + + if ( $field_id ) + { + $field_order = ( isset( $_POST['field_order'] ) ) ? intval( $_POST['field_order'] ) : ''; + } + + if ( !empty( $data ) ) + { + $data = explode( "\n", htmlspecialchars( trim( $data ) ) ); + + foreach( $data as $key => $value ) + { + $data[$key] = trim( $value ); + } + $data = addslashes( serialize( $data ) ); + } + + if ( empty( $field_name ) ) + { + mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); + } + + if ( ( ( $field_type != INPUT && $field_type != TEXTAREA ) && empty( $data ) ) ) + { + mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); + } + + if ( !$field_id ) + { + $sql = "INSERT INTO " . $this->custom_table . " (custom_name, custom_description, data, regex, field_type) + VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not add the new fields', '', __LINE__, __FILE__, $sql ); + } + + $field_id = $db->sql_nextid(); + + $sql = "UPDATE " . $this->custom_table . " + SET field_order = '$field_id' + WHERE custom_id = $field_id"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not set the order for the giving field', '', __LINE__, __FILE__, $sql ); + } + } + else + { + $sql = "UPDATE " . $this->custom_table . " + SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' + WHERE custom_id = $field_id"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not update information for the giving field', '', __LINE__, __FILE__, $sql ); + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $field_id + */ + function delete_field( $field_id ) + { + global $db; + + $sql = "DELETE FROM " . $this->custom_data_table . " + WHERE customdata_custom = '$field_id'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); + } + + $sql = "DELETE FROM " . $this->custom_table . " + WHERE custom_id = '$field_id'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not delete the selected field', '', __LINE__, __FILE__, $sql ); + } + } + + /** + * Enter description here... + * + * @param unknown_type $field_id + * @return unknown + */ + function get_field_data( $field_id ) + { + $return_array = $this->field_rowset[$field_id]; + $return_array['data'] = !empty( $return_array['data'] ) ? implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ) : ''; + return $return_array; + } + + /** + * file data in custom field operations. + * + * @param unknown_type $file_id + */ + function file_update_data( $file_id ) + { + global $_POST, $db; + $field = ( isset( $_POST['field'] ) ) ? $_POST['field'] : ''; + if ( !empty( $field ) ) + { + foreach( $field as $field_id => $field_data ) + { + if ( !empty( $this->field_rowset[$field_id]['regex'] ) ) + { + if ( !preg_match( '#' . $this->field_rowset[$field_id]['regex'] . '#siU', $field_data ) ) + { + $field_data = ''; + } + } + + switch ( $this->field_rowset[$field_id]['field_type'] ) + { + case INPUT: + case TEXTAREA: + case RADIO: + case SELECT: + $data = htmlspecialchars( $field_data ); + break; + case SELECT_MULTIPLE: + case CHECKBOX: + $data = addslashes( serialize( $field_data ) ); + break; + } + + $sql = "DELETE FROM " . $this->custom_data_table . " + WHERE customdata_file = '$file_id' + AND customdata_custom = '$field_id'"; + + if ( !$db->sql_query( $sql ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not delete data from custom data table', '', __LINE__, __FILE__, $sql ); + } + + if ( !empty( $data ) ) + { + $sql = "INSERT INTO " . $this->custom_data_table . " (customdata_file, customdata_custom, data) + VALUES('$file_id', '$field_id', '$data')"; + + if ( !$db->sql_query( $sql ) ) + { + mx_message_die( GENERAL_ERROR, 'Could not add additional data', '', __LINE__, __FILE__, $sql ); + } + } + } + } + } + } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_main.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** lang_main.php 27 Jun 2006 07:52:03 -0000 1.31 --- lang_main.php 1 Aug 2006 21:06:13 -0000 1.32 *************** *** 12,109 **** // The format of this file is: // ! // ---> $lang["message"] = "text"; // // Specify your language character encoding... [optional] // ! // setlocale(LC_ALL, "en"); ! ! // Menu_nav.php ! $lang['Home Page'] = "Portal Home"; ! $lang['Announcements'] = "Announcements"; ! $lang['Forum'] = "Forum"; ! $lang['Main Menu'] = "Main Menu"; ! $lang['Module Statistics'] = "Statistics"; ! $lang['Send a Private message'] = "Send Private message"; ! $lang['Edit your Profile'] = "Edit Your Profile"; ! ! $lang['Portal_lang'] = "LanguageCP"; // Blocktitle ! $lang['SELECTGUILANG'] = "Select Language:"; ! ! $lang['Change'] = "Change now"; ! $lang['Change_default_style'] = "Set Board Default Style"; ! $lang['Change_user_style'] = "Set Your Style"; ! ! $lang['Change_default_lang'] = "Set Board Default Language"; ! $lang['Change_user_lang'] = "Set Your Language"; ! ! $lang['Block_Title'] = "Title"; ! $lang['Block_Info'] = "Information"; ! ! $lang['Theme'] = "Theme/Style CP"; // Blocktitle ! $lang['SelectTheme'] = "Select Theme/Style:"; ! $lang['Surveys/Polls'] = "Surveys/Polls"; ! $lang['Already_voted'] = "You have already voted"; ! $lang['Click_view_voted'] = "Click %sHere%s to view the results"; ! $lang['Annonce_sent'] = "The announcement has been sent"; ! $lang['Annonce_Deleted'] = "The announcement has been deleted"; ! $lang['Block_Config_updated'] = "Block Configuration updated successfully"; ! $lang['Block_Edit'] = "Edit Block"; ! $lang['Block_Edit_dyn'] = "Edit parent dynamic block"; ! $lang['Block_Edit_sub'] = "Edit parent split block"; // ! // New for v. 2.704 // ! $lang['Page_Not_Authorised'] = "Sorry, but you are not authorized to access this page."; // ! // New for v. 2.705 // ! $lang['Execution_Stats'] = "Page generated %s queries - Generation time: %s seconds"; // ! // New for v. 2.7.3 // ! $lang['Redirect_login'] = "Click %sHere%s to login."; // ! // New for v. 2.7.4 - 2.8 // ! $lang['Show_admin_options'] = "Show/Hide Page Admin Options: "; ! $lang['Hidden_block'] = "Hidden block..."; ! $lang['Hidden_block_explain'] = "This block is 'hidden', but visible since you're an administrator or moderator."; ! $lang['General_updated_return_settings'] = "Configuration updated successfully...<br /><br />Click %shere%s to continue."; // %s's for URI params - DO NOT REMOVE ! $lang['General_update_error'] = "Couldn't update configuration..."; ! $lang['Mx_Page'] = "Page"; ! $lang['Mx_Block'] = "Section"; ! $lang['Mx_search_site'] = "Site"; ! $lang['Mx_search_forum'] = "Forum"; ! $lang['Mx_search_kb'] = "Articles"; ! $lang['Mx_search_pafiledb'] = "Downloads"; ! $lang['Mx_search_google'] = "Google"; ! $lang['Mx_new_search'] = 'New Search'; ! $lang['Block_updated_by'] = "Updated by "; ! $lang['No_items_found'] = "Nothing new to report. "; ! $lang['Powered_by'] = "Powered by "; ! $lang['mx_about_title'] = 'About mxBB Portal'; ! $lang['mx_copy_title'] = 'mxBB Portal Information'; ! $lang['mx_copy_modules_title'] = 'Installed mxBB Portal Modules'; $lang['mx_copy_template_title'] = 'About the style'; $lang['mx_copy_translation_title'] = 'About the translation'; ! $lang['mx_spacer'] = 'Spacer'; ! ! $lang['Yes'] = 'Yes'; ! $lang['No'] = 'No'; ! $lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted'; --- 12,108 ---- // The format of this file is: // ! // ---> $lang['message'] = 'text'; // // Specify your language character encoding... [optional] // ! // setlocale(LC_ALL, 'en'); ! // ! // General ! // ! $lang['Page_Not_Authorised'] = 'Sorry, but you are not authorized to access this page.'; ! $lang['Execution_Stats'] = 'Page generated %s queries - Generation time: %s seconds'; ! $lang['Redirect_login'] = 'Click %sHere%s to login.'; ! $lang['Show_admin_options'] = 'Show/Hide Page Admin Options: '; ! $lang['Block_updated_by'] = 'Updated by '; ! $lang['Powered_by'] = 'Powered by '; ! $lang['mx_spacer'] = 'Spacer'; ! $lang['Yes'] = 'Yes'; ! $lang['No'] = 'No'; ! $lang['Hidden_block'] = 'Hidden block...'; ! $lang['Hidden_block_explain'] = 'This block is \'hidden\', but visible since you\'re an administrator or moderator.'; // ! // Overall Navigation Navigation // ! $lang['MX_home'] = 'Home'; ! $lang['MX_forum'] = 'Forum'; // ! // Core Blocks - Language // ! $lang['Change_default_lang'] = 'Set Board Default Language'; ! $lang['Change_user_lang'] = 'Set Your Language'; ! $lang['Portal_lang'] = 'LanguageCP'; ! $lang['Select_lang'] = 'Select Language:'; // ! // Core Blocks - Theme // ! $lang['Change'] = 'Change now'; ! $lang['Change_default_style'] = 'Set Board Default Style'; ! $lang['Change_user_style'] = 'Set Your Style'; ! $lang['Theme'] = 'Theme/Style CP'; ! $lang['Select_theme'] = 'Select Theme/Style:'; // ! // Core Blocks - Search // ! $lang['Mx_Page'] = 'Page'; ! $lang['Mx_Block'] = 'Section'; ! // ! // Core Blocks - Site Log (and many last 'item' blocks) ! // ! $lang['No_items_found'] = 'Nothing new to report. '; ! // ! // BlockCP ! // ! $lang['Block_Title'] = 'Title'; ! $lang['Block_Info'] = 'Information'; ! $lang['Block_Config_updated'] = 'Block Configuration updated successfully'; ! $lang['Block_Edit'] = 'Edit Block'; ! $lang['Block_Edit_dyn'] = 'Edit parent dynamic block'; ! $lang['Block_Edit_sub'] = 'Edit parent split block'; ! $lang['General_updated_return_settings'] = 'Configuration updated successfully...<br /><br />Click %shere%s to continue.'; // %s's for URI params - DO NOT REMOVE ! $lang['General_update_error'] = 'Couldn\'t update configuration...'; ! // ! // Header ! // ! $lang['Mx_search_site'] = 'Site'; ! $lang['Mx_search_forum'] = 'Forum'; ! $lang['Mx_search_kb'] = 'Articles'; ! $lang['Mx_search_pafiledb'] = 'Downloads'; ! $lang['Mx_search_google'] = 'Google'; ! $lang['Mx_new_search'] = 'New Search'; ! // ! // Copyrights page ! // ! $lang['mx_about_title'] = 'About mxBB Portal'; ! $lang['mx_copy_title'] = 'mxBB Portal Information'; ! $lang['mx_copy_modules_title'] = 'Installed mxBB Portal Modules'; $lang['mx_copy_template_title'] = 'About the style'; $lang['mx_copy_translation_title'] = 'About the translation'; ! // ! // Installation ! // $lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted'; *************** *** 113,118 **** // - This lang key replaces the page title (PAGE_TITLE) for the page given in the adminCP // ! //$lang['pagetitle_NameOfFirstPage'] = 'Whatever one'; ! //$lang['pagetitle_NameOfSecondPage'] = 'Whatever two'; // --- 112,117 ---- // - This lang key replaces the page title (PAGE_TITLE) for the page given in the adminCP // ! //$lang['pagetitle_NameOfFirstPage'] = 'Whatever one'; ! //$lang['pagetitle_NameOfSecondPage'] = 'Whatever two'; // *************** *** 121,130 **** // - This lang key replaces the block title (BLOCK_TITLE) for the block given in the adminCP/blockCP // ! //$lang['blocktitle_NameOfFirstPage'] = 'Whatever one'; ! //$lang['blocktitle_NameOfSecondPage'] = 'Whatever two'; // // That's all Folks! // ------------------------------------------------- - ?> \ No newline at end of file --- 120,128 ---- // - This lang key replaces the block title (BLOCK_TITLE) for the block given in the adminCP/blockCP // ! //$lang['blocktitle_NameOfFirstPage'] = 'Whatever one'; ! //$lang['blocktitle_NameOfSecondPage'] = 'Whatever two'; // // That's all Folks! // ------------------------------------------------- ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_admin.php,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** lang_admin.php 27 Jun 2006 07:52:03 -0000 1.66 --- lang_admin.php 1 Aug 2006 21:06:13 -0000 1.67 *************** *** 16,410 **** // The format of this file is: // ! // ---> $lang["message"] = "text"; // // Specify your language character encoding... [optional] // ! // setlocale(LC_ALL, "en"); ! $lang['mxBB_adminCP'] = "mxBB Portal Administration"; [...968 lines suppressed...] // --- 505,522 ---- // Dynamic Block // ! $lang['default_block_id'] = 'Default Block'; ! $lang['default_block_id_explain'] = '- This is the default or first block to display, unless a dynamic block is set'; // // Menu Navigation // ! $lang['menu_display_style'] = 'Menu Style'; ! $lang['menu_display_style_explain '] = 'Standard, Simple, Advanced or Advanced App'; ! $lang['menu_display_mode'] = 'Layout mode'; ! $lang['menu_display_mode_explain '] = 'Horizonal or Vertical layout mode'; ! $lang['menu_page_sync'] = 'Highlight current?'; ! $lang['menu_page_sync_explain'] = 'Highlight current Navigation Menu entry...'; // |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/modules/mx_navmenu/language/lang_english Modified Files: lang_admin.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/language/lang_english/lang_admin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lang_admin.php 5 Apr 2006 20:59:46 -0000 1.4 --- lang_admin.php 1 Aug 2006 21:06:13 -0000 1.5 *************** *** 12,67 **** // Menu Management // ! $lang['Nav_menu_cat'] = "Navigation Menu Category"; ! $lang['Nav_menu'] = "Navigation Menu"; ! $lang['Menu_admin'] = "Navigation Menu Administration"; ! $lang['Menu_admin_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_edit_delete_explain'] = "Use this form to customize your Navigation Menu"; ! $lang['Menu_settings'] = "Navigation Menu Information"; ! $lang['Menu_delete'] = "Delete a Navigation Menu"; ! $lang['Menu_delete_explain'] = "Use this form to delete (and/or move) a Navigation Menu and its subelement(s)"; ! $lang['Edit_menu'] = "Edit a Navigation Menu"; ! $lang['Create_menu'] = "Add new Navigation Menu"; ! $lang['Create_category'] = "Add new Navigation Category"; ! $lang['Menu_Config_updated'] = "Navigation Menu Configuration Updated Successfully"; ! $lang['Menus_updated'] = "Menu and Category information updated successfully"; ! $lang['Click_return_menuadmin'] = "Click %sHere%s to return to Navigation Menu Administration"; ! $lang['Menu_name'] = "Navigation Menu Name"; ! $lang['Menu_icon'] = "Navigation Menu Icon<br /> - the *_hot.gif pic is only used when 'Mark Current Page' is enabled."; ! $lang['Menu_desc'] = "Description"; ! $lang['Click_return_admin_index'] = "Click %sHere%s to return to the Administration Index"; ! $lang['Menu_links'] = "Menu URL<br />- Link to external page (enter full URL) or internal page (enter relative path)<br />- This option may be used together with 'Link Target: - iframe mode'."; ! $lang['Menu_page'] = "Menu Page (default/standard) <br />- link to internal portal page<br />NOTE: Pages are created using Page Administration."; ! $lang['Menu_block'] = "Dynamic Block<br />- need a dynamic block on the Page to handle the setting"; ! $lang['Menu_function'] = "Menu Function (dev only)<br />- link to mxBB specific function (not available)"; ! $lang['Menu_action_title'] = "<b>Menu Action:</b> <br /><i>(Chose one of the 4 options below.)</i> "; ! $lang['Menu_action_adv'] = "<b>Advanced Menu Actions:</b> <br /><i>(Use carefully - intended for developers only):</i>"; ! $lang['Menu_permissions_title'] = "<b>View/Edit Permissions:</b>"; ! $lang['Link_target'] = "Link Target:<br />- 'default', open in this browser<br />- 'new browser', open in new browser<br />- 'iframe mode', open url (given below) in page with IncludeX block."; ! $lang['Menu_display_mode'] = "Navigation Mode:<br /> - span horizontal or vertical"; ! $lang['Menu_page_sync'] = "Highlight selected page in navigation menu<br /> - current menu option is highlighted and its icon will be switched (if you have a *_hot.gif)"; ! $lang['Menu_par_title'] = "General Menu Navigation Settings:"; ! $lang['Show_cat'] = "Folded/Unfolded Category: <br /> - Default value, before user value is set:"; ! $lang['Move_and_or_Delete'] = "Delete (and move)"; ! $lang['Delete_nav_menu'] = "Delete Navigation Menu entry"; ! $lang['Delete_nav_menu_explain'] = "This will delete the Navigation Menu entry. Beware, this operation cannot be undone!"; ! $lang['Click_nav_menu_delete_yes'] = "Click %sHere%s to delete the Navigation Menu."; // // 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"; ?> \ No newline at end of file --- 12,67 ---- // Menu Management // ! $lang['Nav_menu_cat'] = 'Navigation Menu Category'; ! $lang['Nav_menu'] = 'Navigation Menu'; ! $lang['Menu_admin'] = 'Navigation Menu Administration'; ! $lang['Menu_admin_explain'] = 'Use this form to customize your Navigation Menu'; ! $lang['Menu_edit_delete_explain'] = 'Use this form to customize your Navigation Menu'; ! $lang['Menu_settings'] = 'Navigation Menu Information'; ! $lang['Menu_delete'] = 'Delete a Navigation Menu'; ! $lang['Menu_delete_explain'] = 'Use this form to delete (and/or move) a Navigation Menu and its subelement(s)'; ! $lang['Edit_menu'] = 'Edit a Navigation Menu'; ! $lang['Create_menu'] = 'Add new Navigation Menu'; ! $lang['Create_category'] = 'Add new Navigation Category'; ! $lang['Menu_Config_updated'] = 'Navigation Menu Configuration Updated Successfully'; ! $lang['Menus_updated'] = 'Menu and Category information updated successfully'; ! $lang['Click_return_menuadmin'] = 'Click %sHere%s to return to Navigation Menu Administration'; ! $lang['Menu_name'] = 'Navigation Menu Name'; ! $lang['Menu_icon'] = 'Navigation Menu Icon<br /> - the *_hot.gif pic is only used when \'Mark Current Page\' is enabled.'; ! $lang['Menu_desc'] = 'Description'; ! $lang['Click_return_admin_index'] = 'Click %sHere%s to return to the Administration Index'; ! $lang['Menu_links'] = 'Menu URL<br />- Link to external page (enter full URL) or internal page (enter relative path)<br />- This option may be used together with \'Link Target: - iframe mode\'.'; ! $lang['Menu_page'] = 'Menu Page (default/standard) <br />- link to internal portal page<br />NOTE: Pages are created using Page Administration.'; ! $lang['Menu_block'] = 'Dynamic Block<br />- need a dynamic block on the Page to handle the setting'; ! $lang['Menu_function'] = 'Menu Function (dev only)<br />- link to mxBB specific function (not available)'; ! $lang['Menu_action_title'] = '<b>Menu Action:</b> <br /><i>(Chose one of the 4 options below.)</i> '; ! $lang['Menu_action_adv'] = '<b>Advanced Menu Actions:</b> <br /><i>(Use carefully - intended for developers only):</i>'; ! $lang['Menu_permissions_title'] = '<b>View/Edit Permissions:</b>'; ! $lang['Link_target'] = 'Link Target:<br />- \'default\', open in this browser<br />- \'new browser\', open in new browser<br />- \'iframe mode\', open url (given below) in page with IncludeX block.'; ! $lang['Menu_display_mode'] = 'Navigation Mode:<br /> - span horizontal or vertical'; ! $lang['Menu_page_sync'] = 'Highlight selected page in navigation menu<br /> - current menu option is highlighted and its icon will be switched (if you have a *_hot.gif)'; ! $lang['Menu_par_title'] = 'General Menu Navigation Settings:'; ! $lang['Show_cat'] = 'Folded/Unfolded Category: <br /> - Default value, before user value is set:'; ! $lang['Move_and_or_Delete'] = 'Delete (and move)'; ! $lang['Delete_nav_menu'] = 'Delete Navigation Menu entry'; ! $lang['Delete_nav_menu_explain'] = 'This will delete the Navigation Menu entry. Beware, this operation cannot be undone!'; ! $lang['Click_nav_menu_delete_yes'] = 'Click %sHere%s to delete the Navigation Menu.'; // // 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'; ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/modules/mx_coreblocks Modified Files: mx_language.php mx_theme.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: mx_language.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_language.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_language.php 3 May 2006 09:17:29 -0000 1.15 --- mx_language.php 1 Aug 2006 21:06:13 -0000 1.16 *************** *** 71,75 **** 'L_CHANGE_NOW' => $lang['Change'], 'L_TITLE' => $lang['Portal_lang'], ! 'L_SUBTITLE' => $lang['SELECTGUILANG'] )); --- 71,75 ---- 'L_CHANGE_NOW' => $lang['Change'], 'L_TITLE' => $lang['Portal_lang'], ! 'L_SUBTITLE' => $lang['Select_lang'] )); Index: mx_theme.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_theme.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** mx_theme.php 28 Apr 2006 14:29:37 -0000 1.15 --- mx_theme.php 1 Aug 2006 21:06:13 -0000 1.16 *************** *** 22,26 **** config_value = '$mx_default_style' WHERE config_name = 'default_style'"; ! if ( !$db->sql_query($sql) ) { --- 22,26 ---- config_value = '$mx_default_style' WHERE config_name = 'default_style'"; ! if ( !$db->sql_query($sql) ) { *************** *** 38,42 **** user_style = '$mx_user_style' WHERE user_id = '" . $userdata['user_id'] . "'"; ! if ( !$db->sql_query( $sql ) ) { --- 38,42 ---- user_style = '$mx_user_style' WHERE user_id = '" . $userdata['user_id'] . "'"; ! if ( !$db->sql_query( $sql ) ) { *************** *** 70,74 **** 'L_CHANGE_NOW' => $lang['Change'], 'L_TITLE' => $lang['Theme'], ! 'L_SUBTITLE' => $lang['SelectTheme'] )); --- 70,74 ---- 'L_CHANGE_NOW' => $lang['Change'], 'L_TITLE' => $lang['Theme'], ! 'L_SUBTITLE' => $lang['Select_theme'] )); *************** *** 80,84 **** $template->pparse('body_theme'); } ! else { $mx_block->show_title = false; --- 80,84 ---- $template->pparse('body_theme'); } ! else { $mx_block->show_title = false; |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:06:16
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24654/modules/mx_phpbb2blocks/language/lang_english Modified Files: lang_main.php Log Message: - A few generic classes added to the functions_tools file, for modules - cleaned up lang files Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/language/lang_english/lang_main.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lang_main.php 2 May 2006 23:22:17 -0000 1.1 --- lang_main.php 1 Aug 2006 21:06:13 -0000 1.2 *************** *** 12,54 **** // The format of this file is: // ! // ---> $lang["message"] = "text"; // // Specify your language character encoding... [optional] // ! // setlocale(LC_ALL, "en"); // // Last Message Block // ! $lang['Latest_Post'] = "Last Message Post"; // // Statistics Block // ! $lang['Statistics'] = "Statistics"; ! $lang['Rank'] = "Rank"; ! $lang['Percent'] = "Percent"; ! $lang['Graph'] = "Graph"; ! $lang['Uses'] = "Uses"; ! $lang['Board_Up_Days'] = "Board Up Days"; ! $lang['Latest_Reg_User'] = "Latest User Registered"; ! $lang['Latest_Reg_User_Date'] = "Latest User Registered Date"; ! $lang['Most_Ever_Online'] = "Most Users Ever Online"; ! $lang['Most_Ever_Online_Date'] = "Most Users Ever Online Date"; ! $lang['Admin_Stats'] = "Administrative Statistics"; ! $lang['Top_Posting_Users'] = "Top Posting Users"; ! $lang['Most_Active_Topics'] = "Most Active Topics"; ! $lang['Most_Viewed_Topics'] = "Most Viewed Topics"; ! $lang['Top_Smilies'] = "Top Used Smilies"; // // These Language Variables are only used if the Attachment Mod is installed // ! $lang['Disk_usage'] = "Disk Usage"; // // That's all Folks! // ------------------------------------------------- - ?> \ No newline at end of file --- 12,60 ---- // The format of this file is: // ! // ---> $lang['message'] = 'text'; // // Specify your language character encoding... [optional] // ! // setlocale(LC_ALL, 'en'); // // Last Message Block // ! $lang['Latest_Post'] = 'Last Message Post'; // // Statistics Block // ! $lang['Statistics'] = 'Statistics'; ! $lang['Rank'] = 'Rank'; ! $lang['Percent'] = 'Percent'; ! $lang['Graph'] = 'Graph'; ! $lang['Uses'] = 'Uses'; ! $lang['Board_Up_Days'] = 'Board Up Days'; ! $lang['Latest_Reg_User'] = 'Latest User Registered'; ! $lang['Latest_Reg_User_Date'] = 'Latest User Registered Date'; ! $lang['Most_Ever_Online'] = 'Most Users Ever Online'; ! $lang['Most_Ever_Online_Date'] = 'Most Users Ever Online Date'; ! $lang['Admin_Stats'] = 'Administrative Statistics'; ! $lang['Top_Posting_Users'] = 'Top Posting Users'; ! $lang['Most_Active_Topics'] = 'Most Active Topics'; ! $lang['Most_Viewed_Topics'] = 'Most Viewed Topics'; ! $lang['Top_Smilies'] = 'Top Used Smilies'; ! ! // ! // Polls ! // ! $lang['Surveys_Polls'] = 'Surveys/Polls'; ! $lang['Already_voted'] = 'You have already voted'; ! $lang['Click_view_voted'] = 'Click %sHere%s to view the results'; // // These Language Variables are only used if the Attachment Mod is installed // ! $lang['Disk_usage'] = 'Disk Usage'; // // That's all Folks! // ------------------------------------------------- ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:29
|
Update of /cvsroot/mxbb/mx_pafiledb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: massive update Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_main.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** lang_main.php 17 Jun 2006 20:13:22 -0000 1.8 --- lang_main.php 1 Aug 2006 21:03:24 -0000 1.9 *************** *** 1,59 **** <?php - /** ------------------------------------------------------------------------ - * Subject : mxBB - a fully modular portal and CMS (for phpBB) - * Author : Jon Ohlsson and the mxBB Team - * Credits : The phpBB Group & Marc Morisette, Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena - * Copyright : (C) 2002-2005 mxBB Portal - * Email : jo...@mx... - * Project site : www.mxbb-portal.com - * ------------------------------------------------------------------------- - * - * $Id$ - */ - /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! // Toplist ! $lang['Toplist'] = 'Toplist'; ! $lang['Select_list'] = 'Select the type of list to show'; ! $lang['Latest_downloads'] = 'The Newest Files'; ! $lang['Most_downloads'] = 'Most Popular Files'; ! $lang['Rated_downloads'] = 'Top Rated Files'; ! ! $lang['Total_new_files'] = 'Total New Downloads'; ! $lang['Show'] = 'Show'; ! $lang['One_week'] = 'One Week'; ! $lang['Two_week'] = 'Two Week'; ! $lang['30_days'] = '30 Days'; ! $lang['New_Files'] = 'Total new files for last %d days'; ! $lang['Last_week'] ='Last Week'; ! $lang['Last_30_days'] = 'Last 30 Days'; ! $lang['Show_top'] = 'Show Top'; ! $lang['Or_top'] = 'or Top'; ! $lang['Popular_num'] = 'Top %d out of %d files in the database'; ! $lang['Popular_per'] = 'Top %d %% of all %d files in the database'; ! $lang['General_Info'] = 'General Information'; ! $lang['Downloads_stats'] = 'User\'s Downloads Stats'; ! $lang['Rating_stats'] = 'User\'s Rating Stats'; ! $lang['Os'] = 'Operating System'; ! $lang['Browsers'] = 'Browsers'; ! // Toplists mx blocks ! $lang['Recent_Public_Files'] = 'Latest dls'; ! $lang['Random_Public_Files'] = 'Random dls'; ! $lang['Toprated_Public_Files'] = 'Toprated dls'; ! $lang['Most_Public_Files'] = 'Most downloaded'; ! $lang['File_Title'] = 'Title'; ! $lang['File_Desc'] = 'Description'; ! $lang['Rating'] = 'Rating'; ! $lang['Dls'] = 'Downloaded'; // Main $lang['Files'] = 'Files'; $lang['Viewall'] = 'View All Files'; --- 1,38 ---- <?php /** ! * ! * @package mxBB Portal Module - mx_kb ! * @version $Id$ ! * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * ! */ ! // ! // General ! // ! $lang['Category'] = 'Category'; ! $lang['Error_no_download'] = 'The selected File does not exist anymore'; ! $lang['Options'] = 'Options'; ! $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; ! $lang['Click_here'] = 'Click Here'; ! $lang['never'] = 'None'; ! $lang['pafiledb_disable'] = 'Download Database is disabled'; ! $lang['jump'] = 'Select a category'; ! $lang['viewall_disabled'] = 'This feature is disabled by the admin.'; ! $lang['New_file'] = 'New file'; ! $lang['No_new_file'] = 'No new file'; ! $lang['None'] = 'None'; ! $lang['No_file'] = 'No Files'; ! $lang['View_latest_file'] = 'View Latest File'; ! // ! // Return ! // ! $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; + // // Main + // $lang['Files'] = 'Files'; $lang['Viewall'] = 'View All Files'; *************** *** 65,74 **** --- 44,57 ---- $lang['Last_file'] = 'Last File'; + // // Sort + // $lang['Sort'] = 'Sort'; $lang['Name'] = 'Name'; $lang['Update_time'] = 'Last Updated'; + // // Category + // $lang['No_files'] = 'No files found'; $lang['No_files_cat'] = 'There are no files in this category.'; *************** *** 77,81 **** --- 60,66 ---- $lang['License_not_exist'] = 'The license you selected does not exist.'; + // // File + // $lang['File'] = 'File'; $lang['Desc'] = 'Description'; *************** *** 103,110 **** $lang['Add_new_mirror'] = 'Add new mirror'; ! //User Upload $lang['User_upload'] = 'User Upload'; // License $lang['License'] = 'License Agreement'; $lang['Licensewarn'] = 'You must agree to this license agreement to download'; --- 88,190 ---- $lang['Add_new_mirror'] = 'Add new mirror'; ! // ! // Admin Panels - File ! // ! $lang['File_manage_title'] = 'File Management'; ! ! $lang['Afile'] = 'File: Add'; ! $lang['Efile'] = 'File: Edit'; ! $lang['Dfile'] = 'File: Delete'; ! $lang['Afiletitle'] = 'Add File'; ! $lang['Efiletitle'] = 'Edit File'; ! $lang['Dfiletitle'] = 'Delete File'; ! $lang['Fileexplain'] = 'You can use the file management section to add, edit, and delete files.'; ! $lang['Upload'] = 'Upload File'; ! $lang['Uploadinfo'] = 'Upload this file'; ! $lang['Uploaderror'] = 'This file already exists. Please rename the file and try again.'; ! $lang['Uploaddone'] = 'This file has been successfully uploaded. The URL to the file is'; ! $lang['Uploaddone2'] = 'Click Here to place this URL in the Download URL field.'; ! $lang['Upload_do_done'] = 'Uploaded Sucessfully'; ! $lang['Upload_do_not'] = 'Not Uploaded'; ! $lang['Upload_do_exist'] = 'File Exist'; ! $lang['Filename'] = 'File Name'; ! $lang['Filenameinfo'] = 'This is the name of the file you are adding, such as \'My Picture.\''; ! $lang['Filesd'] = 'Short Description'; ! $lang['Filesdinfo'] = 'This is a short description of the file. This will go on the page that lists all the files in a category, so this description should be short'; ! $lang['Fileld'] = 'Long Description'; ! $lang['Fileldinfo'] = 'This is a longer description of the file. This will go on the file\'s information page so this description can be longer'; ! $lang['Filecreator'] = 'Creator/Author'; ! $lang['Filecreatorinfo'] = 'This is the name of whoever created the file.'; ! $lang['Fileversion'] = 'File Version'; ! $lang['Fileversioninfo'] = 'This is the version of the file, such as 3.0 or 1.3 Beta'; ! $lang['Filess'] = 'Screenshot URL'; ! $lang['Filessinfo'] = 'This is a URL to a screenshot of the file. For example, if you are adding a Winamp skin, this would be a URL to a screenshot of Winamp with this skin. You can manually enter a URL or you can leave it blank and upload a screen shot using "Browse" above.'; ! $lang['Filess_upload'] = 'Upload Screenshot'; ! $lang['Filessinfo_upload'] = 'You can upload a screenshot by clicking on "Browse"'; ! $lang['Filess_link'] = 'Screenshot as a Link'; ! $lang['Filess_link_info'] = 'If you want to show the screenshot as a link, choose "yes".'; ! $lang['Filedocs'] = 'Documentation/Manual URL'; ! $lang['Filedocsinfo'] = 'This is a URL to the documentation or a manual for the file'; ! $lang['Fileurl'] = 'File URL'; ! $lang['Fileurlinfo'] = 'This is a URL to the file that will be downloaded. You can type it in manually or you can click on "Browse" above and upload a file.'; ! $lang['File_upload'] = 'File Upload'; ! $lang['Fileinfo_upload'] = 'You can upload a file by clicking on "Browse"'; ! $lang['Uploaded_file'] = 'Uploaded file'; ! $lang['Filepi'] = 'Post Icon'; ! $lang['Filepiinfo'] = 'You can choose a post icon for the file. The post icon will be shown next to the file in the list of files.'; ! $lang['Filecat'] = 'Category'; ! $lang['Filecatinfo'] = 'This is the category the file belongs in.'; ! $lang['Filelicense'] = 'License'; ! $lang['Filelicenseinfo'] = 'This is the license agreement the user must agree to before downloading the file.'; ! $lang['Filepin'] = 'Pin File'; ! $lang['Filepininfo'] = 'Choose if you want the file pinned or not. Pinned files will always be shown at the top of the file list.'; ! $lang['Fileadded'] = 'The new file has been successfully added'; ! $lang['Filedeleted'] = 'The file has been successfully deleted'; ! $lang['Fileedited'] = 'The file you selected has been successfully edited'; ! $lang['Fderror'] = 'You didn\'t select any files to delete'; ! $lang['Filesdeleted'] = 'The files you selected have been successfully deleted'; ! $lang['Filetoobig'] = 'That file is too big!'; ! $lang['Approved'] = 'Approved'; ! $lang['Not_approved'] = '(Not Approved)'; ! $lang['Approved_info'] = 'Use this option to make the file available for users, and also to approve a file that has been uploaded by the users.'; ! ! $lang['Filedls'] = 'Download Total'; ! $lang['Addtional_field'] = 'Additional Field'; ! $lang['File_not_found'] = 'The file you specified cannot be found'; ! $lang['SS_not_found'] = 'The screenshot you specified cannot be found'; ! ! // ! // MCP ! // ! $lang['MCP_title'] = 'Moderator Control Panel'; ! $lang['MCP_title_explain'] = 'Here moderators can approve and manage files'; ! ! $lang['View'] = 'View'; ! ! $lang['Approve_selected'] = 'Approve Selected'; ! $lang['Unapprove_selected'] = 'Unapprove Selected'; ! $lang['Delete_selected'] = 'Delete Selected'; ! $lang['No_item'] = 'There is no files'; ! ! $lang['All_items'] = 'All Files'; ! $lang['Approved_items'] = 'Approved Files'; ! $lang['Unapproved_items'] = 'Unapproved Files'; ! $lang['Broken_items'] = 'Broken Files'; ! $lang['Item_cat'] = 'File in Category'; ! $lang['Approve'] = 'Approve'; ! $lang['Unapprove'] = 'Unapprove'; ! ! $lang['Sorry_auth_delete'] = 'Sorry, but you cannot delete files in this category.'; ! $lang['Sorry_auth_mcp'] = 'Sorry, but you cannot moderate this category.'; ! $lang['Sorry_auth_approve'] = 'Sorry, but you cannot approve files in this category.'; ! ! // ! // User Upload ! // $lang['User_upload'] = 'User Upload'; + // // License + // $lang['License'] = 'License Agreement'; $lang['Licensewarn'] = 'You must agree to this license agreement to download'; *************** *** 112,116 **** --- 192,198 ---- $lang['Dontagree'] = 'I Dont Agree'; + // // Search + // $lang['Search'] = 'Search'; $lang['Search_for'] = 'Search for'; *************** *** 123,138 **** $lang['Submiter'] = 'Submited by'; // Statistics $lang['Statistics'] = 'Statistics'; ! $lang['Stats_text'] = "There are {total_files} files in {total_categories} categories<br>"; ! $lang['Stats_text'] .= "There have been {total_downloads} total downloads<br><br>"; ! $lang['Stats_text'] .= "The newest file is <a href={u_newest_file}>{newest_file}</a><br>"; ! $lang['Stats_text'] .= "The oldest file is <a href={u_oldest_file}>{oldest_file}</a><br><br>"; ! $lang['Stats_text'] .= "The average file rating is {average}/10<br>"; ! $lang['Stats_text'] .= "The most popular file based on ratings is <a href={u_popular}>{popular}</a> with a rating of {most}/10<br>"; ! $lang['Stats_text'] .= "The least popular file based on ratings is <a href={u_lpopular}>{lpopular}</a> with a rating of {least}/10<br><br>"; ! $lang['Stats_text'] .= "The average amount of downloads each file has is {avg_dls}<br>"; ! $lang['Stats_text'] .= "The most popular file based on downloads is <a href={u_most_dl}>{most_dl}</a> with {most_no} downloads<br>"; ! $lang['Stats_text'] .= "The least popular file based on downloads is <a href={u_least_dl}>{least_dl}</a> with {least_no} downloads<br>"; $lang['Select_chart_type'] = 'Select Chart Type'; $lang['Bars'] = 'Bars'; --- 205,222 ---- $lang['Submiter'] = 'Submited by'; + // // Statistics + // $lang['Statistics'] = 'Statistics'; ! $lang['Stats_text'] = 'There are {total_files} files in {total_categories} categories<br>'; ! $lang['Stats_text'] .= 'There have been {total_downloads} total downloads<br><br>'; ! $lang['Stats_text'] .= 'The newest file is <a href={u_newest_file}>{newest_file}</a><br>'; ! $lang['Stats_text'] .= 'The oldest file is <a href={u_oldest_file}>{oldest_file}</a><br><br>'; ! $lang['Stats_text'] .= 'The average file rating is {average}/10<br>'; ! $lang['Stats_text'] .= 'The most popular file based on ratings is <a href={u_popular}>{popular}</a> with a rating of {most}/10<br>'; ! $lang['Stats_text'] .= 'The least popular file based on ratings is <a href={u_lpopular}>{lpopular}</a> with a rating of {least}/10<br><br>'; ! $lang['Stats_text'] .= 'The average amount of downloads each file has is {avg_dls}<br>'; ! $lang['Stats_text'] .= 'The most popular file based on downloads is <a href={u_most_dl}>{most_dl}</a> with {most_no} downloads<br>'; ! $lang['Stats_text'] .= 'The least popular file based on downloads is <a href={u_least_dl}>{least_dl}</a> with {least_no} downloads<br>'; $lang['Select_chart_type'] = 'Select Chart Type'; $lang['Bars'] = 'Bars'; *************** *** 146,151 **** --- 230,238 ---- $lang['Y_label'] = 'Number of Files'; + // // Rate + // $lang['Rate'] = 'Rate File'; + $lang['Do_rate'] = '[Rate File]'; $lang['Rerror'] = 'Sorry, you have already rated this file.'; $lang['Rateinfo'] = 'You are about to rate the file <i>{filename}</i>.<br>Please select a rating below. 1 is the worst, 10 is the best.'; *************** *** 163,167 **** --- 250,256 ---- $lang['Not_rated'] = 'Not Rated'; + // // Email + // $lang['Emailfile'] = 'E-mail File to a Friend'; $lang['Emailinfo'] = 'If you would like a friend to know about this file, you can fill out and submit this form and an e-mail containing the files information will be e-mailed to your friend!<br>Items marked with a * are required unless stated otherwise'; *************** *** 176,180 **** --- 265,271 ---- $lang['Econf'] = 'Your e-mail has been sent successfully.'; + // // Comments + // $lang['Comments'] = 'Comments'; $lang['Comments_title'] = 'Comments Title'; *************** *** 187,191 **** $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 is <u>ON</u>'; $lang['Links_are_OFF'] = 'Links is <u>OFF</u>'; --- 278,282 ---- $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 is <u>ON</u>'; $lang['Links_are_OFF'] = 'Links is <u>OFF</u>'; *************** *** 201,208 **** --- 292,303 ---- + // // Download + // $lang['Directly_linked'] = 'You can not download this file directly from another site!'; + // //Permission + // $lang['Sorry_auth_view'] = 'Sorry, but only %s can view files and sub category in this category.'; $lang['Sorry_auth_file_view'] = 'Sorry, but only %s can view this file in this category.'; *************** *** 215,241 **** $lang['Sorry_auth_delete_comments'] = 'Sorry, but only %s can delete comments in this category.'; $lang['Sorry_auth_edit'] = 'Sorry, but you cannot edit files in this category.'; - $lang['Sorry_auth_delete'] = 'Sorry, but you cannot delete files in this category.'; - $lang['Sorry_auth_mcp'] = 'Sorry, but you cannot moderate this category.'; - $lang['Sorry_auth_approve'] = 'Sorry, but you cannot approve files in this category.'; - - - - // General - $lang['Category'] = 'Category'; - $lang['Error_no_download'] = 'The selected File does not exist anymore'; - $lang['Options'] = 'Options'; - $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; - $lang['Click_here'] = 'Click Here'; - $lang['never'] = 'None'; - $lang['pafiledb_disable'] = 'Download Database is disabled'; - $lang['jump'] = 'Select a category'; - $lang['viewall_disabled'] = 'This feature is disabled by the admin.'; - $lang['New_file'] = 'New file'; - $lang['No_new_file'] = 'No new file'; - $lang['None'] = 'None'; - $lang['No_file'] = 'No Files'; - $lang['View_latest_file'] = 'View Latest File'; // New $lang['Deletefile'] = 'Delete file'; $lang['Editfile'] = 'Edit file'; --- 310,317 ---- $lang['Sorry_auth_delete_comments'] = 'Sorry, but only %s can delete comments in this category.'; $lang['Sorry_auth_edit'] = 'Sorry, but you cannot edit files in this category.'; + // // New + // $lang['Deletefile'] = 'Delete file'; $lang['Editfile'] = 'Edit file'; *************** *** 249,258 **** $lang['Quickdl_explain'] = 'This is the default pafiledb category to display, if no mapping is activated'; ! $lang['Pa_updated_return_settings'] = "Pa quickdl configuration updated successfully.<br /><br />Click %shere%s to return to main page."; // %s's for URI params - DO NOT REMOVE ! $lang['Pa_update_error'] = "Couldn't update Pa quickdl 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 />"; ! $lang['Pa_settings'] = "Pa mapping settings"; ! $lang['Pa_settings_short_explain'] = "Settings for mapping pa cats and dynamic blocks."; ! $lang['Pa_settings_explain'] = "Here you can edit the configuration for the pa module. This panel lets you associate pa cats and dynamic blocks for the quickdl block."; // --- 325,334 ---- $lang['Quickdl_explain'] = 'This is the default pafiledb category to display, if no mapping is activated'; ! $lang['Pa_updated_return_settings'] = 'Pa quickdl configuration updated successfully.<br /><br />Click %shere%s to return to main page.'; // %s's for URI params - DO NOT REMOVE ! $lang['Pa_update_error'] = 'Couldn\'t update Pa quickdl 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 />'; ! $lang['Pa_settings'] = 'Pa mapping settings'; ! $lang['Pa_settings_short_explain'] = 'Settings for mapping pa cats and dynamic blocks.'; ! $lang['Pa_settings_explain'] = 'Here you can edit the configuration for the pa module. This panel lets you associate pa cats and dynamic blocks for the quickdl block.'; // *************** *** 298,300 **** --- 374,415 ---- $lang['PA_Rules_moderate_can'] = 'You <b>can</b> moderate this category'; // %s replaced by a href links, do not remove! + // + // Toplist + // + $lang['Toplist'] = 'Toplist'; + $lang['Select_list'] = 'Select the type of list to show'; + $lang['Latest_downloads'] = 'The Newest Files'; + $lang['Most_downloads'] = 'Most Popular Files'; + $lang['Rated_downloads'] = 'Top Rated Files'; + + $lang['Total_new_files'] = 'Total New Downloads'; + $lang['Show'] = 'Show'; + $lang['One_week'] = 'One Week'; + $lang['Two_week'] = 'Two Week'; + $lang['30_days'] = '30 Days'; + $lang['New_Files'] = 'Total new files for last %d days'; + $lang['Last_week'] ='Last Week'; + $lang['Last_30_days'] = 'Last 30 Days'; + $lang['Show_top'] = 'Show Top'; + $lang['Or_top'] = 'or Top'; + $lang['Popular_num'] = 'Top %d out of %d files in the database'; + $lang['Popular_per'] = 'Top %d %% of all %d files in the database'; + $lang['General_Info'] = 'General Information'; + $lang['Downloads_stats'] = 'User\'s Downloads Stats'; + $lang['Rating_stats'] = 'User\'s Rating Stats'; + $lang['Os'] = 'Operating System'; + $lang['Browsers'] = 'Browsers'; + + // + // Toplists mx blocks + // + $lang['Recent_Public_Files'] = 'Latest dls'; + $lang['Random_Public_Files'] = 'Random dls'; + $lang['Toprated_Public_Files'] = 'Toprated dls'; + $lang['Most_Public_Files'] = 'Most downloaded'; + + $lang['File_Title'] = 'Title'; + $lang['File_Desc'] = 'Description'; + $lang['Rating'] = 'Rating'; + $lang['Dls'] = 'Downloaded'; ?> \ No newline at end of file Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_admin.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** lang_admin.php 5 Jul 2006 22:50:22 -0000 1.11 --- lang_admin.php 1 Aug 2006 21:03:24 -0000 1.12 *************** *** 1,21 **** <?php - /** ------------------------------------------------------------------------ - * Subject : mxBB - a fully modular portal and CMS (for phpBB) - * Author : Jon Ohlsson and the mxBB Team - * Credits : The phpBB Group & Marc Morisette, Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena - * Copyright : (C) 2002-2005 mxBB Portal - * Email : jo...@mx... - * Project site : www.mxbb-portal.com - * ------------------------------------------------------------------------- - * - * $Id$ - */ - /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ // --- 1,11 ---- <?php /** ! * ! * @package mxBB Portal Module - mx_pafiledb ! * @version $Id$ ! * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * ! */ // *************** *** 34,51 **** // Parameter Types // ! $lang['ParType_pa_mapping'] = "pafileDB category mapping"; ! $lang['ParType_pa_mapping_info'] = ""; ! $lang['ParType_pa_quick_cat'] = "pafileDB default category"; ! $lang['ParType_pa_quick_cat_info'] = ""; // // Parameter Names // ! $lang['pa_mapping'] = "pafileDB category mapping"; ! $lang['pa_mapping_explain'] = "pafileDB categories and portal dynamic blocks mapping"; ! $lang['pa_quick_cat'] = "pafileDB default category"; ! $lang['pa_quick_cat_explain'] = "This category is used if no matching mapping is found"; // --- 24,41 ---- // Parameter Types // ! $lang['ParType_pa_mapping'] = 'pafileDB category mapping'; ! $lang['ParType_pa_mapping_info'] = ''; ! $lang['ParType_pa_quick_cat'] = 'pafileDB default category'; ! $lang['ParType_pa_quick_cat_info'] = ''; // // Parameter Names // ! $lang['pa_mapping'] = 'pafileDB category mapping'; ! $lang['pa_mapping_explain'] = 'pafileDB categories and portal dynamic blocks mapping'; ! $lang['pa_quick_cat'] = 'pafileDB default category'; ! $lang['pa_quick_cat_explain'] = 'This category is used if no matching mapping is found'; // *************** *** 119,123 **** $lang['Showvainfo'] = 'Choose whether or not you wish to have the \'View All Files\' category displayed with the other categories on the main page'; ! $lang['cat_col'] = 'How many column of categories are to be listed'; $lang['Nfdays'] = 'New File Days'; --- 109,116 ---- $lang['Showvainfo'] = 'Choose whether or not you wish to have the \'View All Files\' category displayed with the other categories on the main page'; ! $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 File Days'; *************** *** 219,222 **** --- 212,216 ---- $lang['Notify_explain'] = 'Choose which way to receive notices that new files have been uploaded'; $lang['PM'] = 'PM'; + $lang['Notify_group'] = 'and groupmembers '; $lang['Notify_group_explain'] = 'Also send notification to members in this group'; *************** *** 242,259 **** $lang['Settings_changed'] = 'Your settings have been successfully updated'; - /* - $lang['Sitename'] = 'Site Name'; - $lang['Sitenameinfo'] = 'This is the name of your site for the navigation menu, such as \'Home\''; - $lang['Dburl'] = 'Database URL'; - $lang['Dburlinfo'] = 'This is the URL to the directory where this is installed'; - $lang['Hpurl'] = 'Homepage URL'; - $lang['Hpurlinfo'] = 'This is the URL to your portal or home page'; - $lang['Dbdl'] = 'Disable Downloads'; - $lang['Dbdlinfo'] = 'This will make the download section unavailable to users. This is a good option to use when making modifications to your database. Only Admins will be able to view the database'; - $lang['Isdisabled'] = 'The download section is currently unavailable, please try again later.'; - $lang['File_per_page'] = 'Number of file per Page'; - $lang['File_per_page_info'] = 'Here you can set the number of file per page, if you leave it empty the number of per page will be 20.'; - */ - // // Admin Panels - Categories --- 236,239 ---- *************** *** 264,279 **** $lang['Use_default'] = 'Use default setting'; - $lang['All_files'] = 'All Files'; - $lang['Approved_files'] = 'Unapproved Files'; - $lang['Broken_files'] = 'Broken Files'; - $lang['File_cat'] = 'File in Category'; $lang['Maintenance'] = 'File Maintenance'; - $lang['Approve'] = 'Approve'; - $lang['Unapprove'] = 'Unapprove'; - $lang['File_mode'] = 'View'; - $lang['Approve_selected'] = 'Approve Selected'; - $lang['Unapprove_selected'] = 'Unapprove Selected'; - $lang['Delete_selected'] = 'Delete Selected'; - $lang['No_file'] = 'There is no files'; $lang['Acat'] = 'Category: Add'; $lang['Ecat'] = 'Category: Edit'; --- 244,248 ---- *************** *** 299,303 **** $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 file'; ! $lang['Allow_file_info'] = 'If you not allow adding file 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'; --- 268,272 ---- $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 file'; ! $lang['Allow_file_info'] = 'If you are not allowed to add files in this category it will be a higher level category.'; $lang['None'] = 'None'; $lang['Catedited'] = 'The category you selected has been successfully edited'; *************** *** 310,313 **** --- 279,296 ---- // + // Admin Panels - File Maintanance + // + $lang['Fchecker'] = 'File: Maintenance'; + $lang['File_checker'] = 'File Maintenance'; + $lang['File_checker_explain'] = 'Here you can perform a checking for all file in database and the file in the download directory.'; + $lang['File_saftey'] = 'File maintenance will attempt to delete all files and screenshots that are currently not needed and will remove any file records where the file has been deleted and will clear all screenshots that are not found.<br /><br />If the files do not start with <FONT COLOR="#FF0000">{html_path}</FONT> then the files will be skipped for security reasons.<br /><br />Please make sure that <FONT COLOR="#FF0000">{html_path}</FONT> is the path that you use for your files.<br /><br />.'; + + $lang['File_checker_perform'] = 'Perform Checking'; + $lang['Checker_saved'] = 'Total Saved Space'; + $lang['Checker_sp1'] = 'Checking for records with missing files...'; + $lang['Checker_sp2'] = 'Checking for records with missing screenshots...'; + $lang['Checker_sp3'] = 'Deleting unused Files...'; + + // // Admin Panels - Permissions // *************** *** 318,327 **** $lang['Edit_file'] = 'Edit File'; $lang['Upload'] = 'Upload File'; ! $lang['Approval'] = 'Approval Level'; $lang['Download_file'] = 'Download File'; $lang['Rate'] = 'Rate'; $lang['View_comment'] = 'View Comments'; $lang['Post_comment'] = 'Post Comments'; ! $lang['Edit_comment'] = 'Edit Comments (n/a)'; $lang['Delete_comment'] = 'Delete Comments'; $lang['Category_auth_updated'] = 'Category permissions updated'; --- 301,311 ---- $lang['Edit_file'] = 'Edit File'; $lang['Upload'] = 'Upload File'; ! $lang['Approval'] = 'Approval'; ! $lang['Approval_edit'] = 'Approval Edit'; $lang['Download_file'] = 'Download File'; $lang['Rate'] = 'Rate'; $lang['View_comment'] = 'View Comments'; $lang['Post_comment'] = 'Post Comments'; ! $lang['Edit_comment'] = 'Edit Comments'; $lang['Delete_comment'] = 'Delete Comments'; $lang['Category_auth_updated'] = 'Category permissions updated'; *************** *** 333,336 **** --- 317,321 ---- $lang['Category'] = 'Category'; + $lang['Category_NONE'] = 'NONE'; $lang['Category_ALL'] = 'ALL'; $lang['Category_REG'] = 'REG'; *************** *** 340,362 **** // - // Admin Panels - Votes - // - /* - $lang['Votes_check_ip'] = 'Validate ratings - IP'; - $lang['Votes_check_ip_explain'] = 'Only one vote per IP address is permitted.'; - - $lang['Votes_check_userid'] = 'Validate ratings - User'; - $lang['Votes_check_userid_explain'] = 'Users may only vote once.'; - - $lang['Comment_info'] = 'Comments settings'; - $lang['Rating_info'] = 'Ratings settings'; - - $lang['Use_comments'] = 'Comments'; - $lang['Use_comments_explain'] = 'Enable comments for articles, to be inserted in the forum'; - $lang['Use_ratings'] = 'Ratings'; - $lang['Use_ratings_explain'] = 'Enable ratings for articles'; - */ - - // // Admin Panels - Custom Fields // --- 325,328 ---- *************** *** 386,467 **** // - // Admin Panels - File - // - $lang['File_manage_title'] = 'File Management'; - - $lang['Afile'] = 'File: Add'; - $lang['Efile'] = 'File: Edit'; - $lang['Dfile'] = 'File: Delete'; - $lang['Afiletitle'] = 'Add File'; - $lang['Efiletitle'] = 'Edit File'; - $lang['Dfiletitle'] = 'Delete File'; - $lang['Fileexplain'] = 'You can use the file management section to add, edit, and delete files.'; - $lang['Upload'] = 'Upload File'; - $lang['Uploadinfo'] = 'Upload this file'; - $lang['Uploaderror'] = 'This file already exists. Please rename the file and try again.'; - $lang['Uploaddone'] = 'This file has been successfully uploaded. The URL to the file is'; - $lang['Uploaddone2'] = 'Click Here to place this URL in the Download URL field.'; - $lang['Upload_do_done'] = 'Uploaded Sucessfully'; - $lang['Upload_do_not'] = 'Not Uploaded'; - $lang['Upload_do_exist'] = 'File Exist'; - $lang['Filename'] = 'File Name'; - $lang['Filenameinfo'] = 'This is the name of the file you are adding, such as \'My Picture.\''; - $lang['Filesd'] = 'Short Description'; - $lang['Filesdinfo'] = 'This is a short description of the file. This will go on the page that lists all the files in a category, so this description should be short'; - $lang['Fileld'] = 'Long Description'; - $lang['Fileldinfo'] = 'This is a longer description of the file. This will go on the file\'s information page so this description can be longer'; - $lang['Filecreator'] = 'Creator/Author'; - $lang['Filecreatorinfo'] = 'This is the name of whoever created the file.'; - $lang['Fileversion'] = 'File Version'; - $lang['Fileversioninfo'] = 'This is the version of the file, such as 3.0 or 1.3 Beta'; - $lang['Filess'] = 'Screenshot URL'; - $lang['Filessinfo'] = 'This is a URL to a screenshot of the file. For example, if you are adding a Winamp skin, this would be a URL to a screenshot of Winamp with this skin. You can manually enter a URL or you can leave it blank and upload a screen shot using "Browse" above.'; - $lang['Filess_upload'] = 'Upload Screenshot'; - $lang['Filessinfo_upload'] = 'You can upload a screenshot by clicking on "Browse"'; - $lang['Filess_link'] = 'Screenshot as a Link'; - $lang['Filess_link_info'] = 'If you want to show the screenshot as a link, choose "yes".'; - $lang['Filedocs'] = 'Documentation/Manual URL'; - $lang['Filedocsinfo'] = 'This is a URL to the documentation or a manual for the file'; - $lang['Fileurl'] = 'File URL'; - $lang['Fileurlinfo'] = 'This is a URL to the file that will be downloaded. You can type it in manually or you can click on "Browse" above and upload a file.'; - $lang['File_upload'] = 'File Upload'; - $lang['Fileinfo_upload'] = 'You can upload a file by clicking on "Browse"'; - $lang['Uploaded_file'] = 'Uploaded file'; - $lang['Filepi'] = 'Post Icon'; - $lang['Filepiinfo'] = 'You can choose a post icon for the file. The post icon will be shown next to the file in the list of files.'; - $lang['Filecat'] = 'Category'; - $lang['Filecatinfo'] = 'This is the category the file belongs in.'; - $lang['Filelicense'] = 'License'; - $lang['Filelicenseinfo'] = 'This is the license agreement the user must agree to before downloading the file.'; - $lang['Filepin'] = 'Pin File'; - $lang['Filepininfo'] = 'Choose if you want the file pinned or not. Pinned files will always be shown at the top of the file list.'; - $lang['Fileadded'] = 'The new file has been successfully added'; - $lang['Filedeleted'] = 'The file has been successfully deleted'; - $lang['Fileedited'] = 'The file you selected has been successfully edited'; - $lang['Fderror'] = 'You didn\'t select any files to delete'; - $lang['Filesdeleted'] = 'The files you selected have been successfully deleted'; - $lang['Filetoobig'] = 'That file is too big!'; - $lang['Approved'] = 'Approved'; - $lang['Not_approved'] = '(Not Approved)'; - $lang['Approved_info'] = 'Use this option to make the file available for users, and also to approve a file that has been uploaded by the users.'; - $lang['Fchecker'] = 'File: Maintenance'; - $lang['File_checker'] = 'File Maintenance'; - $lang['File_checker_explain'] = 'Here you can perform a checking for all file in database and the file in the download directory.'; - $lang['File_saftey'] = 'File maintenance will attempt to delete all files and screenshots that are currently not needed and will remove any file records where the file has been deleted and will clear all screenshots that are not found.<br /><br />If the files do not start with <FONT COLOR="#FF0000">{html_path}</FONT> then the files will be skipped for security reasons.<br /><br />Please make sure that <FONT COLOR="#FF0000">{html_path}</FONT> is the path that you use for your files.<br /><br />.'; - // <a href="' . append_sid($phpbb_root_path . "admin/admin_db_utilities.php?perform=backup") . '" class="genmed">Backup your database</a> - $lang['File_checker_perform'] = 'Perform Checking'; - $lang['Checker_saved'] = 'Total Saved Space'; - $lang['Checker_sp1'] = 'Checking for records with missing files...'; - $lang['Checker_sp2'] = 'Checking for records with missing screenshots...'; - $lang['Checker_sp3'] = 'Deleting unused Files...'; - $lang['Filedls'] = 'Download Total'; - $lang['Addtional_field'] = 'Additional Field'; - $lang['File_not_found'] = 'The file you specified cannot be found'; - $lang['SS_not_found'] = 'The screenshot you specified cannot be found'; - - - // // Admin Panels - License // $lang['Alicense'] = 'License: Add'; $lang['Elicense'] = 'License: Edit'; --- 352,358 ---- // // Admin Panels - License // + $lang['License_title'] = 'License'; $lang['Alicense'] = 'License: Add'; $lang['Elicense'] = 'License: Edit'; *************** *** 477,481 **** $lang['Lderror'] = 'You did not select any licenses to delete'; $lang['Ldeleted'] = 'The license agreements you selected have been successfully deleted'; - $lang['License_title'] = 'License'; $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; --- 368,371 ---- *************** *** 511,517 **** $lang['Allow_ratings_info'] = 'Enable/disable ratings in this category.'; - $lang['MCP_title'] = 'Moderator Control Panel'; - $lang['MCP_title_explain'] = 'Here moderators can approve and manage files'; - $lang['Fileadded_not_validated'] = 'The new file has been successfully added, but a moderator (admin) need to validate the file before approval.'; --- 401,404 ---- *************** *** 519,538 **** // Admin Panels - Toplists // ! $lang['display_most_posts'] = "Most visited/viewed/downloaded<br />"; ! $lang['display_random_posts'] = "Random<br />"; ! $lang['display_top_ranked'] = "Top-rated<br />"; ! $lang['display_latest_posts'] = "Latest<br />"; ! $lang['num_of_cols'] = "Number of columns<br />"; ! $lang['num_of_rows'] = "Number of rows<br />"; ! $lang['target_block'] = "Associated (target) pafileDB Block"; // // Quickdl // ! $lang['Panel_title'] = "pafileDB Mapping"; ! $lang['Panel_title_explain'] = "Here you can associate portal dynamic blocks and pafileDB categories. The quickdl block will show the pafiledb category when the dynamic block is active."; ! ! $lang['Map_pafiledb'] = "Select a pafileDB category..."; ! $lang['Map_mxbb'] = "...to be mapped to this dynamic portal block"; ?> \ No newline at end of file --- 406,424 ---- // Admin Panels - Toplists // ! $lang['display_most_posts'] = 'Most visited/viewed/downloaded<br />'; ! $lang['display_random_posts'] = 'Random<br />'; ! $lang['display_top_ranked'] = 'Top-rated<br />'; ! $lang['display_latest_posts'] = 'Latest<br />'; ! $lang['num_of_cols'] = 'Number of columns<br />'; ! $lang['num_of_rows'] = 'Number of rows<br />'; ! $lang['target_block'] = 'Associated (target) pafileDB Block'; // // Quickdl // ! $lang['Panel_title'] = 'pafileDB Mapping'; ! $lang['Panel_title_explain'] = 'Here you can associate portal dynamic blocks and pafileDB categories. The quickdl block will show the pafiledb category when the dynamic block is active.'; + $lang['Map_pafiledb'] = 'Select a pafileDB category...'; + $lang['Map_mxbb'] = '...to be mapped to this dynamic portal block'; ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:29
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_category.php pa_download.php pa_email.php pa_file.php pa_license.php pa_main.php pa_mcp.php pa_post_comment.php pa_quickdl.php pa_rate.php pa_search.php pa_toplist.php pa_user_upload.php pa_viewall.php Log Message: massive update Index: pa_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_viewall.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pa_viewall.php 5 Jul 2006 22:50:22 -0000 1.16 --- pa_viewall.php 1 Aug 2006 21:03:25 -0000 1.17 *************** *** 103,107 **** )); ! $this->display_files( $sort_method, $sort_order, $start, true ); // =================================================== --- 103,107 ---- )); ! $this->display_items( $sort_method, $sort_order, $start, true ); // =================================================== Index: pa_download.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_download.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pa_download.php 5 Jul 2006 22:50:22 -0000 1.17 --- pa_download.php 1 Aug 2006 21:03:24 -0000 1.18 *************** *** 62,66 **** // Check if the user is authorized to download the file // ========================================================================= ! if ( ( !$this->auth[$file_data['file_catid']]['auth_download'] ) ) { if ( !$userdata['session_logged_in'] ) --- 62,66 ---- // Check if the user is authorized to download the file // ========================================================================= ! if ( ( !$this->auth_user[$file_data['file_catid']]['auth_download'] ) ) { if ( !$userdata['session_logged_in'] ) *************** *** 69,73 **** } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth[$file_data['file_catid']]['auth_download_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 69,73 ---- } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth_user[$file_data['file_catid']]['auth_download_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: pa_post_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_post_comment.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pa_post_comment.php 5 Jul 2006 22:50:22 -0000 1.19 --- pa_post_comment.php 1 Aug 2006 21:03:24 -0000 1.20 *************** *** 66,70 **** $db->sql_freeresult( $result ); ! if ( ( !$this->auth[$file_data['file_catid']]['auth_post_comment'] ) ) { if ( !$userdata['session_logged_in'] ) --- 66,70 ---- $db->sql_freeresult( $result ); ! if ( ( !$this->auth_user[$file_data['file_catid']]['auth_post_comment'] ) ) { if ( !$userdata['session_logged_in'] ) *************** *** 73,77 **** } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth[$file_data['file_catid']]['auth_post_comment_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 73,77 ---- } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth_user[$file_data['file_catid']]['auth_post_comment_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 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 ---- *************** *** 163,167 **** $file_info = $db->sql_fetchrow( $result ); ! if ( ( $this->auth[$file_info['file_catid']]['auth_delete_comment'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth[$file_info['file_catid']]['auth_mod'] ) { if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) --- 162,166 ---- $file_info = $db->sql_fetchrow( $result ); ! if ( ( $this->auth_user[$file_info['file_catid']]['auth_delete_comment'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_info['file_catid']]['auth_mod'] ) { if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) *************** *** 189,193 **** else { ! $message = sprintf( $lang['Sorry_auth_delete'], $this->auth[$cat_id]['auth_upload_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 188,192 ---- else { ! $message = sprintf( $lang['Sorry_auth_delete'], $this->auth_user[$cat_id]['auth_upload_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 208,212 **** // Generate smilies listing for page output // ! $pafiledb_functions->pa_generate_smilies( 'inline', PAGE_POSTING ); $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; --- 207,211 ---- // Generate smilies listing for page output // ! $pafiledb_functions->generate_smilies( 'inline', PAGE_POSTING ); $html_status = ( $html_on ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pa_user_upload.php 5 Jul 2006 22:50:22 -0000 1.20 --- pa_user_upload.php 1 Aug 2006 21:03:25 -0000 1.21 *************** *** 27,114 **** function main( $action ) { ! global $_REQUEST, $_POST, $pafiledb_config, $board_config, $phpbb_root_path; global $pafiledb_template, $db, $lang, $userdata, $user_ip, $phpEx, $pafiledb_functions; ! global $mx_root_path, $module_root_path, $is_block, $phpEx; // ======================================================= ! // Get Vars // ======================================================= ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); ! ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } ! ! $custom_field = new custom_field(); ! $custom_field->init(); - $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $do = ( isset( $_REQUEST['do'] ) ) ? intval( $_REQUEST['do'] ) : ''; - $file_id = ( isset( $_REQUEST['file_id'] ) ) ? intval( $_REQUEST['file_id'] ) : 0; $mirrors = ( isset( $_POST['mirrors'] ) ) ? true : 0; ! $dropmenu = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true, true ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true ); ! if ( !empty( $cat_id ) ) { ! if ( !$this->auth[$cat_id]['auth_upload'] ) { ! if ( !$userdata['session_logged_in'] ) ! { ! // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=user_upload&cat_id=" . $cat_id), true)); ! } ! ! $message = sprintf( $lang['Sorry_auth_upload'], $this->auth[$cat_id]['auth_upload_type'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } else { if ( empty( $dropmenu ) ) { ! if ( !$userdata['session_logged_in'] ) ! { ! // mx_redirect(append_sid($mx_root_path . "login.$phpEx?redirect=".$this->this_mxurl("action=user_upload"), true)); ! } ! ! $message = sprintf( $lang['Sorry_auth_upload'], $this->auth[$cat_id]['auth_upload_type'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } ! // ======================================================= ! // MX Addon ! // ======================================================= ! if ( $do == 'delete' ) { $sql = 'SELECT * FROM ' . PA_FILES_TABLE . " ! WHERE file_id = $file_id"; if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } - $file_info = $db->sql_fetchrow( $result ); ! if ( ( $this->auth[$file_info['file_catid']]['auth_delete_file'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth[$file_info['file_catid']]['auth_mod'] ) { // // Notification // ! $this->update_add_file_notify($file_id, 'delete'); // // Comments // ! if ($this->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_info['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " --- 27,128 ---- function main( $action ) { ! global $pafiledb_config, $board_config, $phpbb_root_path; global $pafiledb_template, $db, $lang, $userdata, $user_ip, $phpEx, $pafiledb_functions; ! global $mx_root_path, $module_root_path, $is_block, $phpEx, $mx_request_vars; // ======================================================= ! // Request vars // ======================================================= ! $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, 0); ! $file_id = $mx_request_vars->request('file_id', MX_TYPE_INT, 0); $do = ( isset( $_REQUEST['do'] ) ) ? intval( $_REQUEST['do'] ) : ''; $mirrors = ( isset( $_POST['mirrors'] ) ) ? true : 0; ! // ! // Main Auth ! // if ( !empty( $cat_id ) ) { ! if ( !$this->auth_user[$cat_id]['auth_upload'] ) { ! $message = sprintf( $lang['Sorry_auth_upload'], $this->auth_user[$cat_id]['auth_upload_type'] ); } } else { + $dropmenu = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true, true, 'auth_upload' ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true, 'auth_upload' ); + if ( empty( $dropmenu ) ) { ! $message = sprintf( $lang['Sorry_auth_upload'], $this->auth_user[$cat_id]['auth_upload_type'] ); } } ! ! // ! // Not authorized? Output nice message and die. ! // ! if (!empty($message)) ! { ! mx_message_die( GENERAL_MESSAGE, $message ); ! } ! ! // ! // Load file info...if file_id is set ! // ! if ( $file_id ) { $sql = 'SELECT * FROM ' . PA_FILES_TABLE . " ! WHERE file_id = '".$file_id."'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query File data', '', __LINE__, __FILE__, $sql ); } ! $file_data = $db->sql_fetchrow( $result ); ! ! $db->sql_freeresult( $result ); ! } ! ! // ! // Further security. ! // Reset vars if no related data exist. ! // ! if ( $file_id && !$file_data['file_catid'] ) ! { ! $file_id = 0; ! } ! ! if ( $cat_id && !$this->cat_rowset[$cat_id]['cat_id'] ) ! { ! $cat_id = 0; ! } ! ! // ! // Load custom fields ! // ! $custom_field = new custom_field(); ! $custom_field->init(); ! ! // ======================================================= ! // Delete ! // ======================================================= ! if ( $do == 'delete' && $file_id ) ! { ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { // // Notification // ! $this->update_add_item_notify($file_id, 'delete'); // // Comments // ! if ($this->comments[$file_data['file_catid']]['activated'] && $pafiledb_config['del_topic']) { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) { $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " *************** *** 122,177 **** else { ! if ( $file_info['topic_id'] ) { include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); $mx_pa_comments = new pafiledb_comments(); ! $mx_pa_comments->init( $file_info, 'phpbb'); ! $mx_pa_comments->post('delete_all', $file_info['topic_id']); } } } ! $this->delete_files( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "" ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } else { ! $message = sprintf( $lang['Sorry_auth_delete'], $this->auth[$cat_id]['auth_upload_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } } // ======================================================= // IF submit then upload the file and update the sql for it // ======================================================= ! if ( isset( $_POST['submit'] ) ) { if ( !$file_id ) { ! $pa_post_mode = 'add'; ! $file_id = $this->update_add_file(); ! $custom_field->file_update_data( $file_id ); ! ! if ( $this->auth[$cat_id]['auth_approval'] || ( $this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] )) { ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); } else { ! $message = $lang['Fileadded_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); } - - $this->_pafiledb(); } else { ! $pa_post_mode = 'edit'; ! $file_id = $this->update_add_file( $file_id ); ! $custom_field->file_update_data( $file_id ); ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); ! $this->_pafiledb(); } --- 136,216 ---- else { ! if ( $file_data['topic_id'] ) { include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); $mx_pa_comments = new pafiledb_comments(); ! $mx_pa_comments->init( $file_data, 'phpbb'); ! $mx_pa_comments->post('delete_all', $file_data['topic_id']); } } } ! $this->delete_items( $file_id ); $this->_pafiledb(); ! $message = $lang['Filedeleted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $file_data['file_catid'] ) ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } else { ! $message = sprintf( $lang['Sorry_auth_delete'], $this->auth_user[$cat_id]['auth_delete_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } } + // ======================================================= // IF submit then upload the file and update the sql for it // ======================================================= ! if ( isset( $_POST['submit'] ) && $cat_id ) { if ( !$file_id ) { ! if ( $this->auth_user[$cat_id]['auth_upload'] || $this->auth_user[$cat_id]['auth_mod'] ) { ! $pa_post_mode = 'add'; ! ! $file_id = $this->update_add_item(); ! $custom_field->file_update_data( $file_id ); ! ! if ( $this->auth_user[$cat_id]['auth_approval'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); ! } ! else ! { ! $message = $lang['Fileadded_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); ! } ! ! $this->_pafiledb(); } else { ! $message = sprintf( $lang['Sorry_auth_upload'], $this->auth_user[$cat_id]['auth_upload_type'] ); } } else { ! if ( ($this->auth_user[$cat_id]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $pa_post_mode = 'edit'; ! $file_id = $this->update_add_item( $file_id ); ! $custom_field->file_update_data( $file_id ); ! if ( $this->auth_user[$cat_id]['auth_approval_edit'] || $this->auth_user[$cat_id]['auth_mod'] ) ! { ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); ! } ! else ! { ! $message = $lang['Fileedited_not_validated'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( $this->this_mxurl( "action=category&cat_id=" . $cat_id ) ) . '">', '</a>' ); ! ! } ! ! $this->_pafiledb(); ! } ! else ! { ! $message = sprintf( $lang['Sorry_auth_edit'], $this->auth_user[$cat_id]['auth_edit_type'] ); ! } } *************** *** 179,183 **** // Notification // ! $this->update_add_file_notify($file_id, $pa_post_mode); // --- 218,222 ---- // Notification // ! $this->update_add_item_notify($file_id, $pa_post_mode); // *************** *** 202,359 **** } else ! // ======================================================= ! // IF not submit then load data form ! // ======================================================= { ! if ( !$file_id ) ! { ! $file_name = ''; ! $file_desc = ''; ! $file_long_desc = ''; ! $file_author = ''; ! $file_version = ''; ! $file_website = ''; ! $file_posticons = $pafiledb_functions->post_icons(); ! $file_cat_list = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true ); ! $file_license = $pafiledb_functions->license_list(); ! $pin_checked_yes = ''; ! $pin_checked_no = ' checked'; ! $file_download = 0; ! $approved_checked_yes = ''; ! $approved_checked_no = ' checked'; ! $file_ssurl = ''; ! $ss_checked_yes = ''; ! $ss_checked_no = ' checked'; ! $file_url = ''; ! $custom_exist = $custom_field->display_edit(); ! $mode = 'ADD'; ! $l_title = $lang['Afiletitle']; ! } ! elseif ( $file_id != '' ) { ! $sql = 'SELECT * ! FROM ' . PA_FILES_TABLE . " ! WHERE file_id = $file_id"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); ! } ! $file_info = $db->sql_fetchrow( $result ); ! ! // AUTH CHECK ! if ( !( ( $this->auth[$file_info['file_catid']]['auth_edit_file'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth[$file_info['file_catid']]['auth_mod'] ) ) ! { ! $message = sprintf( $lang['Sorry_auth_edit'], $this->auth[$cat_id]['auth_upload_type'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); ! } ! ! $file_name = $file_info['file_name']; ! $file_desc = $file_info['file_desc']; ! $file_long_desc = $file_info['file_longdesc']; ! $file_author = $file_info['file_creator']; ! $file_version = $file_info['file_version']; ! $file_website = $file_info['file_docsurl']; ! $file_posticons = $pafiledb_functions->post_icons( $file_info['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $file_info['file_catid'] => 1 ), true ); ! $file_license = $pafiledb_functions->license_list( $file_info['file_license'] ); ! $pin_checked_yes = ( $file_info['file_pin'] ) ? ' checked' : ''; ! $pin_checked_no = ( !$file_info['file_pin'] ) ? ' checked' : ''; ! $file_download = intval( $file_info['file_dls'] ); ! $approved_checked_yes = ( $file_info['file_approved'] ) ? ' checked' : ''; ! $approved_checked_no = ( !$file_info['file_approved'] ) ? ' checked' : ''; ! $file_approved = ( $file_info['file_approved'] == '1' ) ? 1 : 0; ! $file_ssurl = $file_info['file_ssurl']; ! $ss_checked_yes = ( $file_info['file_sshot_link'] ) ? ' checked' : ''; ! $ss_checked_no = ( !$file_info['file_sshot_link'] ) ? ' checked' : ''; ! $file_url = $file_info['file_dlurl']; ! $file_unique_name = $file_info['unique_name']; ! $file_dir = $file_info['file_dir']; $custom_exist = $custom_field->display_edit( $file_id ); $mode = 'EDIT'; $l_title = $lang['Efiletitle']; $s_hidden_fields = '<input type="hidden" name="file_id" value="' . $file_id . '">'; } ! $s_hidden_fields .= '<input type="hidden" name="action" value="user_upload">'; ! $pafiledb_template->assign_vars( array( ! 'S_ADD_FILE_ACTION' => append_sid( $this->this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'AUTH_APPROVAL' => false, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'L_INDEX' => "<<", ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'MODE' => $mode, ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( $this->this_mxurl() ) ! )); ! $this->display( $lang['Download'], 'pa_file_add.tpl' ); ! } } } ?> \ No newline at end of file --- 241,392 ---- } else ! // ======================================================= ! // IF not submit then load data MAIN form ! // ======================================================= ! { ! if ( !$file_id ) { ! $file_name = ''; ! $file_desc = ''; ! $file_long_desc = ''; ! $file_author = ''; ! $file_version = ''; ! $file_website = ''; ! $file_posticons = $pafiledb_functions->post_icons(); ! $file_cat_list = ( !$cat_id ) ? $this->generate_jumpbox( 0, 0, '', true ) : $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true ); ! $file_license = $pafiledb_functions->license_list(); ! $pin_checked_yes = ''; ! $pin_checked_no = ' checked'; ! $file_download = 0; ! $approved_checked_yes = ''; ! $approved_checked_no = ' checked'; ! $file_ssurl = ''; ! $ss_checked_yes = ''; ! $ss_checked_no = ' checked'; ! $file_url = ''; ! $custom_exist = $custom_field->display_edit(); ! $mode = 'ADD'; ! $l_title = $lang['Afiletitle']; ! } ! else ! { ! // ! // AUTH CHECK ! // ! if ( ( $this->auth_user[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) { ! $file_name = $file_data['file_name']; ! $file_desc = $file_data['file_desc']; ! $file_long_desc = $file_data['file_longdesc']; ! $file_author = $file_data['file_creator']; ! $file_version = $file_data['file_version']; ! $file_website = $file_data['file_docsurl']; ! $file_posticons = $pafiledb_functions->post_icons( $file_data['file_posticon'] ); ! $file_cat_list = $this->generate_jumpbox( 0, 0, array( $file_data['file_catid'] => 1 ), true ); ! $file_license = $pafiledb_functions->license_list( $file_data['file_license'] ); ! $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; ! $pin_checked_no = ( !$file_data['file_pin'] ) ? ' checked' : ''; ! $file_download = intval( $file_data['file_dls'] ); ! $approved_checked_yes = ( $file_data['file_approved'] ) ? ' checked' : ''; ! $approved_checked_no = ( !$file_data['file_approved'] ) ? ' checked' : ''; ! $file_approved = ( $file_data['file_approved'] == '1' ) ? 1 : 0; ! $file_ssurl = $file_data['file_ssurl']; ! $ss_checked_yes = ( $file_data['file_sshot_link'] ) ? ' checked' : ''; ! $ss_checked_no = ( !$file_data['file_sshot_link'] ) ? ' checked' : ''; ! $file_url = $file_data['file_dlurl']; ! $file_unique_name = $file_data['unique_name']; ! $file_dir = $file_data['file_dir']; $custom_exist = $custom_field->display_edit( $file_id ); $mode = 'EDIT'; $l_title = $lang['Efiletitle']; + $s_hidden_fields = '<input type="hidden" name="file_id" value="' . $file_id . '">'; } + else + { + $message = sprintf( $lang['Sorry_auth_edit'], $this->auth_user[$cat_id]['auth_edit_type'] ); + mx_message_die( GENERAL_MESSAGE, $message ); + } + } ! $s_hidden_fields .= '<input type="hidden" name="action" value="user_upload">'; ! $pafiledb_template->assign_vars( array( ! 'S_ADD_FILE_ACTION' => append_sid( $this->this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'AUTH_APPROVAL' => false, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'MODE' => $mode, ! 'U_DOWNLOAD' => append_sid( $this->this_mxurl() ) ! )); ! $this->display( $lang['Download'], 'pa_file_add.tpl' ); } } + } ?> \ No newline at end of file Index: pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_file.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pa_file.php 5 Jul 2006 22:50:22 -0000 1.20 --- pa_file.php 1 Aug 2006 21:03:24 -0000 1.21 *************** *** 44,48 **** // ======================================================= - // file id is not set, give him/her a nice error message // ======================================================= switch ( SQL_LAYER ) --- 44,47 ---- *************** *** 90,94 **** // Pafiledb auth for viewing file // =================================================== ! if ( ( !$this->auth[$file_data['file_catid']]['auth_view_file'] ) ) { /* --- 89,93 ---- // Pafiledb auth for viewing file // =================================================== ! if ( ( !$this->auth_user[$file_data['file_catid']]['auth_view_file'] ) ) { /* *************** *** 98,102 **** } */ ! $message = sprintf( $lang['Sorry_auth_view'], $this->auth[$file_data['file_catid']]['auth_view_file_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 97,101 ---- } */ ! $message = sprintf( $lang['Sorry_auth_view'], $this->auth_user[$file_data['file_catid']]['auth_view_file_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } *************** *** 161,168 **** 'FILE_WEBSITE' => $file_website_url, ! 'AUTH_EDIT' => ( ( $this->auth[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth[$file_data['file_catid']]['auth_mod'] ) ? true : false, ! 'AUTH_DELETE' => ( ( $this->auth[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth[$file_data['file_catid']]['auth_mod'] ) ? true : false, ! 'AUTH_DOWNLOAD' => ( $this->auth[$file_data['file_catid']]['auth_download'] ) ? true : false, ! 'AUTH_EMAIL' => ( $this->auth[$file_data['file_catid']]['auth_email'] ) ? true : false, 'DELETE_IMG' => $images['pa_icon_delpost'], --- 160,167 ---- 'FILE_WEBSITE' => $file_website_url, ! 'AUTH_EDIT' => ( ( $this->auth_user[$file_data['file_catid']]['auth_edit_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) ? true : false, ! 'AUTH_DELETE' => ( ( $this->auth_user[$file_data['file_catid']]['auth_delete_file'] && $file_data['user_id'] == $userdata['user_id'] ) || $this->auth_user[$file_data['file_catid']]['auth_mod'] ) ? true : false, ! 'AUTH_DOWNLOAD' => ( $this->auth_user[$file_data['file_catid']]['auth_download'] ) ? true : false, ! 'AUTH_EMAIL' => ( $this->auth_user[$file_data['file_catid']]['auth_email'] ) ? true : false, 'DELETE_IMG' => $images['pa_icon_delpost'], *************** *** 183,187 **** )); - include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); $custom_field = new custom_field(); $custom_field->init(); --- 182,185 ---- *************** *** 193,199 **** if ( $this->ratings[$file_data['file_catid']]['activated'] ) { ! $file_rating = ( $file_data['rating'] != 0 ) ? round( $file_data['rating'], 2 ) . ' / 10' : $lang['Not_rated']; ! if ( $this->auth[$file_data['file_catid']]['auth_rate'] ) { $rate_img = $images['pa_rate']; --- 191,197 ---- if ( $this->ratings[$file_data['file_catid']]['activated'] ) { ! $file_rating = ( $file_data['rating'] != 0 ) ? round( $file_data['rating'], 2 ) . '/10' : $lang['Not_rated']; ! if ( $this->auth_user[$file_data['file_catid']]['auth_rate'] ) { $rate_img = $images['pa_rate']; *************** *** 218,222 **** // Comments // ! if ( $this->comments[$file_data['file_catid']]['activated'] && $this->auth[$file_data['file_catid']]['auth_view_comment']) { $comments_type = $this->comments[$file_data['file_catid']]['internal_comments'] ? 'internal' : 'phpbb'; --- 216,220 ---- // Comments // ! if ( $this->comments[$file_data['file_catid']]['activated'] && $this->auth_user[$file_data['file_catid']]['auth_view_comment']) { $comments_type = $this->comments[$file_data['file_catid']]['internal_comments'] ? 'internal' : 'phpbb'; Index: pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_license.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pa_license.php 5 Jul 2006 22:50:22 -0000 1.17 --- pa_license.php 1 Aug 2006 21:03:24 -0000 1.18 *************** *** 65,69 **** $db->sql_freeresult( $result ); ! if ( ( !$this->auth[$file_data['file_catid']]['auth_download'] ) ) { if ( !$userdata['session_logged_in'] ) --- 65,69 ---- $db->sql_freeresult( $result ); ! if ( ( !$this->auth_user[$file_data['file_catid']]['auth_download'] ) ) { if ( !$userdata['session_logged_in'] ) *************** *** 72,76 **** } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth[$file_data['file_catid']]['auth_download_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 72,76 ---- } ! $message = sprintf( $lang['Sorry_auth_download'], $this->auth_user[$file_data['file_catid']]['auth_download_type'] ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: pa_mcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_mcp.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_mcp.php 5 Jul 2006 22:50:22 -0000 1.14 --- pa_mcp.php 1 Aug 2006 21:03:24 -0000 1.15 *************** *** 27,76 **** function main( $action ) { ! global $pafiledb_template, $lang, $board_config, $phpEx, $pafiledb_config, $db, $images, $debug;; ! global $_REQUEST, $phpbb_root_path, $userdata, $db, $pafiledb_functions; ! global $mx_root_path, $module_root_path, $is_block, $phpEx; ! // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); ! } ! $this->init(); ! $file_id = ( isset( $_REQUEST['file_id'] ) ) ? intval( $_REQUEST['file_id'] ) : 0; ! $file_ids = ( isset( $_POST['file_ids'] ) ) ? array_map( 'intval', $_POST['file_ids'] ) : array(); ! $start = ( isset( $_REQUEST['start'] ) ) ? intval( $_REQUEST['start'] ) : 0; ! $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['approve'] ) ) ? 'do_approve' : $mode; ! $mode = ( isset( $_POST['unapprove'] ) ) ? 'do_unapprove' : $mode; ! if ( empty( $mode ) ) { ! $mode = $mode_js; ! $cat_id = ( isset( $_REQUEST['cat_js_id'] ) ) ? intval( $_REQUEST['cat_js_id'] ) : intval( $_REQUEST['cat_id'] ); } ! else { ! $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; } ! $mirrors = ( isset( $_POST['mirrors'] ) ) ? true : 0; ! // =================================================== ! // Pafiledb auth for mcp ! // =================================================== ! if ( !($this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in']) ) { ! $message = sprintf( $lang['Sorry_auth_mcp'], $this->auth[$cat_id]['auth_mod'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); } --- 27,79 ---- 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 $pafiledb_functions, $pafiledb_template, $pafiledb_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; ! //echo('mode: '.$mode.'do_mode: '.$do_mode); ! // ! // PafileDB specific ! // ! $mirrors = ( isset( $_POST['mirrors'] ) ) ? true : 0; ! // =================================================== ! // 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...' ); } *************** *** 79,95 **** switch ( $_REQUEST['sort_method'] ) { ! case 'file_name': $sort_method = 'file_name'; break; ! case 'file_time': $sort_method = 'file_time'; break; ! case 'file_dls': $sort_method = 'file_dls'; break; ! case 'file_rating': $sort_method = 'rating'; break; ! case 'file_update_time': $sort_method = 'file_update_time'; break; --- 82,98 ---- switch ( $_REQUEST['sort_method'] ) { ! case 'Alphabetic': $sort_method = 'file_name'; break; ! case 'Latest': $sort_method = 'file_time'; break; ! case 'Downloads': $sort_method = 'file_dls'; break; ! case 'Rating': $sort_method = 'rating'; break; ! case 'Updated': $sort_method = 'file_update_time'; break; *************** *** 122,357 **** } ! $s_file_actions = array( 'approved' => $lang['Approved_files'], ! 'broken' => $lang['Broken_files'], ! 'file_cat' => $lang['File_cat'], ! 'all_file' => $lang['All_files'] ); switch ( $mode ) { case '': ! case 'approved': case 'broken': ! case 'do_approve': ! case 'do_unapprove': ! // case 'delete': ! case 'file_cat': ! case 'all_file': default: ! $template_file = 'pa_mcp.tpl'; $l_title = $lang['MCP_title']; $l_explain = $lang['MCP_title_explain']; - // $s_hidden_fields = '<input type="hidden" name="mode" value="add">'; break; } ! if ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { ! if ( $this->auth[$cat_id]['auth_mod'] || $userdata['user_level'] == ADMIN ) { ! $mode_temp = $mode == 'do_approve' ? 'approved' : 'unapproved'; ! ! if ( is_array( $file_ids ) && !empty( $file_ids ) ) { ! foreach( $file_ids as $temp_file_id ) ! { ! $this->file_approve( $mode, $temp_file_id ); ! } } ! else { ! $this->file_approve( $mode, $file_id ); ! } ! $this->_pafiledb(); } else { ! $message = sprintf( $lang['Sorry_auth_approve'], $this->auth[$cat_id]['auth_mod'] ); ! mx_message_die( GENERAL_MESSAGE, $message ); } } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); ! $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( $this->this_mxurl() ), ! 'U_DOWNLOAD' => append_sid( $this->this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], 'L_MCP_TITLE' => $l_title, 'L_MCP_EXPLAIN' => $l_explain, - 'L_ADD_FILE' => $lang['Afiletitle'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( $this->this_mxurl( "action=mcp" ) ) )); ! if ( in_array( $mode, array( '', 'approved', 'broken', 'do_approve', 'do_unapprove', 'file_cat', 'all_file' ) ) ) { ! $mode = ( in_array( $mode, array( 'do_approve', 'do_unapprove' ) ) ) ? '' : $mode; ! ! if ( $mode != 'approved' && $mode != 'broken' ) { ! // $where_sql = ($mode == 'file_cat') ? "AND file_catid = '$cat_id'" : ''; ! $where_sql = "AND file_catid = '$cat_id'" ; $sql = "SELECT file_name, file_approved, file_id, file_broken FROM " . PA_FILES_TABLE . " as f1 WHERE file_approved = '1' ! $where_sql ORDER BY file_time DESC"; ! if ( $mode == '' || $mode == 'file_cat' || $mode == 'all_file' ) { ! if ( ( !$result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); ! } ! ! $total_files = $db->sql_numrows( $result ); } if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_config['pagination'], $start ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } while ( $row = $db->sql_fetchrow( $result ) ) { ! $all_file_rowset[] = $row; } } ! if ( $mode == '' || $mode == 'approved' || $mode == 'broken' || $mode == 'file_cat' || $mode == 'all_file' ) { ! if ( $mode == '' ) ! { ! $limit = 5; ! $temp_start = 0; ! } ! else ! { ! $limit = $pafiledb_config['pagination']; ! $temp_start = $start; ! } ! if ( $mode == '' || $mode == 'approved' ) { ! $sql = "SELECT file_name, file_approved, file_id, file_broken ! FROM " . PA_FILES_TABLE . " ! WHERE file_approved = '0' ! AND file_catid = '$cat_id' ! ORDER BY file_time DESC"; ! ! if ( $mode == 'approved' ) ! { ! if ( ( !$result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); ! } ! ! $total_files = $db->sql_numrows( $result ); ! } ! ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $limit, $temp_start ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } ! ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $approved_file_rowset[] = $row; } } ! if ( $mode == '' || $mode == 'broken' ) { ! $sql = "SELECT file_name, file_approved, file_id, file_broken ! FROM " . PA_FILES_TABLE . " ! WHERE file_broken = '1' ! AND file_catid = '$cat_id' ! ORDER BY file_time DESC"; ! ! if ( $mode == 'broken' ) ! { ! if ( ( !$result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); ! } ! $total_files = $db->sql_numrows( $result ); ! } ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $limit, $temp_start ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } ! ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $broken_file_rowset[] = $row; } } ! if ( $mode == '' ) ! { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Approved_files'], ! 'row_set' => $approved_file_rowset, ! 'approval' => 'approve' ), ! 1 => array( 'lang_var' => $lang['Broken_files'], ! 'row_set' => $broken_file_rowset, ! 'approval' => 'both' ), ! 2 => array( 'lang_var' => $lang['All_files'], ! 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'all_file' ) ! { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Approved_files'], ! 'row_set' => $approved_file_rowset, ! 'approval' => 'approve' ), ! 1 => array( 'lang_var' => $lang['Broken_files'], ! 'row_set' => $broken_file_rowset, ! 'approval' => 'both' ), ! 2 => array( 'lang_var' => $lang['All_files'], ! 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'file_cat' ) ! { ! $global_array = array( 0 => array( 'lang_var' => $lang['All_files'], ! 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'approved' ) ! { ! $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], ! 'row_set' => $approved_file_rowset, ! 'approval' => 'approve' ) ); ! } ! elseif ( $mode == 'broken' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], ! 'row_set' => $broken_file_rowset, ! 'approval' => 'both' ) ); } } ! $s_file_list = ''; ! foreach( $s_file_actions as $file_mode => $lang_var ) { $s = ''; ! if ( $mode == $file_mode ) { $s = ' selected="selected"'; } ! $s_file_list .= '<option value="' . $file_mode . '"' . $s . '>' . $lang_var . '</option>'; } ! $cat_list = '<select name="cat_js_id">'; if ( !$this->cat_rowset[$cat_id]['cat_parent'] ) { --- 125,474 ---- } ! $s_actions = array( ! 'unapproved' => $lang['Unapproved_items'], ! 'broken' => $lang['Broken_items'], ! 'cat' => $lang['Item_cat'], ! 'all' => $lang['All_items'] ); switch ( $mode ) { case '': ! case 'unapproved': case 'broken': ! case 'cat': ! case 'all': ! default: ! $template_item = 'pa_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->_pafiledb(); ! } ! // ! // Delete ! // ! else if ( $do_mode == 'do_delete' ) ! { ! if ( is_array( $ids ) && !empty( $ids ) ) ! { ! foreach( $ids as $temp_id ) { ! $sql = 'SELECT * ! FROM ' . PA_FILES_TABLE . " ! WHERE file_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['file_catid']]['activated'] && $pafiledb_config['del_topic']) ! { ! if ( $this->comments[$item_info['file_catid']]['internal_comments'] ) ! { ! $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " ! WHERE file_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 . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $mx_pa_comments = new pafiledb_comments(); ! $mx_pa_comments->init( $item_info, 'phpbb'); ! $mx_pa_comments->post('delete_all', $item_info['topic_id']); ! } ! } ! } ! ! $this->delete_items( $temp_id ); ! } } else { ! $sql = 'SELECT * ! FROM ' . PA_FILES_TABLE . " ! WHERE file_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['file_catid']]['activated'] && $pafiledb_config['del_topic']) ! { ! if ( $this->comments[$item_info['file_catid']]['internal_comments'] ) ! { ! $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " ! WHERE file_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 . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $mx_pa_comments = new pafiledb_comments(); ! $mx_pa_comments->init( $item_info, 'phpbb'); ! $mx_pa_comments->post('delete_all', $item_info['topic_id']); ! } ! } ! } ! ! $this->delete_items( $id ); } + + $this->_pafiledb(); } ! $pafiledb_template->set_filenames( array( 'admin' => $template_item ) ); ! if ($mode == 'cat') ! { ! //$s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; ! } $pafiledb_template->assign_vars( array( ! 'DOWNLOAD' => $pafiledb_config['module_name'], // Module specific ! 'U_DOWNLOAD' => append_sid( $this->this_mxurl() ), // Module specific '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', 'broken', 'cat', 'all' ) ) ) { ! // ! // All items (or all items in cat) ! // ! if ( $mode == 'all' || $mode == 'cat' ) { ! $where_sql = ($mode == 'cat') ? "AND file_catid = '$cat_id'" : ''; $sql = "SELECT file_name, file_approved, file_id, file_broken FROM " . PA_FILES_TABLE . " as f1 WHERE file_approved = '1' ! ".$where_sql." ! AND file_catid IN (".$moderator_cat_ids.") ORDER BY file_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 = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_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 file_name, file_approved, file_id, file_broken ! FROM " . PA_FILES_TABLE . " ! WHERE file_approved = '0' ! AND file_catid IN (".$moderator_cat_ids.") ! ORDER BY file_time DESC"; ! if ($mode == 'unapproved') { ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_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; ! } ! } ! // ! // Broken files only ! // ! if ( $mode == 'broken' || $mode == 'all' || $mode == 'cat') ! { ! $sql = "SELECT file_name, file_approved, file_id, file_broken ! FROM " . PA_FILES_TABLE . " ! WHERE file_broken = '1' ! AND file_catid IN (".$moderator_cat_ids.") ! ORDER BY file_time DESC"; ! if ($mode == 'broken') ! { ! if ( !( $result = $pafiledb_functions->sql_query_limit( $sql, $pafiledb_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 ) ) { ! $broken_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['Broken_items'], ! 'row_set' => $broken_rowset, ! 'approval' => 'both' ), ! 2 => 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['Broken_items'], ! 'row_set' => $broken_rowset, ! 'approval' => 'both' ), ! 2 => 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['Broken_items'], ! 'row_set' => $broken_rowset, ! 'approval' => 'both' ), ! 2 => 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' ) ); ! } ! elseif ( $mode == 'broken' ) ! { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Broken_items'], ! 'row_set' => $broken_rowset, ! 'approval' => 'both' ) ); ! } ! ! // ! // 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'] ) { *************** *** 362,366 **** $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true ); $cat_list .= '</select>'; --- 479,483 ---- $cat_list .= '<option value="0">' . $lang['None'] . '</option>\n'; } ! $cat_list .= $this->generate_jumpbox( 0, 0, array( $cat_id => 1 ), true, true, 'auth_mod' ); $cat_list .= '</select>'; *************** *** 371,426 **** 'L_MODE' => $lang['View'], 'L_GO' => $lang['Go'], ! 'L_DELETE_FILE' => $lang['Delete_selected'], 'L_APPROVE' => $lang['Approve'], 'L_UNAPPROVE' => $lang['Unapprove'], ! 'L_APPROVE_FILE' => $lang['Approve_selected'], ! 'L_UNAPPROVE_FILE' => $lang['Unapprove_selected'], ! 'L_NO_FILES' => $lang['No_file'], ! 'PAGINATION' => generate_pagination( append_sid( $this->this_mxur... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:29
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/templates/subSilver Modified Files: pa_category_body.tpl pa_header.tpl pa_main_body.tpl pa_mcp.tpl Log Message: massive update Index: pa_mcp.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_mcp.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pa_mcp.tpl 5 Apr 2006 21:30:45 -0000 1.4 --- pa_mcp.tpl 1 Aug 2006 21:03:25 -0000 1.5 *************** *** 1,21 **** <script language='javascript'> <!-- ! var add_file = false; ! var deletefile = false; ! ! function set_add_file(status) { ! add_file = status; } ! ! function set_delete_file(status) { ! deletefile = status; } ! ! ! function delete_file(theURL) { ! if (confirm('Are you sure you want to delete this file??')) { window.location.href=theURL; --- 1,21 ---- <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; *************** *** 24,42 **** { alert ('No Action has been taken.'); ! } } ! function disable_cat_list() { ! if(document.form.mode_js.options[document.form.mode_js.selectedIndex].value != 'file_cat') { ! document.form.cat_js_id.disabled = true; } ! if(document.form.mode_js.options[document.form.mode_js.selectedIndex].value == 'file_cat') { ! document.form.cat_js_id.disabled = false; } } ! // // Taking from the Attachment MOD of Acyd Burn --- 24,43 ---- { 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 *************** *** 44,50 **** function select(status) { ! for (i = 0; i < document.file_ids.length; i++) { ! document.file_ids.elements[i].checked = status; } } --- 45,51 ---- function select(status) { ! for (i = 0; i < document.ids.length; i++) { ! document.ids.elements[i].checked = status; } } *************** *** 52,67 **** function check() { ! if(add_file) { return true; } ! for (i = 0; i < document.file_ids.length; i++) { ! if(document.file_ids.elements[i].checked == true) { ! if(deletefile) { ! if (confirm('Are you sure you want to delete these files??')) { return true; --- 53,68 ---- 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; *************** *** 75,79 **** } } ! alert('Please Select at least one file.'); return false; } --- 76,80 ---- } } ! alert('Please Select at least one item.'); return false; } *************** *** 84,97 **** <body onLoad="disable_cat_list();"> ! <form method="post" action="{S_FILE_ACTION}" name="form"> <table width="100%" cellpadding="3" cellspacing="1"> <tr> ! <td><span class="gen">{L_MCP_EXPLAIN}</span><br /><b><span class="genmed">{L_MODE}:</span></b> <select name="mode_js" 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_FILE_ACTION}" name="file_ids" onsubmit="return check();"> <table width="100%" cellpadding="2" cellspacing="2"> <tr> --- 85,100 ---- <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> *************** *** 102,139 **** </table> ! <!-- BEGIN file_mode --> <table width="100%" cellpadding="4" cellspacing="1" class="forumline"> <tr> ! <th colspan="6" class="thHead"> {file_mode.L_FILE_MODE}</span></th> </tr> ! <!-- IF file_mode.DATA --> ! <!-- BEGIN file_row --> <tr> ! <td class="row1" align="center" width="5%"><span class="genmed">{file_mode.file_row.FILE_NUMBER}</span></td> ! <td class="row1" width="50%"><span class="genmed">{file_mode.file_row.FILE_NAME}</span></td> ! <td class="row1" align="center" width="10%"><span class="gen"><a href="{file_mode.file_row.U_FILE_EDIT}">{L_EDIT}</a></span></td> ! <td class="row1" align="center" width="10%"><span class="gen"><a href="javascript:delete_file('{file_mode.file_row.U_FILE_DELETE}')">{L_DELETE}</a></span></td> ! <td class="row1" align="center" width="20%"><span class="gen"><a href="{file_mode.file_row.U_FILE_APPROVE}">{file_mode.file_row.L_APPROVE}</a></span></td> ! <td class="row1" align="center" width="5%"><span class="genmed"><input type="checkbox" name="file_ids[]" value="{file_mode.file_row.FILE_ID}" /></span></td> </tr> ! <!-- END file_row --> <!-- ELSE --> <tr> ! <td class="row1" align="center"><span class="gen">{L_NO_FILES}</span></td> </tr> <!-- ENDIF --> </table> <br /> ! <!-- END file_mode --> ! <table width="100%" cellpadding="3" cellspacing="1" class="forumline"> ! <tr> ! <td class="cat" align="center"> ! {S_HIDDEN_FIELDS} ! <input type="submit" class="liteoption" name="approve" value="{L_APPROVE_FILE}" onClick="set_add_file(false); set_delete_file(false);" /> ! <input type="submit" class="liteoption" name="unapprove" value="{L_UNAPPROVE_FILE}" onClick="set_add_file(false); set_delete_file(false);" /> ! </td> ! </tr> ! </table> ! </form> <table width="100%" cellspacing="2" border="0" cellpadding="2"> <tr> --- 105,132 ---- </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> ! <!-- IF mcp_mode.DATA --> ! <!-- 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 --> <!-- ELSE --> <tr> ! <td class="row1" align="center"><span class="gen">{L_NO_ITEMS}</span></td> </tr> <!-- ENDIF --> </table> <br /> ! <!-- END mcp_mode --> <table width="100%" cellspacing="2" border="0" cellpadding="2"> <tr> *************** *** 144,146 **** </tr> </table> ! <!-- INCLUDE pa_footer.tpl --> \ No newline at end of file --- 137,150 ---- </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> ! <!-- INCLUDE pa_footer.tpl --> \ No newline at end of file Index: pa_main_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_main_body.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** pa_main_body.tpl 4 Jul 2006 18:02:12 -0000 1.7 --- pa_main_body.tpl 1 Aug 2006 21:03:25 -0000 1.8 *************** *** 8,12 **** </table> ! <!-- IF CAT_PARENT_ORIGINAL --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 8,12 ---- </table> ! <!-- IF CAT_NAV_STANDARD --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 38,42 **** ! <!-- IF CAT_PARENT --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 38,42 ---- ! <!-- IF CAT_NAV_SIMPLE --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 49,53 **** <tr> <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> --- 49,53 ---- <tr> <!-- BEGIN no_cat_parent --> ! <td width="{WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> Index: pa_header.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_header.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pa_header.tpl 29 May 2006 15:41:46 -0000 1.10 --- pa_header.tpl 1 Aug 2006 21:03:25 -0000 1.11 *************** *** 76,80 **** <br /> <!-- IF IS_AUTH_MCP --> ! <b> <a href="{U_MCP}" class="gensmall">{MCP_LINK}</a> </b> <!-- ENDIF --> </td> --- 76,80 ---- <br /> <!-- IF IS_AUTH_MCP --> ! <b> <a href="{U_MCP}" class="gensmall">[{MCP_LINK}]</a> </b> <!-- ENDIF --> </td> Index: pa_category_body.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/pa_category_body.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_category_body.tpl 4 Jul 2006 18:02:12 -0000 1.9 --- pa_category_body.tpl 1 Aug 2006 21:03:25 -0000 1.10 *************** *** 8,12 **** </table> ! <!-- IF CAT_PARENT_ORIGINAL --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 8,12 ---- </table> ! <!-- IF CAT_NAV_STANDARD --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 39,43 **** ! <!-- IF CAT_PARENT --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 39,43 ---- ! <!-- IF CAT_NAV_SIMPLE --> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 50,54 **** <tr> <!-- BEGIN no_cat_parent --> ! <td width="{LINK_WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> --- 50,54 ---- <tr> <!-- BEGIN no_cat_parent --> ! <td width="{WIDTH}%"> <table border="0" cellpadding="2" cellspacing="2" width="100%"> <tr> *************** *** 75,78 **** --- 75,79 ---- <!-- IF FILELIST --> <table width="100%" cellpadding="0" cellspacing="0" border="0" class="forumline"><tr><td> + <!-- IF ORIGINAL_STYLE --> <table width="100%" cellpadding="4" cellspacing="1"> <tr> *************** *** 110,113 **** --- 111,146 ---- <!-- END file_rows --> </table> + <!-- ELSE --> + <table width="100%" cellpadding="3" cellspacing="1"> + <tr> + <th class="thHead" colspan="2">{L_FILES}</th> + </tr> + <!-- BEGIN file_rows --> + <tr> + <td rowspan="2" class="{file_rows.COLOR}" valign="middle"> <img src="{file_rows.PIN_IMAGE}" border="0" ></td> + <td width="100%" class="{file_rows.COLOR}"> + <a href="{file_rows.U_FILE}" class="topictitle">{file_rows.FILE_NAME}</a> + <!-- BEGIN IS_NEW_FILE --> + <img src="{file_rows.FILE_NEW_IMAGE}" border="0" alt="{L_NEW_FILE}"> + <!-- END IS_NEW_FILE --> + <br><span class="genmed">{file_rows.FILE_DESC}</span> + </td> + </tr> + <tr> + <td valign="top" align="left" class="{file_rows.COLOR}"> + <span class="gensmall"> + {L_UPDATE_TIME}: {file_rows.DATE} • {L_DOWNLOADS}: {file_rows.FILE_DLS} • {L_SUBMITED_BY} {file_rows.POSTER} + <!-- IF SHOW_RATINGS --> + • {file_rows.L_RATING}: {file_rows.RATING} ({file_rows.FILE_VOTES} {L_VOTES}) {file_rows.DO_RATE} + <!-- ENDIF --> + <!-- IF SHOW_COMMENTS --> + • {file_rows.L_COMMENT}: {file_rows.COMMENTS} + <!-- ENDIF --> + </span> + </td> + </tr> + <!-- END file_rows --> + </table> + <!-- ENDIF --> <form action="{S_ACTION_SORT}" method="post"> |
|
From: Jon O. <jon...@us...> - 2006-08-01 21:03:29
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv23242/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_admin.php functions_auth.php functions_cache.php functions_comment.php functions_field.php functions_pafiledb.php Log Message: massive update Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** functions.php 5 Jul 2006 22:50:22 -0000 1.27 --- functions.php 1 Aug 2006 21:03:24 -0000 1.28 *************** *** 92,96 **** * @param unknown_type $page_id */ ! function pa_generate_smilies( $mode, $page_id ) { global $db, $board_config, $pafiledb_template, $lang, $images, $theme, $phpEx, $phpbb_root_path; --- 92,96 ---- * @param unknown_type $page_id */ ! function generate_smilies( $mode, $page_id ) { global $db, $board_config, $pafiledb_template, $lang, $images, $theme, $phpEx, $phpbb_root_path; *************** *** 248,252 **** function page_header( $page_title ) { ! global $pafiledb_config, $lang, $pafiledb_template, $userdata, $images, $action, $_REQUEST, $pafiledb; 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; --- 248,252 ---- function page_header( $page_title ) { ! global $pafiledb_config, $lang, $pafiledb_template, $userdata, $images, $action, $pafiledb; 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,268 **** $mcp_url = append_sid( $pafiledb->this_mxurl( "action=mcp&cat_id={$_REQUEST['cat_id']}" ) ); ! $upload_auth = $pafiledb->modules[$pafiledb->module_name]->auth[$_REQUEST['cat_id']]['auth_upload']; ! $mcp_auth = $pafiledb->modules[$pafiledb->module_name]->auth[$_REQUEST['cat_id']]['auth_mod']; } else --- 263,268 ---- $mcp_url = append_sid( $pafiledb->this_mxurl( "action=mcp&cat_id={$_REQUEST['cat_id']}" ) ); ! $upload_auth = $pafiledb->modules[$pafiledb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_upload']; ! $mcp_auth = $pafiledb->modules[$pafiledb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_mod']; } else *************** *** 285,291 **** 'IS_AUTH_UPLOAD' => $upload_auth, 'IS_ADMIN' => ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0, ! 'IS_MOD' => $pafiledb->modules[$pafiledb->module_name]->auth[$_REQUEST['cat_id']]['auth_mod'], 'IS_AUTH_MCP' => $mcp_auth, ! 'MCP_LINK' => $lang['pa_MCP'], 'U_MCP' => $mcp_url, --- 285,291 ---- 'IS_AUTH_UPLOAD' => $upload_auth, 'IS_ADMIN' => ( $userdata['user_level'] == ADMIN && $userdata['session_logged_in'] ) ? true : 0, ! 'IS_MOD' => $pafiledb->modules[$pafiledb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_mod'], 'IS_AUTH_MCP' => $mcp_auth, ! 'MCP_LINK' => $lang['MCP_title'], 'U_MCP' => $mcp_url, *************** *** 516,520 **** // if the file size is more than the allowed size another error message // ======================================================= ! if ( $userfile_size > $pafiledb_config['max_file_size'] && ( $pafiledb->modules[$pafiledb->module_name]->auth[$cat_id]['auth_mod'] || $userdata['user_level'] != ADMIN ) && $userdata['session_logged_in'] ) { $file_info['error'] = true; --- 516,520 ---- // if the file size is more than the allowed size another error message // ======================================================= ! if ( $userfile_size > $pafiledb_config['max_file_size'] && ( $pafiledb->modules[$pafiledb->module_name]->auth_user[$cat_id]['auth_mod'] || $userdata['user_level'] != ADMIN ) && $userdata['session_logged_in'] ) { $file_info['error'] = true; *************** *** 914,919 **** } - include_once( $mx_root_path . 'includes/mx_functions_tools.' . $phpEx ); - /** * mx_pa_notification. --- 914,917 ---- *************** *** 1045,1049 **** $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $pafiledb->this_mxurl("action=" . "link&link_id=" . $this->data['item_id'], false, true); } } --- 1043,1654 ---- $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! //$this->temp_url = PORTAL_URL . $pafiledb->this_mxurl("action=" . "link&link_id=" . $this->data['item_id'], false, true); ! } ! } ! ! /** ! * This is a generic class for custom fields. ! * ! * Note: This class doesn't differ from the core mx_custom_fields class, besides the templating. ! * ! */ ! class custom_field ! { ! var $field_rowset = array(); ! var $field_data_rowset = array(); ! ! var $custom_table = PA_CUSTOM_TABLE; ! var $custom_data_table = PA_CUSTOM_DATA_TABLE; ! ! /** ! * prepare data ! * ! */ ! function init() ! { ! global $db; ! ! $sql = "SELECT * ! FROM " . $this->custom_table . " ! ORDER BY field_order ASC"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $this->field_rowset[$row['custom_id']] = $row; ! } ! unset( $row ); ! $db->sql_freeresult( $result ); ! ! $sql = "SELECT * ! FROM " . $this->custom_data_table; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt Query Custom field', '', __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $this->field_data_rowset[$row['customdata_file']][$row['customdata_custom']] = $row; ! } ! ! unset( $row ); ! ! $db->sql_freeresult( $result ); ! } ! ! /** ! * check if there is a data in the database. ! * ! * @return unknown ! */ ! function field_data_exist() ! { ! if ( !empty( $this->field_data_rowset ) ) ! { ! return true; ! } ! return false; ! } ! ! /** ! * Enter description here... ! * ! * @return unknown ! */ ! function field_exist() ! { ! if ( !empty( $this->field_rowset ) ) ! { ! return true; ! } ! return false; ! } ! ! /** ! * display data in the comment. ! * ! * @param unknown_type $file_id ! * @return unknown ! */ ! function add_comment( $file_id ) ! { ! global $pafiledb_template; ! if ( $this->field_data_exist() ) ! { ! if ( isset( $this->field_data_rowset[$file_id] ) ) ! { ! $message = ''; ! foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) ! { ! if ( !empty( $data['data'] ) ) ! { ! switch ( $this->field_rowset[$field_id]['field_type'] ) ! { ! case INPUT: ! case TEXTAREA: ! case RADIO: ! case SELECT: ! $field_data = $data['data']; ! break; ! case SELECT_MULTIPLE: ! case CHECKBOX: ! $field_data = @implode( ', ', unserialize( $data['data'] ) ); ! break; ! } ! $message .= "\n" . "[b]" . $this->field_rowset[$field_id]['custom_name'] . ":[/b] " . $field_data . "\n"; ! } ! else ! { ! global $db; ! ! $sql = "DELETE FROM " . $this->custom_data_table . " ! WHERE customdata_file = '$file_id' ! AND customdata_custom = '$field_id'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! return $message; ! } ! else ! { ! return false; ! } ! } ! else ! { ! return false; ! } ! } ! ! /** ! * display data in the file page. ! * ! * @param unknown_type $file_id ! * @return unknown ! */ ! function display_data( $file_id ) ! { ! global $pafiledb_template; ! if ( $this->field_data_exist() ) ! { ! if ( isset( $this->field_data_rowset[$file_id] ) ) ! { ! foreach( $this->field_data_rowset[$file_id] as $field_id => $data ) ! { ! if ( !empty( $data['data'] ) ) ! { ! switch ( $this->field_rowset[$field_id]['field_type'] ) ! { ! case INPUT: ! case TEXTAREA: ! case RADIO: ! case SELECT: ! $field_data = $data['data']; ! break; ! case SELECT_MULTIPLE: ! case CHECKBOX: ! $field_data = @implode( ', ', unserialize( $data['data'] ) ); ! break; ! } ! ! $pafiledb_template->assign_block_vars( 'custom_field', array( ! 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); ! } ! else ! { ! global $db; ! ! $sql = "DELETE FROM " . $this->custom_data_table . " ! WHERE customdata_file = '$file_id' ! AND customdata_custom = '$field_id'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! } ! else ! { ! return false; ! } ! } ! else ! { ! return false; ! } ! } ! ! /** ! * display custom field and data in the add/edit page. ! * ! * @param unknown_type $file_id ! * @return unknown ! */ ! function display_edit( $file_id = false ) ! { ! $return = false; ! if ( $this->field_exist() ) ! { ! foreach( $this->field_rowset as $field_id => $field_data ) ! { ! switch ( $field_data['field_type'] ) ! { ! case INPUT: ! $this->display_edit_input( $file_id, $field_id, $field_data ); ! break; ! case TEXTAREA: ! $this->display_edit_textarea( $file_id, $field_id, $field_data ); ! break; ! case RADIO: ! $this->display_edit_radio( $file_id, $field_id, $field_data ); ! break; ! case SELECT: ! $this->display_edit_select( $file_id, $field_id, $field_data ); ! break; ! case SELECT_MULTIPLE: ! $this->display_edit_select_multiple( $file_id, $field_id, $field_data ); ! break; ! case CHECKBOX: ! $this->display_edit_checkbox( $file_id, $field_id, $field_data ); ! break; ! } ! ! $return = true; ! } ! } ! return $return; ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_input( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'input', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => $field_value ) ! ); ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_textarea( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'textarea', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => $field_value ) ! ); ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_radio( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'radio', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; ! $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); ! ! if ( !empty( $field_datas ) ) ! { ! foreach( $field_datas as $key => $value ) ! { ! $pafiledb_template->assign_block_vars( 'radio.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_select( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; ! $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); ! ! if ( !empty( $field_datas ) ) ! { ! foreach( $field_datas as $key => $value ) ! { ! $pafiledb_template->assign_block_vars( 'select.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_select_multiple( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select_multiple', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; ! $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); ! ! if ( !empty( $field_datas ) ) ! { ! foreach( $field_datas as $key => $value ) ! { ! $selected = ''; ! foreach( $data as $field_value ) ! { ! if ( $field_value == $value ) ! { ! $selected = ' selected="selected"'; ! break; ! } ! } ! $pafiledb_template->assign_block_vars( 'select_multiple.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $file_id ! * @param unknown_type $field_id ! * @param unknown_type $field_data ! */ ! function display_edit_checkbox( $file_id, $field_id, $field_data ) ! { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'checkbox', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; ! $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); ! ! if ( !empty( $field_datas ) ) ! { ! foreach( $field_datas as $key => $value ) ! { ! $checked = ''; ! foreach( $data as $field_value ) ! { ! if ( $field_value == $value ) ! { ! $checked = ' checked'; ! break; ! } ! } ! $pafiledb_template->assign_block_vars( 'checkbox.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $field_type ! * @param unknown_type $field_id ! */ ! function update_add_field( $field_type, $field_id = false ) ! { ! global $db, $db, $_POST, $lang; ! ! $field_name = ( isset( $_POST['field_name'] ) ) ? htmlspecialchars( $_POST['field_name'] ) : ''; ! $field_desc = ( isset( $_POST['field_desc'] ) ) ? htmlspecialchars( $_POST['field_desc'] ) : ''; ! $regex = ( isset( $_POST['regex'] ) ) ? $_POST['regex'] : ''; ! $data = ( isset( $_POST['data'] ) ) ? $_POST['data'] : ''; ! $field_order = ( isset( $_POST['field_order'] ) ) ? $_POST['field_order'] : ''; ! ! if ( $field_id ) ! { ! $field_order = ( isset( $_POST['field_order'] ) ) ? intval( $_POST['field_order'] ) : ''; ! } ! ! if ( !empty( $data ) ) ! { ! $data = explode( "\n", htmlspecialchars( trim( $data ) ) ); ! ! foreach( $data as $key => $value ) ! { ! $data[$key] = trim( $value ); ! } ! $data = addslashes( serialize( $data ) ); ! } ! ! if ( empty( $field_name ) ) ! { ! mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); ! } ! ! if ( ( ( $field_type != INPUT && $field_type != TEXTAREA ) && empty( $data ) ) ) ! { ! mx_message_die( GENERAL_ERROR, $lang['Missing_field'] ); ! } ! ! if ( !$field_id ) ! { ! $sql = "INSERT INTO " . $this->custom_table . " (custom_name, custom_description, data, regex, field_type) ! VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not add the new fields', '', __LINE__, __FILE__, $sql ); ! } ! ! $field_id = $db->sql_nextid(); ! ! $sql = "UPDATE " . $this->custom_table . " ! SET field_order = '$field_id' ! WHERE custom_id = $field_id"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not set the order for the giving field', '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! $sql = "UPDATE " . $this->custom_table . " ! SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' ! WHERE custom_id = $field_id"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not update information for the giving field', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $field_id ! */ ! function delete_field( $field_id ) ! { ! global $db; ! ! $sql = "DELETE FROM " . $this->custom_data_table . " ! WHERE customdata_custom = '$field_id'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete custom data', '', __LINE__, __FILE__, $sql ); ! } ! ! $sql = "DELETE FROM " . $this->custom_table . " ! WHERE custom_id = '$field_id'"; ! ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete the selected field', '', __LINE__, __FILE__, $sql ); ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $field_id ! * @return unknown ! */ ! function get_field_data( $field_id ) ! { ! $return_array = $this->field_rowset[$field_id]; ! $return_array['data'] = !empty( $return_array['data'] ) ? implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ) : ''; ! return $return_array; ! } ! ! /** ! * file data in custom field operations. ! * ! * @param unknown_type $file_id ! */ ! function file_update_data( $file_id ) ! { ! global $_POST, $db; ! $field = ( isset( $_POST['field'] ) ) ? $_POST['field'] : ''; ! if ( !empty( $field ) ) ! { ! foreach( $field as $field_id => $field_data ) ! { ! if ( !empty( $this->field_rowset[$field_id]['regex'] ) ) ! { ! if ( !preg_match( '#' . $this->field_rowset[$field_id]['regex'] . '#siU', $field_data ) ) ! { ! $field_data = ''; ! } ! } ! ! switch ( $this->field_rowset[$field_id]['field_type'] ) ! { ! case INPUT: ! case TEXTAREA: ! case RADIO: ! case SELECT: ! $data = htmlspecialchars( $field_data ); ! break; ! case SELECT_MULTIPLE: ! case CHECKBOX: ! $data = addslashes( serialize( $field_data ) ); ! break; ! } ! ! $sql = "DELETE FROM " . $this->custom_data_table . " ! WHERE customdata_file = '$file_id' ! AND customdata_custom = '$field_id'"; ! ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not delete data from custom data table', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( !empty( $data ) ) ! { ! $sql = "INSERT INTO " . $this->custom_data_table . " (customdata_file, customdata_custom, data) ! VALUES('$file_id', '$field_id', '$data')"; ! ! if ( !$db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not add additional data', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! } } } Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_admin.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_admin.php 8 Jul 2006 16:28:46 -0000 1.6 --- functions_admin.php 1 Aug 2006 21:03:24 -0000 1.7 *************** *** 45,50 **** function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) { ! global $phpbb_root_path, $pafiledb_template, $phpEx; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $lang; $pre = str_repeat( ' ', $depth ); if ( isset( $this->subcat_rowset[$cat_parent] ) ) --- 45,52 ---- function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) { ! global $lang, $phpbb_root_path, $pafiledb_template, $phpEx; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; ! global $cat_auth_approval_fields, $cat_auth_approval_const, $cat_auth_approval_levels; ! $pre = str_repeat( ' ', $depth ); if ( isset( $this->subcat_rowset[$cat_parent] ) ) *************** *** 72,75 **** --- 74,92 ---- $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ); } + + for( $j = 0; $j < count( $cat_auth_approval_fields ); $j++ ) + { + $custom_auth_approval[$j] = ' <select name="' . $cat_auth_approval_fields[$j] . '[' . $sub_cat_id . ']' . '">'; + + for( $k = 0; $k < count( $cat_auth_approval_levels ); $k++ ) + { + $selected = ( $cat_data[$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] ) ); + } + $this->admin_display_cat_auth( $sub_cat_id, $depth + 1 ); } *************** *** 82,86 **** { global $phpbb_root_path, $pafiledb_template, $phpEx; ! global $cat_auth_fields, $optionlist_mod, $optionlist_acl_adv; $pre = str_repeat( ' ', $depth ); if ( isset( $this->subcat_rowset[$cat_parent] ) ) --- 99,104 ---- { global $phpbb_root_path, $pafiledb_template, $phpEx; ! global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $optionlist_mod, $optionlist_acl_adv; ! $pre = str_repeat( ' ', $depth ); if ( isset( $this->subcat_rowset[$cat_parent] ) ) *************** *** 408,416 **** if ( $file_mode == 'delete' ) { ! $this->delete_files( $cat_id, 'category' ); } else { ! $this->move_files( $cat_id, $file_to_cat_id ); } --- 426,434 ---- if ( $file_mode == 'delete' ) { ! $this->delete_items( $cat_id, 'category' ); } else { ! $this->move_items( $cat_id, $file_to_cat_id ); } *************** *** 433,437 **** * @param unknown_type $to_cat */ ! function move_files( $from_cat, $to_cat ) { global $db; --- 451,455 ---- * @param unknown_type $to_cat */ ! function move_items( $from_cat, $to_cat ) { global $db; *************** *** 480,488 **** if ( $file_mode == 'delete' ) { ! $this->delete_files( $sub_cat_id, 'category' ); } else { ! $this->move_files( $sub_cat_id, $to_cat ); } } --- 498,506 ---- if ( $file_mode == 'delete' ) { ! $this->delete_items( $sub_cat_id, 'category' ); } else { ! $this->move_items( $sub_cat_id, $to_cat ); } } Index: functions_cache.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_cache.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_cache.php 7 Jun 2006 20:29:52 -0000 1.7 --- functions_cache.php 1 Aug 2006 21:03:24 -0000 1.8 *************** *** 15,19 **** /** ! * Enter description here... * */ --- 15,19 ---- /** ! * Generic module cache. * */ *************** *** 29,37 **** * @return pafiledb_cache */ ! function pafiledb_cache() { global $phpbb_root_path; global $mx_root_path, $module_root_path, $is_block, $phpEx; ! $this->cache_dir = $module_root_path . 'pafiledb/cache/'; } --- 29,43 ---- * @return pafiledb_cache */ ! function pafiledb_cache($dir=false) { global $phpbb_root_path; global $mx_root_path, $module_root_path, $is_block, $phpEx; ! ! if (!$dir) ! { ! mx_message_die(GENERAL_ERROR, 'The module cache need a init dir.'); ! } ! ! $this->cache_dir = $dir . 'cache/'; } Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_comment.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** functions_comment.php 5 Jul 2006 22:50:22 -0000 1.22 --- functions_comment.php 1 Aug 2006 21:03:24 -0000 1.23 *************** *** 91,99 **** $this->forum_id = $pafiledb->modules[$pafiledb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_view_comment']; ! $this->auth['auth_post'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_post_comment']; ! $this->auth['auth_edit'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_edit_comment']; ! $this->auth['auth_delete'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_delete_comment']; ! $this->auth['auth_mod'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_mod']; // --- 91,99 ---- $this->forum_id = $pafiledb->modules[$pafiledb->module_name]->comments[$this->cat_id]['comments_forum_id']; ! $this->auth['auth_view'] = $pafiledb->modules[$pafiledb->module_name]->auth_user[$this->cat_id]['auth_view_comment']; ! $this->auth['auth_post'] = $pafiledb->modules[$pafiledb->module_name]->auth_user[$this->cat_id]['auth_post_comment']; ! $this->auth['auth_edit'] = $pafiledb->modules[$pafiledb->module_name]->auth_user[$this->cat_id]['auth_edit_comment']; ! $this->auth['auth_delete'] = $pafiledb->modules[$pafiledb->module_name]->auth_user[$this->cat_id]['auth_delete_comment']; ! $this->auth['auth_mod'] = $pafiledb->modules[$pafiledb->module_name]->auth_user[$this->cat_id]['auth_mod']; // Index: functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/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:29:52 -0000 1.3 --- functions_auth.php 1 Aug 2006 21:03:24 -0000 1.4 *************** *** 15,18 **** --- 15,43 ---- /** + * Auth API. + * + * $class->auth_user['auth_view']; + * $class->auth_user['auth_read']; + * $class->auth_user['auth_view_file']; + * $class->auth_user['auth_edit_file']; + * $class->auth_user['auth_delete_file']; + * $class->auth_user['auth_upload']; + * $class->auth_user['auth_download']; + * + * $class->auth_user['auth_approval']; + * $class->auth_user['auth_approval_edit']; + * + * $class->auth_user['auth_rate']; + * $class->auth_user['auth_email']; + * + * $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']; + */ + + /** * pafiledb Auth class * *************** *** 20,24 **** class mx_pafiledb_auth { ! var $auth = array(); var $auth_global = array(); --- 45,49 ---- class mx_pafiledb_auth { ! var $auth_user = array(); var $auth_global = array(); *************** *** 35,40 **** global $db, $db, $lang, $userdata, $pafiledb_config; ! $a_sql = 'a.auth_view, a.auth_read, a.auth_view_file, a.auth_edit_file, a.auth_delete_file, a.auth_upload, a.auth_download, a.auth_rate, a.auth_email, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_mod, a.auth_search, a.auth_stats, a.auth_toplist, a.auth_viewall, a.auth_approval'; ! $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' ); $auth_fields_global = array( 'auth_search', 'auth_stats', 'auth_toplist', 'auth_viewall' ); --- 60,65 ---- global $db, $db, $lang, $userdata, $pafiledb_config; ! $a_sql = 'a.auth_view, a.auth_read, a.auth_view_file, a.auth_edit_file, a.auth_delete_file, a.auth_upload, a.auth_download, a.auth_rate, a.auth_email, a.auth_view_comment, a.auth_post_comment, a.auth_edit_comment, a.auth_delete_comment, a.auth_mod, a.auth_search, a.auth_stats, a.auth_toplist, a.auth_viewall, a.auth_approval, a.auth_approval_edit'; ! $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', 'auth_approval_edit' ); $auth_fields_global = array( 'auth_search', 'auth_stats', 'auth_toplist', 'auth_viewall' ); *************** *** 99,128 **** { case AUTH_ALL: ! $this->auth[$c_cat_id][$key] = true; ! $this->auth[$c_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: ! $this->auth[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $this->auth[$c_cat_id][$key . '_type'] = $lang['Auth_Registered_Users']; break; case AUTH_ACL: ! $this->auth[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_ACL, $key, $u_access[$c_cat_id], $is_admin ) : 0; ! $this->auth[$c_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_MOD, 'auth_mod', $u_access[$c_cat_id], $is_admin ) : 0; ! $this->auth[$c_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; case AUTH_ADMIN: ! $this->auth[$c_cat_id][$key] = $is_admin; ! $this->auth[$c_cat_id][$key . '_type'] = $lang['Auth_Administrators']; break; default: ! $this->auth[$c_cat_id][$key] = 0; break; } --- 124,153 ---- { case AUTH_ALL: ! $this->auth_user[$c_cat_id][$key] = true; ! $this->auth_user[$c_cat_id][$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: ! $this->auth_user[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? true : 0; ! $this->auth_user[$c_cat_id][$key . '_type'] = $lang['Auth_Registered_Users']; break; case AUTH_ACL: ! $this->auth_user[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_ACL, $key, $u_access[$c_cat_id], $is_admin ) : 0; ! $this->auth_user[$c_cat_id][$key . '_type'] = $lang['Auth_Users_granted_access']; break; case AUTH_MOD: ! $this->auth_user[$c_cat_id][$key] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_MOD, 'auth_mod', $u_access[$c_cat_id], $is_admin ) : 0; ! $this->auth_user[$c_cat_id][$key . '_type'] = $lang['Auth_Moderators']; break; case AUTH_ADMIN: ! $this->auth_user[$c_cat_id][$key] = $is_admin; ! $this->auth_user[$c_cat_id][$key . '_type'] = $lang['Auth_Administrators']; break; default: ! $this->auth_user[$c_cat_id][$key] = 0; break; } *************** *** 132,136 **** { $c_cat_id = $c_access[$k]['cat_id']; ! $this->auth[$c_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_MOD, 'auth_mod', $u_access[$c_cat_id], $is_admin ) : 0; } --- 157,161 ---- { $c_cat_id = $c_access[$k]['cat_id']; ! $this->auth_user[$c_cat_id]['auth_mod'] = ( $userdata['session_logged_in'] ) ? $this->auth_check_user( AUTH_MOD, 'auth_mod', $u_access[$c_cat_id], $is_admin ) : 0; } *************** *** 263,269 **** function is_moderator() { ! if ( !empty( $this->auth ) ) { ! foreach( $this->auth as $cat_id => $auth_fields ) { if ( $auth_fileds['auth_mod'] ) --- 288,294 ---- function is_moderator() { ! if ( !empty( $this->auth_user ) ) { ! foreach( $this->auth_user as $cat_id => $auth_fields ) { if ( $auth_fileds['auth_mod'] ) Index: functions_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_field.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** functions_field.php 7 Jun 2006 20:29:52 -0000 1.8 --- functions_field.php 1 Aug 2006 21:03:24 -0000 1.9 *************** *** 15,19 **** /** ! * Enter description here... * */ --- 15,19 ---- /** ! * This is a generic class for custom fields. * */ *************** *** 23,26 **** --- 23,29 ---- var $field_data_rowset = array(); + var $custom_table = PA_CUSTOM_TABLE; + var $custom_data_table = PA_CUSTOM_DATA_TABLE; + /** * prepare data *************** *** 32,36 **** $sql = "SELECT * ! FROM " . PA_CUSTOM_TABLE . " ORDER BY field_order ASC"; --- 35,39 ---- $sql = "SELECT * ! FROM " . $this->custom_table . " ORDER BY field_order ASC"; *************** *** 48,52 **** $sql = "SELECT * ! FROM " . PA_CUSTOM_DATA_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) --- 51,55 ---- $sql = "SELECT * ! FROM " . $this->custom_data_table; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 66,70 **** /** ! * check if there is a data in the database * * @return unknown --- 69,73 ---- /** ! * check if there is a data in the database. * * @return unknown *************** *** 130,137 **** global $db; ! $sql = "DELETE FROM " . PA_CUSTOM_DATA_TABLE . " ! ! ! WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; --- 133,137 ---- global $db; ! $sql = "DELETE FROM " . $this->custom_data_table . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; *************** *** 157,161 **** /** ! * display data in the file page * * @param unknown_type $file_id --- 157,161 ---- /** ! * display data in the file page. * * @param unknown_type $file_id *************** *** 187,193 **** } ! $pafiledb_template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else --- 187,194 ---- } ! $pafiledb_template->assign_block_vars( 'custom_field', array( ! 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ! ); } else *************** *** 195,199 **** global $db; ! $sql = "DELETE FROM " . PA_CUSTOM_DATA_TABLE . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; --- 196,200 ---- global $db; ! $sql = "DELETE FROM " . $this->custom_data_table . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; *************** *** 218,222 **** /** ! * display custom field and data in the add/edit page * * @param unknown_type $file_id --- 219,223 ---- /** ! * display custom field and data in the add/edit page. * * @param unknown_type $file_id *************** *** 268,276 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 269,280 ---- { global $pafiledb_template; ! $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'input', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => $field_value ) ! ); } *************** *** 285,293 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ! ); } --- 289,300 ---- { global $pafiledb_template; ! $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'textarea', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => $field_value ) ! ); } *************** *** 302,311 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); --- 309,320 ---- { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'radio', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); *************** *** 314,320 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } --- 323,330 ---- foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'radio.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ! ); } } *************** *** 331,340 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); --- 341,352 ---- { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); *************** *** 343,349 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } --- 355,362 ---- foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'select.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ! ); } } *************** *** 360,369 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); --- 373,384 ---- { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select_multiple', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); *************** *** 381,387 **** } } ! $pafiledb_template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } --- 396,403 ---- } } ! $pafiledb_template->assign_block_vars( 'select_multiple.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ! ); } } *************** *** 398,407 **** { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); --- 414,425 ---- { global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'checkbox', array( ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ! ); ! $data_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? unserialize( $this->field_data_rowset[$file_id][$field_id]['data'] ) : array(); ! $data = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $data_temp ; $field_datas = ( !empty( $field_data['data'] ) ) ? unserialize( stripslashes( $field_data['data'] ) ) : array(); *************** *** 419,425 **** } } ! $pafiledb_template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } --- 437,444 ---- } } ! $pafiledb_template->assign_block_vars( 'checkbox.row', array( ! 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ! ); } } *************** *** 470,474 **** if ( !$field_id ) { ! $sql = "INSERT INTO " . PA_CUSTOM_TABLE . " (custom_name, custom_description, data, regex, field_type) VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; --- 489,493 ---- if ( !$field_id ) { ! $sql = "INSERT INTO " . $this->custom_table . " (custom_name, custom_description, data, regex, field_type) VALUES('" . $field_name . "', '" . $field_desc . "', '" . $data . "', '" . $regex . "', '" . $field_type . "')"; *************** *** 480,484 **** $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . PA_CUSTOM_TABLE . " SET field_order = '$field_id' WHERE custom_id = $field_id"; --- 499,503 ---- $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . $this->custom_table . " SET field_order = '$field_id' WHERE custom_id = $field_id"; *************** *** 491,495 **** else { ! $sql = "UPDATE " . PA_CUSTOM_TABLE . " SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' WHERE custom_id = $field_id"; --- 510,514 ---- else { ! $sql = "UPDATE " . $this->custom_table . " SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' WHERE custom_id = $field_id"; *************** *** 511,515 **** global $db; ! $sql = "DELETE FROM " . PA_CUSTOM_DATA_TABLE . " WHERE customdata_custom = '$field_id'"; --- 530,534 ---- global $db; ! $sql = "DELETE FROM " . $this->custom_data_table . " WHERE customdata_custom = '$field_id'"; *************** *** 519,523 **** } ! $sql = "DELETE FROM " . PA_CUSTOM_TABLE . " WHERE custom_id = '$field_id'"; --- 538,542 ---- } ! $sql = "DELETE FROM " . $this->custom_table . " WHERE custom_id = '$field_id'"; *************** *** 542,546 **** /** ! * file data in custom field operations * * @param unknown_type $file_id --- 561,565 ---- /** ! * file data in custom field operations. * * @param unknown_type $file_id *************** *** 576,580 **** } ! $sql = "DELETE FROM " . PA_CUSTOM_DATA_TABLE . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; --- 595,599 ---- } ! $sql = "DELETE FROM " . $this->custom_data_table . " WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; *************** *** 587,591 **** if ( !empty( $data ) ) { ! $sql = "INSERT INTO " . PA_CUSTOM_DATA_TABLE . " (customdata_file, customdata_custom, data) VALUES('$file_id', '$field_id', '$data')"; --- 606,610 ---- if ( !empty( $data ) ) { ! $sql = "INSERT INTO " . $this->custom_data_table . " (customdata_file, customdata_custom, data) VALUES('$file_id', '$field_id', '$data')"; Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** functions_pafiledb.php 8 Jul 2006 16:28:46 -0000 1.36 --- functions_pafiledb.php 1 Aug 2006 21:03:24 -0000 1.37 *************** *** 130,169 **** for( $i = 0; $i < count( $cat_rowset ); $i++ ) { ! if ( $this->auth[$cat_rowset[$i]['cat_id']]['auth_view'] ) { $this->cat_rowset[$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; $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 ? ($pafiledb_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 ? ($pafiledb_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 ? ($pafiledb_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($pafiledb_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 ? ($pafiledb_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 ? ($pafiledb_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($pafiledb_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($pafiledb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id } } --- 130,169 ---- for( $i = 0; $i < count( $cat_rowset ); $i++ ) { ! if ( $this->auth_user[$cat_rowset[$i]['cat_id']]['auth_view'] ) { $this->cat_rowset[$cat_rowset[$i]['cat_id']] = $cat_rowset[$i]; $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 ? ($pafiledb_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 ? ($pafiledb_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 ? ($pafiledb_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($pafiledb_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 ? ($pafiledb_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 ? ($pafiledb_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($pafiledb_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($pafiledb_config['notify_group'])) : ( intval($cat_rowset[$i]['notify_group']) ); // Group_id ! } } } *************** *** 313,317 **** * @return unknown */ ! function file_in_cat( $cat_id ) { if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) --- 313,317 ---- * @return unknown */ ! function items_in_cat( $cat_id ) { if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) *************** *** 330,341 **** } ! $files_no = 0; if ( $row = $db->sql_fetchrow( $result ) ) { ! $files_no = $row['total_files']; } $sql = 'UPDATE ' . PA_CATEGORY_TABLE . " ! SET cat_files = $files_no WHERE cat_id = $cat_id"; --- 330,341 ---- } ! $number_of_items = 0; if ( $row = $db->sql_fetchrow( $result ) ) { ! $number_of_items = $row['total_files']; } $sql = 'UPDATE ' . PA_CATEGORY_TABLE . " ! SET cat_files = $number_of_items WHERE cat_id = $cat_id"; *************** *** 347,354 **** else { ! $files_no = $this->cat_rowset[$cat_id]['cat_files']; } ! return $files_no; } --- 347,354 ---- else { ! $number_of_items = $this->cat_rowset[$cat_id]['cat_files']; } ! return $number_of_items; } *************** *** 363,370 **** * @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 ) ) --- 363,370 ---- * @return unknown */ ! function generate_jumpbox( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = true, $auth = 'auth_view' ) { global $page_id; ! //static $cat_rowset = false; if ( !is_array( $cat_rowset ) ) *************** *** 376,380 **** foreach( $this->cat_rowset as $row ) { ! if ( $this->auth[$row['cat_id']]['auth_upload'] ) { $cat_rowset[$row['cat_id']] = $row; --- 376,380 ---- 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++; *************** *** 543,551 **** * @return unknown */ ! function new_file_in_cat( $cat_id ) { global $pafiledb_config, $board_config, $db, $_COOKIE; ! $cat_array = explode(',', $this->gen_cat_ids( $cat_id )); $files_new = 0; --- 543,551 ---- * @return unknown */ ! function new_item_in_cat( $cat_id ) { global $pafiledb_config, $board_config, $db, $_COOKIE; ! $cat_array = explode(', ', $this->gen_cat_ids( $cat_id )); $files_new = 0; *************** *** 554,558 **** foreach ( $cat_array as $key => $cat_id ) { ! if ( $this->auth[$cat_id]['auth_read'] && $this->cat_rowset[$cat_id]['cat_last_file_time'] > $time) ... [truncated message content] |