install/includes/stages/website.php
changeset 391 85f91037cd4f
parent 348 87e08a6e4fec
child 407 35d94240a197
equal deleted inserted replaced
390:9bcc185dc151 391:85f91037cd4f
    68       {
    68       {
    69         ajaxMrwSet('standard');
    69         ajaxMrwSet('standard');
    70       }
    70       }
    71       else
    71       else
    72       {
    72       {
    73         // FIXME: l10n
       
    74         install_unset_ajax_loading();
    73         install_unset_ajax_loading();
    75         new messagebox(MB_OK | MB_ICONSTOP, 'All tests failed', 'None of the URL handling tests worked; you may have problems using Enano on your server.');
    74         new messagebox(MB_OK | MB_ICONSTOP, $lang.get('website_msg_ajax_test_fail_title'), $lang.get('website_msg_ajax_test_fail_body'));
    76       }
    75       }
    77     }
    76     }
    78   }
    77   }
    79   function ajaxMrwSet(level)
    78   function ajaxMrwSet(level)
    80   {
    79   {
    86     document.getElementById('url_radio_shortened').checked = false;
    85     document.getElementById('url_radio_shortened').checked = false;
    87     document.getElementById('url_radio_standard').checked = false;
    86     document.getElementById('url_radio_standard').checked = false;
    88     document.getElementById('url_radio_' + level).checked = true;
    87     document.getElementById('url_radio_' + level).checked = true;
    89     document.getElementById('url_radio_' + level).focus();
    88     document.getElementById('url_radio_' + level).focus();
    90     
    89     
    91     // FIXME: l10n
       
    92     switch ( level )
    90     switch ( level )
    93     {
    91     {
    94       case 'rewrite':
    92       case 'rewrite':
    95         var str = 'The installer has detected that using rewritten URLs is the best level that will work.';
    93         var str = $lang.get('website_msg_bestmethod_rewrite');
    96         break;
    94         break;
    97       case 'shortened':
    95       case 'shortened':
    98         var str = 'The installer has detected that using shortened URLs is the best level that will work.';
    96         var str = $lang.get('website_msg_bestmethod_shortened');
    99         break;
    97         break;
   100       case 'standard':
    98       case 'standard':
   101         var str = 'The installer has detected that using standard URLs is the only level that will work.';
    99         var str = $lang.get('website_msg_bestmethod_standard');
   102         break;
   100         break;
   103     }
   101     }
   104     document.getElementById('mrw_report').className = 'info-box-mini';
   102     document.getElementById('mrw_report').className = 'info-box-mini';
   105     document.getElementById('mrw_report').innerHTML = str;
   103     document.getElementById('mrw_report').innerHTML = str;
   106   }
   104   }
   151   
   149   
   152   <table border="0" cellspacing="0" cellpadding="10">
   150   <table border="0" cellspacing="0" cellpadding="10">
   153   
   151   
   154     <tr>
   152     <tr>
   155       <td>
   153       <td>
   156         <b>Pick a name</b><br />
   154         <b><?php echo $lang->get('website_field_name'); ?></b><br />
   157         <span id="hint_site_name" class="fieldtip">Now for the fun part - it's time to name your website. Try to pick something that doesn't include any special characters, since this can make project-page URLs look botched.</span>
   155         <span id="hint_site_name" class="fieldtip"><?php echo $lang->get('website_field_name_hint'); ?></span>
   158       </td>
   156       </td>
   159       <td style="width: 50%;">
   157       <td style="width: 50%;">
   160         <input type="text" name="site_name" size="50" tabindex="1" />
   158         <input type="text" name="site_name" size="50" tabindex="1" />
   161       </td>
   159       </td>
   162     </tr>
   160     </tr>
   163     
   161     
   164     <tr>
   162     <tr>
   165       <td>
   163       <td>
   166         <b>Enter a short description</b><br />
   164         <b><?php echo $lang->get('website_field_desc'); ?></b><br />
   167         <span id="hint_site_desc" class="fieldtip">Here you should enter a very short description of your site. Sometimes this is a slogan or, depending on the theme you've chosen, a set of keywords that can go into a META description tag.</span>
   165         <span id="hint_site_desc" class="fieldtip"><?php echo $lang->get('website_field_desc_hint'); ?></span>
   168       </td>
   166       </td>
   169       <td>
   167       <td>
   170         <input type="text" name="site_desc" size="50" tabindex="2" />
   168         <input type="text" name="site_desc" size="50" tabindex="2" />
   171       </td>
   169       </td>
   172     </tr>
   170     </tr>
   173     
   171     
   174     <tr>
   172     <tr>
   175       <td>
   173       <td>
   176         <b>Copyright info</b><br />
   174         <b><?php echo $lang->get('website_field_copyright'); ?></b><br />
   177         <span id="hint_copyright" class="fieldtip">The text you enter here will be shown at the bottom of most pages. Typically this is where a copyright notice would go. Keep it short and sweet; you can use <a href="http://docs.enanocms.org/Help:3.1">internal links</a> to link to project pages you'll create later.</span>
   175         <span id="hint_copyright" class="fieldtip"><?php echo $lang->get('website_field_copyright_hint'); ?></span>
   178       </td>
   176       </td>
   179       <td>
   177       <td>
   180         <input type="text" name="copyright" size="50" tabindex="3" />
   178         <input type="text" name="copyright" size="50" tabindex="3" />
   181       </td>
   179       </td>
   182     </tr>
   180     </tr>
   183     
   181     
   184     <tr>
   182     <tr>
   185       <td valign="top">
   183       <td valign="top">
   186         <b>URL formatting</b><br />
   184         <b><?php echo $lang->get('website_field_urlscheme'); ?></b><br />
   187         This lets you choose how URLs within your site will be formatted. If the setting you pick doesn't work, you can change it by editing config.php after installation.
   185         <?php echo $lang->get('website_field_urlscheme_hint'); ?>
   188       </td>
   186       </td>
   189       <td>
   187       <td>
   190       
   188       
   191         <table border="0" cellpadding="10" cellspacing="0">
   189         <table border="0" cellpadding="10" cellspacing="0">
   192           <tr>
   190           <tr>
   193             <td valign="top">
   191             <td valign="top">
   194               <input type="radio" name="url_scheme" value="standard" id="url_radio_standard" tabindex="5" />
   192               <input type="radio" name="url_scheme" value="standard" id="url_radio_standard" tabindex="5" />
   195             </td>
   193             </td>
   196             <td>
   194             <td>
   197               <label for="url_radio_standard">
   195               <label for="url_radio_standard">
   198                 <b>Standard URLs</b>
   196                 <b><?php echo $lang->get('website_field_urlscheme_opt_standard'); ?></b>
   199               </label>
   197               </label>
   200               <span class="fieldtip" id="hint_url_scheme_standard">
   198               <span class="fieldtip" id="hint_url_scheme_standard">
   201                 <p>Compatible with all servers. This is the default option and should be used unless you're sure that one of the other options below.</p>
   199                 <p><?php echo $lang->get('website_field_urlscheme_opt_standard_hint'); ?></p>
   202                 <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'index.php?title=Page'; ?></tt></small></p>
   200                 <p><small><b><?php echo $lang->get('website_field_urlscheme_lbl_example'); ?></b> <tt><?php echo $scriptpath_full . 'index.php?title=Page'; ?></tt></small></p>
   203               </span>
   201               </span>
   204             </td>
   202             </td>
   205           </tr>
   203           </tr>
   206         </table>
   204         </table>
   207         
   205         
   210             <td valign="top">
   208             <td valign="top">
   211               <input type="radio" checked="checked" name="url_scheme" value="shortened" id="url_radio_shortened" tabindex="5" />
   209               <input type="radio" checked="checked" name="url_scheme" value="shortened" id="url_radio_shortened" tabindex="5" />
   212             </td>
   210             </td>
   213             <td>
   211             <td>
   214               <label for="url_radio_shortened">
   212               <label for="url_radio_shortened">
   215                 <b>Shortened URLs</b>
   213                 <b><?php echo $lang->get('website_field_urlscheme_opt_shortened'); ?></b>
   216               </label>
   214               </label>
   217               <span class="fieldtip" id="hint_url_scheme_shortened">
   215               <span class="fieldtip" id="hint_url_scheme_shortened">
   218                 <p>This eliminates the "?title=" portion of your URL, and instead uses a slash. This is occasionally more friendly to search engines.</p>
   216                 <p><?php echo $lang->get('website_field_urlscheme_opt_shortened_hint'); ?></p>
   219                 <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'index.php/Page'; ?></tt></small></p>
   217                 <p><small><b><?php echo $lang->get('website_field_urlscheme_lbl_example'); ?></b> <tt><?php echo $scriptpath_full . 'index.php/Page'; ?></tt></small></p>
   220               </span>
   218               </span>
   221             </td>
   219             </td>
   222           </tr>
   220           </tr>
   223         </table>
   221         </table>
   224         
   222         
   227             <td valign="top">
   225             <td valign="top">
   228               <input type="radio" name="url_scheme" value="rewrite" id="url_radio_rewrite" tabindex="5" />
   226               <input type="radio" name="url_scheme" value="rewrite" id="url_radio_rewrite" tabindex="5" />
   229             </td>
   227             </td>
   230             <td>
   228             <td>
   231               <label for="url_radio_rewrite">
   229               <label for="url_radio_rewrite">
   232                 <b>Rewritten URLs</b>
   230                 <b><?php echo $lang->get('website_field_urlscheme_opt_rewrite'); ?></b>
   233               </label>
   231               </label>
   234               <span id="hint_url_scheme_rewrite" class="fieldtip">
   232               <span id="hint_url_scheme_rewrite" class="fieldtip">
   235                 <p>Using this option, you can completely eliminate the "index.php" from URLs. This is the most friendly option to search engines and looks very professional, but requires support for URL rewriting on your server. If you're running Apache and have the right permissions, Enano can configure this automatically. Otherwise, you'll need to configure your server manually and have a knowledge of regular expressions for this option to work.</p>
   233                 <p><?php echo $lang->get('website_field_urlscheme_opt_rewrite_hint'); ?></p>
   236                 <p><small><b>Example:</b> <tt><?php echo $scriptpath_full . 'Page'; ?></tt></small></p>
   234                 <p><small><b><?php echo $lang->get('website_field_urlscheme_lbl_example'); ?></b> <tt><?php echo $scriptpath_full . 'Page'; ?></tt></small></p>
   237               </span>
   235               </span>
   238             </td>
   236             </td>
   239           </tr>
   237           </tr>
   240         </table>
   238         </table>
   241         
   239         
   242         <p>
   240         <p>
   243           <a href="#mrw_scan" onclick="ajaxMrwTest(); return false;" tabindex="4">Auto-detect the best formatting scheme</a>
   241           <a href="#mrw_scan" onclick="ajaxMrwTest(); return false;" tabindex="4"><?php echo $lang->get('website_btn_urlscheme_detect'); ?></a>
   244         </p>
   242         </p>
   245         
   243         
   246         <div id="mrw_report"></div>
   244         <div id="mrw_report"></div>
   247         
   245         
   248       </td>
   246       </td>