|
From: Jon O. <jon...@us...> - 2008-04-27 18:49:24
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15622/pafiledb/modules Modified Files: pa_file.php pa_user_upload.php Log Message: A new feature is tested, dynamic buttons. I have coded this update so custom styles will not be affected... Index: pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_file.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** pa_file.php 15 Feb 2008 22:15:15 -0000 1.24 --- pa_file.php 27 Apr 2008 18:48:48 -0000 1.25 *************** *** 28,32 **** { global $template, $lang, $board_config, $phpEx, $pafiledb_config, $images; ! global $phpbb_root_path, $userdata, $db, $pafiledb_functions; global $mx_root_path, $module_root_path, $is_block, $mx_request_vars; --- 28,32 ---- { global $template, $lang, $board_config, $phpEx, $pafiledb_config, $images; ! global $phpbb_root_path, $userdata, $db, $pafiledb_functions, $mx_user; global $mx_root_path, $module_root_path, $is_block, $mx_request_vars; *************** *** 139,142 **** --- 139,150 ---- } + // + // Disabled file + // + if ($file_data['file_disable']) + { + $file_download_link = 'javascript:disable_popup()'; + } + $template->assign_vars( array( 'L_CLICK_HERE' => $lang['Click_here'], *************** *** 170,173 **** --- 178,182 ---- 'FILE_SCREENSHOT' => $file_screenshot_url, 'FILE_WEBSITE' => $file_website_url, + 'FILE_DISABLE_MSG' => nl2br( $file_data['disable_msg'] ), '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, *************** *** 180,183 **** --- 189,193 ---- 'DOWNLOAD_IMG' => $images['pa_download'], 'EMAIL_IMG' => $images['pa_email'], + 'TIME' => $file_time, 'UPDATE_TIME' => ( $file_data['file_update_time'] != $file_data['file_time'] ) ? $file_update_time : $lang['never'], *************** *** 189,194 **** 'U_DELETE' => mx_append_sid( $this->this_mxurl( 'action=user_upload&do=delete&file_id=' . $file_id ) ), 'U_EDIT' => mx_append_sid( $this->this_mxurl( 'action=user_upload&file_id=' . $file_id ) ), ! 'U_EMAIL' => mx_append_sid( $this->this_mxurl( 'action=email&file_id=' . $file_id ) ) )); --- 199,209 ---- 'U_DELETE' => mx_append_sid( $this->this_mxurl( 'action=user_upload&do=delete&file_id=' . $file_id ) ), 'U_EDIT' => mx_append_sid( $this->this_mxurl( 'action=user_upload&file_id=' . $file_id ) ), + 'U_EMAIL' => mx_append_sid( $this->this_mxurl( 'action=email&file_id=' . $file_id ) ), ! // Buttons ! 'B_DOWNLOAD_IMG' => $mx_user->create_button('pa_download', $lang['Downloadfile'], $file_download_link), ! 'B_DELETE_IMG' => $mx_user->create_button('pa_icon_delpost', $lang['Deletefile'], "javascript:delete_item('". mx_append_sid( $this->this_mxurl( 'action=user_upload&do=delete&file_id=' . $file_id )) . "')"), ! 'B_EDIT_IMG' => $mx_user->create_button('pa_icon_edit', $lang['Editfile'], mx_append_sid( $this->this_mxurl( 'action=user_upload&file_id=' . $file_id ) )), ! 'B_EMAIL_IMG' => $mx_user->create_button('pa_email', $lang['Emailfile'], mx_append_sid( $this->this_mxurl( 'action=email&file_id=' . $file_id ))), )); Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** pa_user_upload.php 18 Feb 2008 20:21:45 -0000 1.28 --- pa_user_upload.php 27 Apr 2008 18:48:49 -0000 1.29 *************** *** 264,267 **** --- 264,270 ---- $pin_checked_yes = ''; $pin_checked_no = ' checked'; + $disable_checked_yes = ''; + $disable_checked_no = ' checked'; + $disable_msg = 'The file is unavailable at the moment!'; $file_download = 0; $approved_checked_yes = ''; *************** *** 293,296 **** --- 296,302 ---- $pin_checked_yes = ( $file_data['file_pin'] ) ? ' checked' : ''; $pin_checked_no = ( !$file_data['file_pin'] ) ? ' checked' : ''; + $disable_checked_yes = ( $file_data['file_disable'] ) ? ' checked' : ''; + $disable_checked_no = ( !$file_data['file_disable'] ) ? ' checked' : ''; + $disable_msg = $file_data['disable_msg']; $file_download = intval( $file_data['file_dls'] ); $approved_checked_yes = ( $file_data['file_approved'] ) ? ' checked' : ''; *************** *** 340,343 **** --- 346,352 ---- 'PIN_CHECKED_YES' => $pin_checked_yes, 'PIN_CHECKED_NO' => $pin_checked_no, + 'DISABLE_CHECKED_YES' => $disable_checked_yes, + 'DISABLE_CHECKED_NO' => $disable_checked_no, + 'DISABLE_MSG' => $disable_msg, 'L_UPLOAD' => $lang['User_upload'], *************** *** 380,383 **** --- 389,396 ---- 'L_FILE_PINNED' => $lang['Filepin'], 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], + 'L_FILE_DISABLE' => $lang['Filedisable'], + 'L_FILE_DISABLE_INFO' => $lang['Filedisableinfo'], + 'L_FILE_DISABLE_MSG' => $lang['Filedisablemsg'], + 'L_FILE_DISABLE_MSG_INFO' => $lang['Filedisablemsginfo'], 'L_FILE_DOWNLOAD' => $lang['Filedls'], 'L_NO' => $lang['No'], |