[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt,1.5,1.6 mod_complete.tpl,1.1,1.2
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2005-05-08 03:04:35
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7508/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_complete.tpl mod_diy_body.tpl Log Message: Moved DIY Instructions onto the Post Process screen as well as its own page after the Post Process page. If users don't see these instructions, its the users own fault. Index: mod_diy_body.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_diy_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_diy_body.tpl 6 May 2005 22:23:44 -0000 1.1 --- mod_diy_body.tpl 8 May 2005 03:04:19 -0000 1.2 *************** *** 1,7 **** <h2>{L_STEP}</h2> ! <h3>{L_ALTERATIONS}</h3> <p>{L_DIY_INTRO}</p> - <form method="post" action="{S_ACTION}"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> --- 1,6 ---- <h2>{L_STEP}</h2> ! <h3>{L_COMPLETE}</h3> <p>{L_DIY_INTRO}</p> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 11,15 **** <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> ! <td align="center"> </td> </tr> <tr> --- 10,14 ---- <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> <tr> ! <td align="center"><span class="gen">{L_DIY_INTRO}</span></td> </tr> <tr> *************** *** 28,49 **** </td> </tr> - <tr> - <td class="catBottom" align="center" height="28"> - {HIDDEN} - <input type="hidden" name="mode" value="{MODE}"> - <input type="hidden" name="SQL_lines" value="{SQL_LINES}"> - <input type="hidden" name="themes" value="{THEMES}"> - <input type="hidden" name="languages" value="{LANGUAGES}"> - <input type="hidden" name="files" value="{FILES}"> - <input type="hidden" name="num_proc" value="{PROCESSED}"> - <input type="hidden" name="num_unproc" value="{UNPROCESSED}"> - <input type="hidden" name="install_file" value="{MOD_FILE}"> - <input type="hidden" name="install_path" value="{MOD_PATH}"> - <input type="hidden" name="password" value="{EM_PASS}"> - <input type="submit" name="post" class="mainoption" value="{L_COMPLETE}" /></center> - </td> - </tr> </table> <br /> ! </form> <br /> \ No newline at end of file --- 27,32 ---- </td> </tr> </table> <br /> ! <h2>{L_INSTALL_COMPLETE}</h2> <br /> \ No newline at end of file Index: mod_complete.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_complete.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_complete.tpl 24 Apr 2005 14:59:53 -0000 1.1 --- mod_complete.tpl 8 May 2005 03:04:19 -0000 1.2 *************** *** 19,22 **** --- 19,61 ---- <p>{L_COMP_DESC}</p> + <!-- BEGIN diy_switch --> + <form method="post" action="{diy_switch.S_ACTION}"> + <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> + <tr> + <th height="25" class="thHead" nowrap="nowrap">{L_DIY_INSTRUCTIONS}</th> + </tr> + <tr> + <td class="row1"><table border="0" cellpadding="3" cellspacing="1" width="100%"> + <tr> + <td align="center"><span class="gen">{L_DIY_INTRO}</span></td> + </tr> + <tr> + <td width="100%"><span class="gen"> + <ul> + <!-- BEGIN diyrow --> + <li>{diy_switch.diyrow.INSTRUCTIONS}</li> + <!-- END diyrow --> + </ul> + </span></td> + </tr> + <tr> + <td align="center"> </td> + </tr> + </table> + </td> + </tr> + <tr> + <td class="catBottom" align="center" height="28"> + {HIDDEN} + <input type="hidden" name="mode" value="{diy_switch.MODE}" /> + <input type="hidden" name="password" value="{diy_switch.EM_PASS}"> + <input type="submit" name="post" class="mainoption" value="{L_FINAL_INSTALL_STEP}" /></center> + </td> + </tr> + </table> + </form> + <br /> + <!-- END diy_switch --> + <form action="{S_ACTION}" name="install" method="post"> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline" width="100%"> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_easymod.php.txt 6 May 2005 22:23:44 -0000 1.5 --- admin_easymod.php.txt 8 May 2005 03:04:19 -0000 1.6 *************** *** 2579,2583 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( ($error == '') ? 'SQL_execute' : (( count($diy) ) ? 'diy_process' : 'post_process') ), 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2579,2583 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ($error == '') ? 'SQL_execute' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2704,2708 **** 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => ( count($diy) ) ? 'diy_process' : 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) --- 2704,2708 ---- 'MOD_FILE' => $install_file, 'MOD_PATH' => $install_path, ! 'MODE' => 'post_process', 'HIDDEN' => $hidden, 'EM_PASS' => $password) *************** *** 2711,2720 **** // ! // show the DIY instructions ! // move below post_process? // ! else if ( $mode == 'diy_process' ) { ! // get the vars we are passing along $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; --- 2711,2719 ---- // ! // last step! move the files into place - force this step if in preview mode // ! else if (($mode == 'post_process') || ($preview)) { ! // get the info we are passing along $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; *************** *** 2724,2795 **** $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); ! // get the post process operations and prepare to send them to the next step ! $num_command_steps = (isset($HTTP_POST_VARS['num_command_steps'])) ? intval($HTTP_POST_VARS['num_command_steps']) :0; ! $hidden = '' ; ! for ( $i=0; $i<$num_command_steps; $i++) ! { ! $var_name = 'command_step' . $i ; ! if ( isset($HTTP_POST_VARS[$var_name])) ! { ! $hidden .= '<input type="hidden" name="command_step'.$i.'" value="' . $HTTP_POST_VARS[$var_name]."\">\n"; ! } ! } ! $hidden .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; // explode each new line so they can have their own bullet ! $diy_process = array(); ! for( $i = 0; $i < count($diy); $i++ ) { ! $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); ! } ! for( $i = 0; $i < count($diy_process); $i++ ) ! { ! $diy_process[$i] = trim($diy_process[$i]); ! if ( !empty($diy_process[$i]) ) { ! $template->assign_block_vars('diyrow', array( ! 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) ! ); } - } ! // Show the SQL template ! $template->set_filenames(array( ! 'body' => 'admin/mod_diy_body.tpl') ! ); ! ! // fill the template ! $template->assign_vars(array( ! 'L_STEP' => $lang['EM_sql_step2'], ! 'L_DIY_INTRO' => '\'Do it yourself\' instructions need to be executed by you manually, EasyMOD will not perform these actions', ! ! 'L_COMPLETE' => $lang['EM_complete_install'], ! ! 'THEMES' => $themes, ! 'LANGUAGES' => $languages, ! 'FILES' => $files, ! 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc, ! 'SQL_LINES' => $num_sql_lines, ! 'MOD_FILE' => $install_file, ! 'MOD_PATH' => $install_path, ! 'MODE' => 'post_process', ! 'HIDDEN' => $hidden, ! 'EM_PASS' => $password) ! ); ! } ! // ! // last step! move the files into place - force this step if in preview mode ! // ! else if (($mode == 'post_process') || ($preview)) ! { ! // get the info we are passing along ! $themes = (isset($HTTP_POST_VARS['themes'])) ? htmlspecialchars($HTTP_POST_VARS['themes']) : '' ; ! $languages = (isset($HTTP_POST_VARS['languages'])) ? htmlspecialchars($HTTP_POST_VARS['languages']) : '' ; ! $files = (isset($HTTP_POST_VARS['files'])) ? intval($HTTP_POST_VARS['files']) : 0 ; ! $num_proc = (isset($HTTP_POST_VARS['num_proc'])) ? intval($HTTP_POST_VARS['num_proc']) : 0 ; ! $num_unproc = (isset($HTTP_POST_VARS['num_unproc'])) ? intval($HTTP_POST_VARS['num_unproc']) : 0 ; // get the post process operations --- 2723,2756 ---- $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); ! $hidden = ''; // explode each new line so they can have their own bullet ! if ( count($diy) ) { ! $template->assign_block_vars('diy_switch', array( ! 'MODE' => 'diy_process', ! 'U_ACTION' => $phpbb_root_path . 'admin/admin_easymod.'.$phpEx, ! 'EM_PASS' => $password) ! ); ! $diy_process = array(); ! for( $i = 0; $i < count($diy); $i++ ) { ! $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); } ! for( $i = 0; $i < count($diy_process); $i++ ) ! { ! $diy_process[$i] = trim($diy_process[$i]); ! if ( !empty($diy_process[$i]) ) ! { ! $hidden .= '<input type="hidden" name="diy_array[]" value="' . stripslashes(htmlspecialchars($diy_process[$i])) . "\" />\n"; ! $template->assign_block_vars('diy_switch.diyrow', array( ! 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) ! ); ! } ! } ! } // get the post process operations *************** *** 2945,2948 **** --- 2906,2913 ---- 'L_UNPROCESSED' => $lang['EM_unprocessed_commands'], + 'L_DIY_INSTRUCTIONS' => $lang['DIY_Instructions'], + 'L_DIY_INTRO' => $lang['DIY_intro'], + 'L_FINAL_INSTALL_STEP' => $lang['Final_install_step'], + 'INSTALL_PATH' => $print_path, 'TITLE' => $mod_title, *************** *** 2961,2965 **** 'FILES' => $files, 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc) ); --- 2926,2932 ---- 'FILES' => $files, 'PROCESSED' => $num_proc, ! 'UNPROCESSED' => $num_unproc, ! ! 'HIDDEN' => $hidden) ); *************** *** 2997,3000 **** --- 2964,3008 ---- } } + + // + // show the DIY instructions + // move below post_process? + // + else if ( $mode == 'diy_process' ) + { + $diy = (isset($HTTP_POST_VARS['diy_array'])) ? $HTTP_POST_VARS['diy_array'] : array(); + + // explode each new line so they can have their own bullet + $diy_process = array(); + for( $i = 0; $i < count($diy); $i++ ) + { + $diy_process = array_merge($diy_process, explode("\n", $diy[$i])); + } + + for( $i = 0; $i < count($diy_process); $i++ ) + { + $diy_process[$i] = trim($diy_process[$i]); + if ( !empty($diy_process[$i]) ) + { + $template->assign_block_vars('diyrow', array( + 'INSTRUCTIONS' => stripslashes(htmlspecialchars($diy_process[$i]))) + ); + } + } + + // Show the SQL template + $template->set_filenames(array( + 'body' => 'admin/mod_diy_body.tpl') + ); + + // fill the template + $template->assign_vars(array( + 'L_STEP' => $lang['DIY_final'], + 'L_COMPLETE' => $lang['DIY_Instructions'], + 'L_DIY_INTRO' => $lang['DIY_intro'], + 'L_INSTALL_COMPLETE' => $lang['Install_complete']) + ); + + } |