mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
More file-system cleanup
This commit is contained in:
parent
412d754983
commit
98117308f2
e107_admin
e107_files
e107_themes/templates
e107_web
@ -1056,7 +1056,7 @@ class file_inspector {
|
||||
echo "<link rel='stylesheet' href='".$css_file."' type='text/css' />\n";
|
||||
}
|
||||
if (!isset($no_core_css) || !$no_core_css) {
|
||||
echo "<link rel='stylesheet' href='".e_FILE_ABS."e107.css' type='text/css' />\n";
|
||||
echo "<link rel='stylesheet' href='".e_WEB_CSS."e107.css' type='text/css' />\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ $e_js = e107::getJs();
|
||||
if (!isset($no_core_css) || !$no_core_css)
|
||||
{
|
||||
//echo "<link rel='stylesheet' href='".e_FILE_ABS."e107.css' type='text/css' />\n";
|
||||
$e_js->otherCSS('{e_FILE}e107.css');
|
||||
$e_js->otherCSS('{e_WEB_CSS}e107.css');
|
||||
}
|
||||
|
||||
// Register Plugin specific CSS
|
||||
@ -232,25 +232,6 @@ echo "\n<!-- footer_theme_css -->\n";
|
||||
$e_js->renderJs('inline_css', false, 'css', false);
|
||||
echo "\n<!-- footer_inline_css -->\n";
|
||||
|
||||
//iepngfix - IE6 only
|
||||
if ((isset($pref['enable_png_image_fix']) && $pref['enable_png_image_fix'] == true) || (isset($sleight) && $sleight == true))
|
||||
{
|
||||
/*
|
||||
* The only problem is that the browser is REALLY,
|
||||
* REALLY slow when it has to render more elements
|
||||
* try e.g. "div, img, td, input" (or just *) instead only img rule
|
||||
* However I hope this will force IE6 user to hate it :)
|
||||
*/
|
||||
echo "<!--[if lte IE 6]>\n";
|
||||
echo "<style type='text/css'>\n";
|
||||
echo "img {\n";
|
||||
echo " behavior: url('".e_FILE_ABS."iepngfix.htc.php');\n";
|
||||
echo "}\n";
|
||||
echo "</style>\n";
|
||||
echo "<![endif]-->\n";
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Unobtrusive JS via CSS, prevent 3rd party code overload
|
||||
//
|
||||
|
@ -1746,19 +1746,28 @@ if (isset($_POST['check_avatar_sizes']))
|
||||
".$frm->text('im_path', $pref['im_path'])."
|
||||
<div class='field-help'>".IMALAN_6."</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>";
|
||||
|
||||
|
||||
<tr>
|
||||
<td class='label'>".IMALAN_34."
|
||||
</td>
|
||||
<td class='control'>
|
||||
<div class='auto-toggle-area autocheck'>
|
||||
".$frm->checkbox('enable_png_image_fix', 1, ($pref['enable_png_image_fix']))."
|
||||
<div class='field-help'>".IMALAN_35."</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
// Removed as IE6 should no longer be supported. A 3rd-party plugin can be made for this functionality if really needed.
|
||||
/*
|
||||
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td class='label'>".IMALAN_34."
|
||||
</td>
|
||||
<td class='control'>
|
||||
<div class='auto-toggle-area autocheck'>
|
||||
".$frm->checkbox('enable_png_image_fix', 1, ($pref['enable_png_image_fix']))."
|
||||
<div class='field-help'>".IMALAN_35."</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>";
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$text .= "
|
||||
|
||||
<tr>
|
||||
<td class='label'>".IMALAN_36."</td>
|
||||
|
@ -1,195 +0,0 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
header("Content-type: text/x-component");
|
||||
|
||||
if(!$_SERVER['PHP_SELF']) { $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME']; }
|
||||
$self = str_replace("\\", '/', dirname($_SERVER['PHP_SELF']));
|
||||
if($self != '/') { $self .= '/'; }
|
||||
?>
|
||||
<public:component>
|
||||
<script type="text/javascript">
|
||||
|
||||
// IE5.5+ PNG Alpha Fix v2.0 Alpha
|
||||
// (c) 2004-2008 Angus Turnbull http://www.twinhelix.com
|
||||
|
||||
// This is licensed under the GNU LGPL, version 2.1 or later.
|
||||
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/
|
||||
|
||||
var IEPNGFix = window.IEPNGFix || {};
|
||||
IEPNGFix.data = IEPNGFix.data || {};
|
||||
|
||||
|
||||
// This must be a path to a blank image, relative to the HTML document(s).
|
||||
// In production use I suggest '/images/blank.gif' or similar. That's all!
|
||||
IEPNGFix.blankImg = '<?php echo $self; ?>sleight_img.gif';
|
||||
|
||||
|
||||
IEPNGFix.fix = function(elm, src, t) {
|
||||
// Applies an image 'src' to an element 'elm' using the DirectX filter.
|
||||
// If 'src' is null, filter is disabled.
|
||||
// Disables the 'hook' to prevent infinite recursion on setting BG/src.
|
||||
// 't' = type, where background tile = 0, background = 1, IMG SRC = 2.
|
||||
|
||||
var h = this.hook.enabled;
|
||||
this.hook.enabled = 0;
|
||||
|
||||
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';
|
||||
src = (src || '').replace(/\(/g, '%28').replace(/\)/g, '%29');
|
||||
|
||||
if (
|
||||
src && !(/IMG|INPUT/.test(elm.nodeName) && (t != 2)) &&
|
||||
elm.currentStyle.width == 'auto' && elm.currentStyle.height == 'auto'
|
||||
) {
|
||||
elm.style.width = elm.offsetWidth + 'px';
|
||||
elm.style.height = elm.clientHeight + 'px';
|
||||
if (elm.currentStyle.display == 'inline') {
|
||||
elm.style.display = 'inline-block';
|
||||
}
|
||||
}
|
||||
|
||||
if (t == 1) {
|
||||
elm.style.backgroundImage = 'url("' + this.blankImg + '")';
|
||||
}
|
||||
if (t == 2) {
|
||||
elm.src = this.blankImg;
|
||||
}
|
||||
|
||||
if (elm.filters[f]) {
|
||||
elm.filters[f].enabled = src ? true : false;
|
||||
if (src) {
|
||||
elm.filters[f].src = src;
|
||||
}
|
||||
} else if (src) {
|
||||
elm.style.filter = 'progid:' + f + '(src="' + src +
|
||||
'",sizingMethod="' + (t == 2 ? 'scale' : 'crop') + '")';
|
||||
}
|
||||
|
||||
this.hook.enabled = h;
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.process = function(elm, init) {
|
||||
// Checks the onpropertychange event (on first 'init' run, a fake event)
|
||||
// and calls the filter-applying-functions.
|
||||
|
||||
if (
|
||||
!/MSIE (5\.5|6)/.test(navigator.userAgent) ||
|
||||
typeof elm.filters == 'unknown'
|
||||
) {
|
||||
return;
|
||||
}
|
||||
if (!this.data[elm.uniqueID]) {
|
||||
this.data[elm.uniqueID] = {
|
||||
className: ''
|
||||
};
|
||||
}
|
||||
var data = this.data[elm.uniqueID],
|
||||
evt = init ? { propertyName: 'src,backgroundImage' } : event,
|
||||
isSrc = /src/.test(evt.propertyName),
|
||||
isBg = /backgroundImage/.test(evt.propertyName),
|
||||
isPos = /width|height|background(Pos|Rep)/.test(evt.propertyName),
|
||||
isClass = !init && ((elm.className != data.className) &&
|
||||
(elm.className || data.className));
|
||||
if (!(isSrc || isBg || isPos || isClass)) {
|
||||
return;
|
||||
}
|
||||
data.className = elm.className;
|
||||
var blank = this.blankImg.match(/([^\/]+)$/)[1],
|
||||
eS = elm.style,
|
||||
eCS = elm.currentStyle;
|
||||
|
||||
// Required for Whatever:hover - erase set BG if className changes.
|
||||
if (
|
||||
isClass && (eS.backgroundImage.indexOf('url(') == -1 ||
|
||||
eS.backgroundImage.indexOf(blank) > -1)
|
||||
) {
|
||||
return setTimeout(function() {
|
||||
eS.backgroundImage = '';
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// Foregrounds.
|
||||
if (isSrc && elm.src && { IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
||||
if ((/\.png/i).test(elm.src)) {
|
||||
this.fix(elm, elm.src, 2);
|
||||
} else if (elm.src.indexOf(blank) == -1) {
|
||||
this.fix(elm, '');
|
||||
}
|
||||
}
|
||||
|
||||
// Backgrounds.
|
||||
var bgSrc = eCS.backgroundImage || eS.backgroundImage;
|
||||
if ((bgSrc + elm.src).indexOf(blank) == -1) {
|
||||
var bgPNG = bgSrc.match(/url[("']+(.*\.png[^\)"']*)[\)"']/i);
|
||||
if (bgPNG) {
|
||||
if (this.tileBG && !{ IMG: 1, INPUT: 1 }[elm.nodeName]) {
|
||||
this.tileBG(elm, bgPNG[1]);
|
||||
this.fix(elm, '', 1);
|
||||
} else {
|
||||
if (data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, '');
|
||||
}
|
||||
this.fix(elm, bgPNG[1], 1);
|
||||
this.childFix(elm);
|
||||
}
|
||||
} else {
|
||||
if (data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, '');
|
||||
}
|
||||
this.fix(elm, '');
|
||||
}
|
||||
} else if ((isPos || isClass) && data.tiles && data.tiles.src) {
|
||||
this.tileBG(elm, data.tiles.src);
|
||||
}
|
||||
|
||||
if (init) {
|
||||
this.hook.enabled = 1;
|
||||
elm.attachEvent('onpropertychange', this.hook);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.childFix = function(elm) {
|
||||
// "hasLayout" fix for unclickable children inside PNG backgrounds.
|
||||
var tags = [
|
||||
'a',
|
||||
'input',
|
||||
'select',
|
||||
'textarea',
|
||||
'button',
|
||||
'iframe',
|
||||
'object'
|
||||
],
|
||||
t = tags.length,
|
||||
tFix = [];
|
||||
while (t--) {
|
||||
var pFix = elm.all.tags(tags[t]),
|
||||
e = pFix.length;
|
||||
while (e--) {
|
||||
tFix.push(pFix[e]);
|
||||
}
|
||||
}
|
||||
t = tFix.length;
|
||||
if (t && (/relative|absolute/i).test(elm.currentStyle.position)) {
|
||||
alert('IEPNGFix: Unclickable children of element:' +
|
||||
'\n\n<' + elm.nodeName + (elm.id && ' id=' + elm.id) + '>');
|
||||
}
|
||||
while (t--) {
|
||||
if (!(/relative|absolute/i).test(tFix[t].currentStyle.position)) {
|
||||
tFix[t].style.position = 'relative';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.hook = function() {
|
||||
if (IEPNGFix.hook.enabled) {
|
||||
IEPNGFix.process(element, 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
IEPNGFix.process(element, 1);
|
||||
|
||||
</script>
|
||||
</public:component>
|
Binary file not shown.
Before ![]() (image error) Size: 49 B |
@ -1,70 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* e107 website system
|
||||
*
|
||||
* Copyright (C) 2008-2009 e107 Inc (e107.org)
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
|
||||
*
|
||||
*
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_files/sleight_js.php,v $
|
||||
* $Revision$
|
||||
* $Date$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
// Credit to youngpup.net for sorting the annoyince that is ie for us =)
|
||||
// modified to ignore ie 7+ and figure out where it is on the server.
|
||||
|
||||
// Slieght fix for sites that need it..
|
||||
|
||||
$folder = dirname($_SERVER['PHP_SELF']).'/';
|
||||
$slashed_folder = str_replace(array("/", "."), array("\\/", "\\."), $folder);
|
||||
|
||||
header("Content-type: application/x-javascript");
|
||||
|
||||
?>
|
||||
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
|
||||
window.attachEvent("onload", fnLoadPngs);
|
||||
}
|
||||
|
||||
function fnLoadPngs() {
|
||||
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
|
||||
var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5 && Number(rslt[1]) < 7);
|
||||
|
||||
for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
|
||||
if (itsAllGood && img.src.match(/\.png$/i) != null) {
|
||||
fnFixPng(img);
|
||||
img.attachEvent("onpropertychange", fnPropertyChanged);
|
||||
}
|
||||
}
|
||||
|
||||
var nl = document.getElementsByTagName("input");
|
||||
for (var i = nl.length - 1, e = null; (e = nl[i]); i--) {
|
||||
if (e.type == 'image') {
|
||||
if (e.src.match(/\.png$/i) != null) {
|
||||
fnFixPng(e);
|
||||
e.attachEvent("onpropertychange", fnPropertyChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fnPropertyChanged() {
|
||||
if (window.event.propertyName == "src") {
|
||||
var el = window.event.srcElement;
|
||||
if (!el.src.match(/<?php echo $slashed_folder; ?>sleight_img\.gif$/i)) {
|
||||
el.filters.item(0).src = el.src;
|
||||
el.src = "<?php echo $folder; ?>sleight_img.gif";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function fnFixPng(img) {
|
||||
var src = img.src;
|
||||
img.style.width = img.width + "px";
|
||||
img.style.height = img.height + "px";
|
||||
img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')"
|
||||
img.src = "<?php echo $folder; ?>sleight_img.gif";
|
||||
}
|
@ -299,25 +299,6 @@ echo "\n<!-- footer_theme_css -->\n";
|
||||
$e_js->renderJs('inline_css', false, 'css', false);
|
||||
echo "\n<!-- footer_inline_css -->\n";
|
||||
|
||||
//IEpngfix - visible by IE6 only
|
||||
// FIXME - disable this style block via JS for all GOOD browsers.
|
||||
if($e_pref->get('enable_png_image_fix') || (isset($sleight) && $sleight == true)) // FIXME - KILL this GLOBAL!
|
||||
{
|
||||
/*
|
||||
* The only problem is that the browser is REALLY,
|
||||
* REALLY slow when it has to render more elements
|
||||
* try e.g. "div, img, td, input" (or just *) instead only img rule
|
||||
* However I hope it'll force IE6 users to switch to a modern browser...
|
||||
*/
|
||||
echo "<!--[if lte IE 6]>\n";
|
||||
echo "<style type='text/css'>\n";
|
||||
echo "img {\n";
|
||||
echo " behavior: url('".e_FILE_ABS."iepngfix.htc.php');\n";
|
||||
echo "}\n";
|
||||
echo "</style>\n";
|
||||
echo "<![endif]-->\n";
|
||||
}
|
||||
|
||||
//
|
||||
// Style for unobtrusive JS, prevent 3rd party code overload
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user