1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Issue #6: Remove and optimize (hardcoded) LANS

This commit is contained in:
Lóna Lore
2015-05-02 16:27:01 +02:00
parent 4296e9d7a9
commit 9d4e934877
6 changed files with 86 additions and 45 deletions

View File

@@ -192,7 +192,7 @@ class notify_config
}
$text .= "</table>";
$caption = str_replace("_menu","",ucfirst($k))." Events"; //TODO LAN
$caption = str_replace("_menu","",ucfirst($k))." ".LAN_NOTIFY_01;
$tab[] = array('caption'=>$caption, 'text' => $text);
}

View File

@@ -374,27 +374,27 @@ $text .= "<div class='field-spacer'>".$tp->parseTemplate("{IMAGESELECTOR={$parms
$sLogo = siteinfo_shortcodes::sc_logo();
*/
$text .= $frm->imagepicker('sitebutton',$pref['sitebutton'],'','help=Used by Facebook and others. Should be a square image of at least 144px in width and height.');
$text .= $frm->imagepicker('sitebutton',$pref['sitebutton'],'','help='.PRFLAN_225);
$text .= "
</td>
</tr>
<tr>
<td><label for='sitelogo'>".PRFLAN_214."</label></td>
<td>".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','help=Used by some themes as the header image on some pages.')."</td>
<td>".$frm->imagepicker('sitelogo',$pref['sitelogo'],'','help='.PRFLAN_226)."</td>
</tr>
<tr>
<td><label for='sitetag'>".PRFLAN_5."</label></td>
<td>
".$frm->textarea('sitetag', $tp->toForm($pref['sitetag']), 3, 59)."
<div class='field-help'>Used by some themes. Place 'SITETAG' in your theme to use this value.</div>
<div class='field-help'>".PRFLAN_227."</div>
</td>
</tr>
<tr>
<td><label for='sitedescription'>".PRFLAN_6."</label></td>
<td>
".$frm->textarea('sitedescription', $tp->toForm($pref['sitedescription']), 3, 80)."
<div class='field-help'>Used by some themes. Place 'SITEDESCRIPTION' in your theme to use this value.</div>
<div class='field-help'>".PRFLAN_228."</div>
</td>
</tr>
@@ -402,7 +402,7 @@ $text .= "
<td><label for='sitedisclaimer'>".PRFLAN_9."</label></td>
<td>
".$frm->textarea('sitedisclaimer',$tp->toForm( $pref['sitedisclaimer']), 3, 80)."
<div class='field-help'>Used by some themes. Place 'SITEDISCLAIMER' in your theme to use this value.</div>
<div class='field-help'>".PRFLAN_229."</div>
</td>
</tr>
</tbody>
@@ -803,11 +803,10 @@ $text .= "
// TODO LAN
$text .= "
<tr>
<td><label for='inputdate'>Date/Time Input-Field format</label></td>
<td><label for='inputdate'>".PRFLAN_230."</label></td>
<td>
".$frm->select('inputdate',$inputdate, e107::getPref('inputdate'));
@@ -1527,7 +1526,6 @@ $text .= "
// Key registration
// TODO LAN
@@ -1547,13 +1545,13 @@ $text .= "
$signup_option_names = array(
// "signup_option_loginname" => "Login Name",
"signup_option_email_confirm" => "Email Confirmation",
"signup_option_email_confirm" => CUSTSIG_21,
"signup_option_realname" => CUSTSIG_2,
"signup_option_signature" => CUSTSIG_6,
"signup_option_image" => CUSTSIG_7,
"signup_option_class" => CUSTSIG_17,
'signup_option_customtitle' => CUSTSIG_20,
'signup_option_hideemail' => 'Option to hide email'
'signup_option_hideemail' => CUSTSIG_22
);
foreach($signup_option_names as $value => $key)
@@ -2006,10 +2004,10 @@ $text .= "
</td>
</tr>
<tr>
<td><label for='failed-login-limit'>Maximum failed logins before ban:</label></td>
<td><label for='failed-login-limit'>".PRFLAN_231."</label></td>
<td>
".$frm->number('failed_login_limit', varset($pref['failed_login_limit'],10), 3, array('max'=>10, 'min'=>0))."
<div class='smalltext field-help'>Failed logins from the same IP will be banned after this many attempts.</div>
<div class='smalltext field-help'>".PRFLAN_232."</div>
</td>
</tr>
<tr>
@@ -2074,22 +2072,22 @@ $text .= "
</tr>
<tr>
<td>Moderate Comments made by: </td>
<td>".PRFLAN_233."</td>
<td>
".
$frm->uc_select('comments_moderate', $pref['comments_moderate'],"nobody,guest,new,bots,public,admin,main,classes").
"
<div class='field-help'>Comments will require manual approval by an admin prior to being visible to other users</div>
<div class='field-help'>".PRFLAN_234."</div>
</td>
</tr>
<tr>
<td>Comment Sorting: </td>
<td>".PRFLAN_235."</td>
<td>";
$comment_sort = array(
"desc" => "Most recent comments first", //default //TODO LAN
'asc' => "Most recent comments last"
"desc" => PRFLAN_236, //default
'asc' => PRFLAN_237
);
$text .= $frm->select('comments_sort',$comment_sort, $pref['comments_moderate'])."
@@ -2132,7 +2130,7 @@ $text .= "
$text .= "
<fieldset class='e-hideme' id='core-prefs-uploads'>
<legend>File Uploading</legend>";
<legend>".PRFLAN_238."</legend>";
$upload_max_filesize = ini_get('upload_max_filesize');
@@ -2143,7 +2141,7 @@ $text .= "
if($maxINI < $pref['upload_maxfilesize'])
{
$text .= "<div class='alert-block alert alert-danger'>";
$text .= "The maximum upload size imposed by your php.ini settings is: ".$maxINI."</div>";
$text .= PRFLAN_239." ".$maxINI."</div>";
$pref['upload_maxfilesize'] = $maxINI;
}
@@ -2183,7 +2181,7 @@ $text .= "
<div class='field-help'>".UPLLAN_38."</div>
</td>
</tr>
<tr><td>Filetype upload limits</td>
<tr><td>".PRFLAN_240."</td>
<td>
<table class='table table-striped table-bordered'>
@@ -2207,7 +2205,7 @@ $text .= "
$text .= "</table>
<div>** For security reasons these values may only be changed manually in the following file: <b>".str_replace("../",'',e_SYSTEM).e_READ_FILETYPES."</b></div>
<div>".PRFLAN_241." <b>".str_replace("../",'',e_SYSTEM).e_READ_FILETYPES."</b></div>
</td>
@@ -2225,10 +2223,9 @@ $text .= "
// Javascript Control
//TODO LANS
$text .= "
<fieldset class='e-hideme' id='core-prefs-javascript'>
<legend>Javascript Frameworks (for testing purposes only)</legend>
<legend>".PRFLAN_242."</legend>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -2237,11 +2234,11 @@ $text .= "
<tbody>";
$js_options = array(
'auto' => 'Auto (on-demand)', // load based on dependency
'admin' => 'Admin Area', // Always load in admin
'front' => 'Front-End', // Always load in front-end
'all' => "Both", // Always load in admin and front-end
'none' => 'Disabled' // disabled
'auto' => PRFLAN_243, // load based on dependency
'admin' => PRFLAN_244, // Always load in admin
'front' => PRFLAN_245, // Always load in front-end
'all' => PRFLAN_246, // Always load in admin and front-end
'none' => PRFLAN_247 // disabled
);
@@ -2281,31 +2278,31 @@ $text .= "
</colgroup>
<tbody>
<tr>
<td>Disable scripts consolidation</td>
<td>".PRFLAN_248."</td>
<td>
".$frm->radio_switch('e_jslib_nocombine', $pref['e_jslib_nocombine'], LAN_YES, LAN_NO)."
<div class='smalltext field-help'>If disabled, scripts will be loaded in one consolidated file</div>
<div class='smalltext field-help'>".PRFLAN_249."</div>
</td>
</tr>
<tr>
<td>Enable consolidated scripts zlib compression:</td>
<td>".PRFLAN_250."</td>
<td>
".$frm->radio_switch('e_jslib_gzip', $pref['e_jslib_gzip'], LAN_YES, LAN_NO)."
<div class='smalltext field-help'>Used only when script consolidation is enabled</div>
<div class='smalltext field-help'>".PRFLAN_251."</div>
</td>
</tr>
<tr>
<td>Disable consolidated scripts server cache:</td>
<td>".PRFLAN_252."</td>
<td>
".$frm->radio_switch('e_jslib_nocache', $pref['e_jslib_nocache'], LAN_YES, LAN_NO)."
<div class='smalltext field-help'>Used only when script consolidation is enabled</div>
<div class='smalltext field-help'>".PRFLAN_251."</div>
</td>
</tr>
<tr>
<td>Disable consolidated scripts browser cache:</td>
<td>".PRFLAN_253."</td>
<td>
".$frm->radio_switch('e_jslib_nobcache', $pref['e_jslib_nobcache'], LAN_YES, LAN_NO)."
<div class='smalltext field-help'>Used only when script consolidation is enabled</div>
<div class='smalltext field-help'>".PRFLAN_251."</div>
</td>
</tr>
";
@@ -2447,22 +2444,22 @@ function pref_submit($post_id = '')
function prefs_adminmenu()
{
$var['core-prefs-main']['text'] = PRFLAN_1;
$var['core-prefs-email']['text'] = "Email &amp; Contact Info";
$var['core-prefs-email']['text'] = PRFLAN_254;
$var['core-prefs-registration']['text'] = PRFLAN_28;
$var['core-prefs-signup']['text'] = PRFLAN_19;
// $var['core-prefs-sociallogin']['text'] = "Social Options"; // Moved into plugin.
$var['core-prefs-comments']['text'] = PRFLAN_210;
$var['core-prefs-uploads']['text'] = "File Uploading"; // TODO LAN
$var['core-prefs-uploads']['text'] = PRFLAN_255;
$var['core-prefs-header1']['header'] = "Advanced Options";
$var['core-prefs-header1']['header'] = PRFLAN_256;
$var['core-prefs-display']['text'] = PRFLAN_13;
$var['core-prefs-admindisp']['text'] = PRFLAN_77;
$var['core-prefs-textpost']['text'] = PRFLAN_101;
$var['core-prefs-security']['text'] = PRFLAN_47;
$var['core-prefs-date']['text'] = PRFLAN_21;
$var['core-prefs-javascript']['text'] = "Javascript Framework"; // TODO LAN
$var['core-prefs-javascript']['text'] = PRFLAN_257;
$var['core-prefs-advanced']['text'] = PRFLAN_149;
e107::getNav()->admin("Basic ".LAN_OPTIONS.'--id--prev_nav', 'core-prefs-main', $var);

View File

@@ -781,11 +781,10 @@ function update_706_to_800($type='')
}
}
}
//TODO LAN
if(count($chgPath))
{
$log->addWarning('Before continuing, please manually delete the following outdated folders from your system: ');
$log->addWarning(LAN_UPDATE_57.' ');
array_unique($chgPath);
asort($chgPath);
foreach($chgPath as $cgp)

View File

@@ -54,6 +54,8 @@ define('LAN_UPDATE_54', 'Missing table --TABLE-- - cannot add index --INDEX--');
define('LAN_UPDATE_55', 'Description');
define('LAN_UPDATE_56', 'System Update');
define('LAN_UPDATE_57', 'Before continuing, please manually delete the following outdated folders from your system:');
define('LAN_UPDATE_CAPTION_PLUGIN', 'Plugin Updates'); // Unused
define('LAN_UPDATE_CAPTION_CORE', 'Core Updates'); // Unused

View File

@@ -34,4 +34,6 @@ define('NM_LAN_2', 'Bulk email run complete');
define("NF_LAN_1", "File Events");
define("NF_LAN_2", "File uploaded by user");
define("LAN_NOTIFY_01", "Events");
?>

View File

@@ -88,6 +88,8 @@ define("CUSTSIG_17", "Subscribe to content/mailouts");
define("CUSTSIG_18", "Disallow usernames");
define("CUSTSIG_19", "usernames containing the following text will be rejected, separate entries by commas");
define("CUSTSIG_20", "User Custom Title");
define("CUSTSIG_21", "Email Confirmation");
define("CUSTSIG_22", "Option to hide email");
define("PRFLAN_91", "If someone is attacking your site by multiple requests to your server, his IP will be automatically banned ! Best done with server config if possible!!!");
define("PRFLAN_92", "Secure signup verification -- hide password in email?");
@@ -232,4 +234,43 @@ define("PRFLAN_223", "Completely Automated Public Turing test to tell Computers
define("PRFLAN_224", "User registration system");
define("PRFLAN_225", "Used by Facebook and others. Should be a square image of at least 144px in width and height.");
define("PRFLAN_226", "Used by some themes as the header image on some pages.");
define("PRFLAN_227", "Used by some themes. Place 'SITETAG' in your theme to use this value.");
define("PRFLAN_228", "Used by some themes. Place 'SITEDESCRIPTION' in your theme to use this value.");
define("PRFLAN_229", "Used by some themes. Place 'SITEDISCLAIMER' in your theme to use this value.");
define("PRFLAN_230", "Date/Time Input-Field format");
define("PRFLAN_231", "Maximum failed logins before ban:");
define("PRFLAN_232", "Failed logins from the same IP will be banned after this many attempts.");
define("PRFLAN_233", "Moderate Comments made by:");
define("PRFLAN_234", "Comments will require manual approval by an admin prior to being visible to other users");
define("PRFLAN_235", "Comment Sorting:");
define("PRFLAN_236", "Most recent comments first");
define("PRFLAN_237", "Most recent comments last");
define("PRFLAN_238", "File Uploading");
define("PRFLAN_239", "The maximum upload size imposed by your php.ini settings is:");
define("PRFLAN_240", "Filetype upload limits");
define("PRFLAN_241", "** For security reasons these values may only be changed manually in the following file:");
define("PRFLAN_242", "Javascript Frameworks (for testing purposes only)");
define("PRFLAN_243", "Auto (on-demand)");
define("PRFLAN_244", "Admin Area");
define("PRFLAN_245", "Front-End");
define("PRFLAN_246", "Both");
define("PRFLAN_247", "Disabled");
define("PRFLAN_248", "Disable scripts consolidation");
define("PRFLAN_249", "If disabled, scripts will be loaded in one consolidated file");
define("PRFLAN_250", "Enable consolidated scripts zlib compression:");
define("PRFLAN_251", "Used only when script consolidation is enabled");
define("PRFLAN_252", "Disable consolidated scripts server cache:");
define("PRFLAN_253", "Disable consolidated scripts browser cache:");
define("PRFLAN_254", "Email &amp; Contact Info");
define("PRFLAN_255", "File Uploading");
define("PRFLAN_256", "Advanced Options");
define("PRFLAN_257", "Javascript Framework");
?>