diff --git a/e107_admin/lancheck.php b/e107_admin/lancheck.php index 4c6604e9c..f2ae64dca 100644 --- a/e107_admin/lancheck.php +++ b/e107_admin/lancheck.php @@ -312,7 +312,7 @@ class lancheck private $thirdPartyPlugins = true; - + private $deprecatedFiles = array('lan_download.php', 'lan_parser_functions.php', 'lan_prefs.php', 'admin/lan_download.php', 'admin/lan_modcomment.php'); function __construct() @@ -475,7 +475,7 @@ class lancheck if($status['error']==FALSE) { $text = $status['message']."
"; - $text .= share($status['file']); + $text .= $this->share($status['file']); $mes->addSuccess($text); //$ns->tablerender(LAN_CREATED, $text ); } @@ -491,6 +491,73 @@ class lancheck + /** + * Share Language File + * @param object $newfile + * Usage of e107 is granted to you provided that this function is not modified or removed in any way. + * @return + */ + private function share($newfile) + { + global $pref; + + if(!$newfile || E107_DEBUG_LEVEL > 0) + { + return; + } + + global $tp; + $full_link = $tp->createConstants($newfile); + + $email_message = "
Site: ".SITENAME." +
User: ".USERNAME."\n +
Email: ".USEREMAIL."\n +
Language: ".$_POST['language']."\n +
IP:".USERIP." +
...would like to contribute the following language pack for e107. (see attached)
: + + +
Missing Files: ".$_SESSION['lancheck'][$_POST['language']]['file']." +
Bom Errors : ".$_SESSION['lancheck'][$_POST['language']]['bom']." +
UTF Errors : ".$_SESSION['lancheck'][$_POST['language']]['utf']." +
Definition Errors : ".$_SESSION['lancheck'][$_POST['language']]['def']." +
Total Errors: ".$_SESSION['lancheck'][$_POST['language']]['total']." +
+
XML file: ".$_SESSION['lancheck'][$_POST['language']]['xml']; + + + + require_once(e_HANDLER."mail.php"); + + $send_to = (!$_POST['contribute_pack']) ? "languagepacks@e107inc.org" : "certifiedpack@e107inc.org"; + $to_name = "e107 Inc."; + $Cc = ""; + $Bcc = ""; + $returnpath=''; + $returnreceipt=''; + $inline =""; + + $subject = (!$_POST['contribute_pack']) ? "[0.7 LanguagePack] " : "[0.7 Certified LanguagePack] "; + $subject .= basename($newfile); + + if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline)) + { + $text = "
"; + $text .= defined('LANG_LAN_EML') ? "".LANG_LAN_EML."" : "There was a problem sending the language-pack. Please email your verified language pack to:"; + $text .= " ".$send_to.""; + $text .= "
"; + + return $text; + } + elseif($_POST['contribute_pack']) + { + return "
Pack Sent to e107 Inc. A confirmation email will be sent to ".$pref['siteadminemail']." once it is received.
Please also make sure that email coming from ".$send_to." is not blocked by your spam filter.
"; + } + + + + } + /** * @param $language @@ -1098,10 +1165,11 @@ class lancheck $diz .= "| e107 website content management system ".$lan." Language File\n"; $diz .= "| Released under the terms and conditions of the\n"; $diz .= "| GNU General Public License (http://gnu.org).\n"; + $diz .= "| Last Modified: ".date("Y/m/d H:i:s")."\n"; $diz .= "|\n"; - $diz .= "| ".chr(36)."URL: $writeit ".chr(36)."\n"; - $diz .= "| ".chr(36)."Revision: 1.0 ".chr(36)."\n"; - $diz .= "| ".chr(36)."Id: ".date("Y/m/d H:i:s")." ".chr(36)."\n"; + // $diz .= "| ".chr(36)."URL: $writeit ".chr(36)."\n"; + // $diz .= "| ".chr(36)."Revision: 1.0 ".chr(36)."\n"; + // $diz .= "| ".chr(36)."Id: ".date("Y/m/d H:i:s")." ".chr(36)."\n"; $diz .= "| ".chr(36)."Author: ".USERNAME." ".chr(36)."\n"; $diz .= "+---------------------------------------------------------------+\n"; $diz .= "*".chr(47)."\n\n"; @@ -1436,13 +1504,27 @@ class lancheck $fl = e107::getFile(); + $tp = e107::getParser(); $ret = array(); if($lang_array = $fl->get_files($comp_dir, ".php$","standard",$depth)){ sort($lang_array); } - + + foreach($lang_array as $k=> $f) + { + $path = str_replace(e_LANGUAGEDIR.e_LANGUAGE."/", "", $f['path'].$f['fname']); + + if(in_array($path, $this->deprecatedFiles)) + { + unset($lang_array[$k]); + } + } + + + + if(strpos($comp_dir,e_LANGUAGEDIR) !== false) { $regexp = "#.php#"; @@ -1518,7 +1600,10 @@ class lancheck } } - + + + + return $ret; } @@ -1625,7 +1710,17 @@ class lancheck // $text .= " "; - $text .= "".LAN_EDIT." "; + $parms = $_GET; + $parms['sub'] = 'edit'; + $parms['file'] = $comp_dir."/languages/".$lnk; + $parms['lan'] = $this->transLanguage; + $parms['iframe'] = 1; + $parms['type'] = $mode; + + $editUrl = e_REQUEST_SELF."?".http_build_query($parms,'&'); + + $text .= "".LAN_EDIT." "; // href='".e_REQUEST_URI."&f=".$comp_dir."/languages/".$lnk."&lan=".$target_lan."&type={$mode}' + // ".LAN_EDIT.""; $text .=""; diff --git a/e107_admin/language.php b/e107_admin/language.php index 9164e4332..9e74d7209 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -792,73 +792,6 @@ if (isset($_POST['create_tables']) && $_POST['language']) -/** - * Share Language File - * @param object $newfile - * Usage of e107 is granted to you provided that this function is not modified or removed in any way. - * @return - */ -function share($newfile) -{ - global $pref; - - if(!$newfile || E107_DEBUG_LEVEL > 0) - { - return; - } - - global $tp; - $full_link = $tp->createConstants($newfile); - - $email_message = "
Site: ".SITENAME." -
User: ".USERNAME."\n -
Email: ".USEREMAIL."\n -
Language: ".$_POST['language']."\n -
IP:".USERIP." -
...would like to contribute the following language pack for e107. (see attached)
: - - -
Missing Files: ".$_SESSION['lancheck'][$_POST['language']]['file']." -
Bom Errors : ".$_SESSION['lancheck'][$_POST['language']]['bom']." -
UTF Errors : ".$_SESSION['lancheck'][$_POST['language']]['utf']." -
Definition Errors : ".$_SESSION['lancheck'][$_POST['language']]['def']." -
Total Errors: ".$_SESSION['lancheck'][$_POST['language']]['total']." -
-
XML file: ".$_SESSION['lancheck'][$_POST['language']]['xml']; - - - - require_once(e_HANDLER."mail.php"); - - $send_to = (!$_POST['contribute_pack']) ? "languagepacks@e107inc.org" : "certifiedpack@e107inc.org"; - $to_name = "e107 Inc."; - $Cc = ""; - $Bcc = ""; - $returnpath=''; - $returnreceipt=''; - $inline =""; - - $subject = (!$_POST['contribute_pack']) ? "[0.7 LanguagePack] " : "[0.7 Certified LanguagePack] "; - $subject .= basename($newfile); - - if(!@sendemail($send_to, $subject, $email_message, $to_name, '', '', $newfile, $Cc, $Bcc, $returnpath, $returnreceipt,$inline)) - { - $text = "
"; - $text .= defined('LANG_LAN_EML') ? "".LANG_LAN_EML."" : "There was a problem sending the language-pack. Please email your verified language pack to:"; - $text .= " ".$send_to.""; - $text .= "
"; - - return $text; - } - elseif($_POST['contribute_pack']) - { - return "
Pack Sent to e107 Inc. A confirmation email will be sent to ".$pref['siteadminemail']." once it is received.
Please also make sure that email coming from ".$send_to." is not blocked by your spam filter.
"; - } - - - -} - diff --git a/e107_languages/English/lan_installer.php b/e107_languages/English/lan_installer.php index 4a8e76759..c44c59bc5 100644 --- a/e107_languages/English/lan_installer.php +++ b/e107_languages/English/lan_installer.php @@ -74,7 +74,7 @@ define("LANINS_049", "The two passwords you entered are not the same. Please go define("LANINS_050", "XML Extension"); define("LANINS_051", "Installed"); define("LANINS_052", "Not Installed"); -define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [link=http://php.net/manual/en/ref.xml.php]php.net[/link] before continuing"); +define("LANINS_053", "e107 v2.x requires the PHP XML Extension to be installed. Please contact your host or read the information at [x] before continuing"); // define("LANINS_054", " before continuing"); define("LANINS_055", "Install Confirmation"); define("LANINS_056", "6"); diff --git a/e107_plugins/download/languages/English/English_front.php b/e107_plugins/download/languages/English/English_front.php index 9f8c3395d..bd304436b 100644 --- a/e107_plugins/download/languages/English/English_front.php +++ b/e107_plugins/download/languages/English/English_front.php @@ -64,7 +64,7 @@ define("LAN_dl_51", "Reporting download: "); //define("LAN_dl_52", "Guest");//LAN_GUEST define("LAN_dl_53", "Click to view download"); define("LAN_dl_54", "An administrator will be made aware of this download, please leave a message if you feel it necessary."); -define("LAN_dl_55", "Do not use this form to contact the admin for any other reason."); +define("LAN_dl_55", "Do not use this form to contact the admin for any other reason."); // define("LAN_dl_56", "Report broken download"); already defined above. define("LAN_dl_57", "reported by"); define("LAN_dl_58", "The following download has been reported as broken from site"); @@ -93,6 +93,6 @@ define("LAN_dl_75", "no image available "); //define("LAN_dl_76", "Go to page"); //FIXME Use Generic define("LAN_dl_77", "Downloads"); // Intentional duplicate - some languages need it to be different. This is for number of downloads -define('LAN_dl_78', "That download has been disabled or discontinued. Please check in the [link=--LINK--]downloads area[/link] for a more recent version."); +define('LAN_dl_78', "That download has been disabled or discontinued. Please check in the [downloads area] for a more recent version."); ?> diff --git a/e107_plugins/download/request.php b/e107_plugins/download/request.php index 0ed55422f..3968da1c8 100644 --- a/e107_plugins/download/request.php +++ b/e107_plugins/download/request.php @@ -138,10 +138,13 @@ if ($type == "file") if (check_class($row['download_category_class']) && check_class($row['download_class'])) { - if ($row['download_active'] == 0) - { // Inactive download - don't allow + if ($row['download_active'] == 0) // Inactive download - don't allow + { require_once(HEADERF); - $ns->tablerender(LAN_ERROR, "
".str_replace('--LINK--',e_HTTP.'download.php',LAN_dl_78).'
'); + $search = array("[","]"); + $replace = array("", ""); + + $ns->tablerender(LAN_ERROR, "
".str_replace($search, $replace, LAN_dl_78).'
'); require_once(FOOTERF); exit(); } diff --git a/e107_plugins/online/languages/English.php b/e107_plugins/online/languages/English.php index 8fe9c5fc3..a4c5dde9e 100644 --- a/e107_plugins/online/languages/English.php +++ b/e107_plugins/online/languages/English.php @@ -18,7 +18,7 @@ define("LAN_LASTSEEN_1", "Last Seen Menu"); //online -define('LAN_ONLINE_TRACKING_MESSAGE', "Online user tracking is currently disabled, please enable it [link=".e_ADMIN."users.php?options]here[/link][br]"); +define('LAN_ONLINE_TRACKING_MESSAGE', "Online user tracking is currently disabled, please enable it [here]"); define("LAN_ONLINE_1", "Guests: "); define("LAN_ONLINE_2", "Members: "); define("LAN_ONLINE_3", "On this page: "); diff --git a/e107_plugins/online/online_shortcodes.php b/e107_plugins/online/online_shortcodes.php index 3d640e03e..74bb0b575 100644 --- a/e107_plugins/online/online_shortcodes.php +++ b/e107_plugins/online/online_shortcodes.php @@ -48,7 +48,14 @@ class online_shortcodes function sc_online_tracking_disabled() { - return e107::getParser()->toHTML(LAN_ONLINE_TRACKING_MESSAGE,TRUE); + $url = e_ADMIN."users.php?mode=main&action=prefs"; + + $srch = array("[","]"); + $repl = array("", ""); + + $message = str_replace($srch,$repl, LAN_ONLINE_TRACKING_MESSAGE); + return e107::getParser()->toHTML($message, true); + } diff --git a/install.php b/install.php index 115802d66..9b74ed2d2 100644 --- a/install.php +++ b/install.php @@ -840,7 +840,9 @@ class e_install $PHPColor = ($version_fail == false) ? "text-success" : "text-error"; $xmlColor = ($xml_installed == true) ? "text-success" : "text-error"; $mysqlColor = ($mysql_pass == true) ? "text-success" : "text-error"; - + + $xmlExtensionLink = "php.net"; + $output = " @@ -864,7 +866,7 @@ class e_install - +
".LANINS_050." ".($xml_installed ? LANINS_051 : LANINS_052)."".($xml_installed ? " ".LANINS_017 : LANINS_053)."".($xml_installed ? " ".LANINS_017 : str_replace("[x]",$xmlExtensionLink, LANINS_053) )."
\n"; $this->finish_form();