diff --git a/e107_admin/admin_log.php b/e107_admin/admin_log.php index 5c2f2c88a..0b6599a1f 100644 --- a/e107_admin/admin_log.php +++ b/e107_admin/admin_log.php @@ -1112,7 +1112,7 @@ function headerjs() //add required core lan - delete confirm message (".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm'); - + "; return $ret; diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 2029cc290..c670ccf6d 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -203,7 +203,7 @@ class page_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'page_id' => array('title'=> 'ID', 'width'=>'5%', 'forced'=> TRUE), - 'page_title' => array('title'=> CUSLAN_1, 'type' => 'method', 'width'=>'auto'), + 'page_title' => array('title'=> LAN_TITLE, 'type' => 'method', 'width'=>'auto'), 'page_theme' => array('title'=> CUSLAN_2, 'type' => 'text', 'width' => 'auto','nolist'=>true), 'page_template' => array('title'=> 'Template', 'type' => 'text', 'width' => 'auto'), 'page_author' => array('title'=> LAN_AUTHOR, 'type' => 'user', 'width' => 'auto', 'thclass' => 'left'), @@ -936,7 +936,7 @@ class page $this->fields = array( 'page_id' => array('title'=> 'ID', 'width'=>'5%', 'forced'=> TRUE), - 'page_title' => array('title'=> CUSLAN_1, 'type' => 'text', 'width'=>'auto'), + 'page_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'width'=>'auto'), 'page_theme' => array('title'=> CUSLAN_2, 'type' => 'text', 'width' => 'auto','nolist'=>true), 'page_template' => array('title'=> 'Template', 'type' => 'text', 'width' => 'auto'), 'page_author' => array('title'=> LAN_AUTHOR, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left'), diff --git a/e107_admin/db.php b/e107_admin/db.php index 66ba8a2b0..cd89f6a9a 100644 --- a/e107_admin/db.php +++ b/e107_admin/db.php @@ -1450,30 +1450,4 @@ function verify_sql_record() // deprecated by db_verify.php ( i think). } - -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -function headerjs() -{ - require_once (e_HANDLER.'js_helper.php'); - $ret = " - - - "; - - return $ret; -} ?> \ No newline at end of file diff --git a/e107_admin/filemanager.php b/e107_admin/filemanager.php index 36b6f2a9f..352acd97f 100644 --- a/e107_admin/filemanager.php +++ b/e107_admin/filemanager.php @@ -451,31 +451,5 @@ function dirsize($dir) require_once("footer.php"); -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -function headerjs() -{ - require_once(e_HANDLER.'js_helper.php'); - $ret = " - - - "; - - return $ret; -} ?> \ No newline at end of file diff --git a/e107_admin/header.php b/e107_admin/header.php index 1ac4d440e..0d83a88ed 100644 --- a/e107_admin/header.php +++ b/e107_admin/header.php @@ -29,6 +29,9 @@ e107::getDb()->db_Mark_Time('(Header Top)'); e107::js('core', 'colorbox/jquery.colorbox-min.js', 'jquery', 2); e107::css('core', 'colorbox/colorbox.css', 'jquery'); +e107::js('core', 'fancybox/jquery.fancybox-1.3.4.js', 'jquery', 2); +e107::css('core', 'fancybox/jquery.fancybox-1.3.4.css', 'jquery'); + e107::js('core', 'jquery.elastic.js', 'jquery', 2); e107::js('core', 'jquery-ui-timepicker-addon.js', 'jquery', 2); @@ -58,6 +61,12 @@ e107::css('core', 'core/all.jquery.css', 'jquery'); e107::js("core", "core/admin.jquery.js","jquery",4); // Load all default functions. e107::js("core", "core/all.jquery.js","jquery",4); // Load all default functions. + + + +e107::js("core", "core/admin.js","prototype",3); // Load all default functions. + + // // *** Code sequence for headers *** // IMPORTANT: These items are in a carefully constructed order. DO NOT REARRANGE diff --git a/e107_admin/image.php b/e107_admin/image.php index 6626a67c3..28fb58513 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -1896,42 +1896,8 @@ if (isset($_POST['check_avatar_sizes'])) //Just in case... -if(!e_AJAX_REQUEST) require_once("footer.php"); +if(!e_AJAX_REQUEST) require_once("footer.php"); - - - - - - - - - - - - - - - -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -//function headerjs() -//{ -// require_once(e_HANDLER.'js_helper.php'); -// //FIXME - how exactly to auto-call JS lan? This and more should be solved in Stage II. -// $ret = " -// -// -// "; -// -// return $ret; -//} ?> \ No newline at end of file diff --git a/e107_admin/language.php b/e107_admin/language.php index b28c9c9ac..887c8a1e1 100644 --- a/e107_admin/language.php +++ b/e107_admin/language.php @@ -923,8 +923,11 @@ function unused($lanfile,$script) } $text .= ""; + + + $mes->addInfo("Pink is unused LAN"); - $ret['text'] = $text; + $ret['text'] = $mes->render().$text; $ret['caption'] = "Deprecated LAN Check (experimental!)"; return $ret; @@ -962,6 +965,9 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){ $commonPhrases = file_get_contents(e_LANGUAGEDIR."English/admin/lan_admin.php"); $commonLines = explode("\n",$commonPhrases); + $foundSimilar = FALSE; + $foundCommon = FALSE; + foreach($commonLines as $line) { if($match = getDefined($line)) @@ -974,12 +980,20 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){ // Check if a common phrases was used. foreach($ar as $def=>$common) { + similar_text($value, $common, $p); + if(strtoupper(trim($value)) == strtoupper($common)) { //$text .= "
$common
"; $foundCommon = TRUE; break; } + elseif($p > 55) + { + $foundSimilar = TRUE; + break; + } + $p = 0 ; } @@ -1021,9 +1035,24 @@ function compareit($needle,$haystack,$value='',$disabled=FALSE){ { $color = "background-color:yellow"; $disabled .= "
".$common." is a common phrase.
(Use ".$def." instead.)"; + // return "".$needle .$disabled. ""; } + + elseif($foundSimilar && $found && substr($def,0,4) == "LAN_") + { + $color = "background-color:#E9EAF2"; + $disabled .= " ".round($p)."% like ".$def." "; + // $disabled .= " " . $def.""; // $common; + } + + if($disabled == " (disabled)") + { + $color = "background-color:#DFFFDF"; + } + + return "".$needle .$disabled. "".$text.""; } diff --git a/e107_admin/menus.php b/e107_admin/menus.php index 9083219f5..372b35d63 100644 --- a/e107_admin/menus.php +++ b/e107_admin/menus.php @@ -139,111 +139,6 @@ require_once("footer.php"); // ----------------------------------------------------------------------- -function headerjs() -{ - return; - - global $sql,$pref,$men; - - if(!$men->dragDrop) - { - return; - } - - if(isset($_POST['custom_select'])) - { - $curLayout = $_POST['custom_select']; - } - else - { - $tmp = explode('.', e_QUERY); - $curLayout = ($tmp[1]) ? $tmp[1] : $pref['sitetheme_deflayout']; - } - $dbLayout = ($curLayout !=$pref['sitetheme_deflayout']) ? $curLayout : ""; - - - - if(strpos(e_QUERY, 'configure') !== FALSE ) - { - - //FIXME - proto/scripty already loaded, create and jsmanager handler - $ret = " - - - - - - - - - - - "; - } - - - /* this.options = { - editorEnabled : false, - portal : 'portal', - column : 'portal-column', - block : 'block', - content : 'content', - configElement : 'config', - configSave : 'save-button', - configCancel : 'cancel-button', - handle : 'handle', - hoverclass : false, - remove : 'block-remove', - config : 'block-config', - blocklist : 'portal-column-block-list', - blocklistlink : 'portal-block-list-link', - blocklisthandle : 'block-list-handle', - saveurl : false - } -*/ - - return $ret; -} - function menus_adminmenu() { diff --git a/e107_admin/users.php b/e107_admin/users.php index d9eee766b..ae83063f7 100644 --- a/e107_admin/users.php +++ b/e107_admin/users.php @@ -60,12 +60,6 @@ if (isset ($_POST['useraction']) && $_POST['useraction'] == 'usersettings') -function headerjs() -{ -// require_once (e_HANDLER.'js_helper.php'); -// return ""; -} - require_once (e_HANDLER.'message_handler.php'); $emessage = & eMessage :: getInstance(); diff --git a/e107_handlers/rate_class.php b/e107_handlers/rate_class.php index efd468008..09a3f5d7c 100644 --- a/e107_handlers/rate_class.php +++ b/e107_handlers/rate_class.php @@ -29,7 +29,7 @@ class rater { $hintArray = array(RATELAN_POOR,RATELAN_FAIR,RATELAN_GOOD,RATELAN_VERYGOOD,RATELAN_EXCELLENT); $datahint = implode(",",$hintArray); - $path = e_FILE_ABS."jslib/rate/img/"; + $path = e_WEB_JS."rate/img/"; $score = ($score / 2); // var_dump($readonly); diff --git a/e107_languages/English/admin/lan_cpage.php b/e107_languages/English/admin/lan_cpage.php index 5e074442d..0f4adb62b 100644 --- a/e107_languages/English/admin/lan_cpage.php +++ b/e107_languages/English/admin/lan_cpage.php @@ -6,10 +6,10 @@ * Admin Language File * */ -define("CUSLAN_1", "Title"); +// define("CUSLAN_1", "Title"); define("CUSLAN_2", "Type"); define("CUSLAN_3", "Search engine friendly string"); -define("CUSLAN_4", "Delete this item?"); +// define("CUSLAN_4", "Delete this item?"); define("CUSLAN_5", "Existing Pages"); define("CUSLAN_7", "Menu Name"); define("CUSLAN_8", "Title / Caption"); diff --git a/e107_plugins/banner/admin_banner.php b/e107_plugins/banner/admin_banner.php index 4ab21a66d..916f8d481 100644 --- a/e107_plugins/banner/admin_banner.php +++ b/e107_plugins/banner/admin_banner.php @@ -899,32 +899,6 @@ function banners_adminlog($msg_num='00', $woffle='') $admin_log->log_event('BANNER_'.$msg_num,$woffle,E_LOG_INFORMATIVE,''); } -/** - * Handle page DOM within the page header - * - * @return string JS source - */ -function headerjs() -{ - require_once(e_HANDLER.'js_helper.php'); - $ret = " - - - "; - - return $ret; -} ?> \ No newline at end of file diff --git a/e107_plugins/download/admin_download.php b/e107_plugins/download/admin_download.php index 7643a746d..337d9b1d0 100644 --- a/e107_plugins/download/admin_download.php +++ b/e107_plugins/download/admin_download.php @@ -36,11 +36,7 @@ require_once(e_HANDLER."calendar/calendar_class.php"); //$cal = new DHTML_Calendar(true); //$gen = new convert(); -function headerjs() -{ - // global $cal; -// return $cal->load_files()."\n"; -} + $e_sub_cat = 'download'; require_once(e_HANDLER."form_handler.php"); diff --git a/e107_plugins/featurebox/templates/featurebox_category_template.php b/e107_plugins/featurebox/templates/featurebox_category_template.php index f1c886e0a..0291383c6 100644 --- a/e107_plugins/featurebox/templates/featurebox_category_template.php +++ b/e107_plugins/featurebox/templates/featurebox_category_template.php @@ -123,7 +123,7 @@ $FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['nav_separator'] = ''; // external JS, comma separated list -$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js'] = '{e_FILE}jslib/core/tabs.js'; +$FEATUREBOX_CATEGORY_TEMPLATE['tabs-proto']['js'] = '{e_WEB_JS}core/tabs.js'; // inline JS, without