mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
revert tools
This commit is contained in:
@@ -17,22 +17,22 @@ function htmlentities_noquotes_utf8($s) {
|
||||
function addOnLoad($function) {
|
||||
?>
|
||||
<script language="JavaScript">
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
}
|
||||
else {
|
||||
window.onload = function () {
|
||||
if (oldonload) {
|
||||
oldonload();
|
||||
}
|
||||
func();
|
||||
}
|
||||
}
|
||||
function addLoadEvent(func) {
|
||||
var oldonload = window.onload;
|
||||
if (typeof window.onload != 'function') {
|
||||
window.onload = func;
|
||||
}
|
||||
else {
|
||||
window.onload = function () {
|
||||
if (oldonload) {
|
||||
oldonload();
|
||||
}
|
||||
func();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addLoadEvent(function () {<?php echo $function; ?>});
|
||||
addLoadEvent(function () {<?php echo $function; ?>});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
@@ -227,7 +227,7 @@ function bildIdentisch($typ1, $id1, $typ2, $id2) {
|
||||
}
|
||||
|
||||
function teamImage($teamId, $vereinId, $width = 240, $height = 240) {
|
||||
$url = bildURL("mannschaften", $teamId, 0, 0, $width, $height);
|
||||
$url = bildURL("mannschaften", $teamId, 0, 0, $width, $height);
|
||||
|
||||
if ($url == null) {
|
||||
$url = bildURL("vereine", $vereinId, 0, 0, $width, $height);
|
||||
@@ -237,9 +237,9 @@ function teamImage($teamId, $vereinId, $width = 240, $height = 240) {
|
||||
}
|
||||
|
||||
function playerImage($playerId, $gender, $width = 180, $height = 240) {
|
||||
$url = bildURL("spieler", $playerId, $width, $height, 0,0,'', $gender == 'M' ? 'm' : 'w');
|
||||
$url = bildURL("spieler", $playerId, $width, $height, 0,0,'', $gender == 'M' ? 'm' : 'w');
|
||||
if ($url == null) {
|
||||
$url = bildURL("mannschaftsmitglieder", $playerId, $width, $height, 0,0,'');
|
||||
$url = bildURL("mannschaftsmitglieder", $playerId, $width, $height, 0,0,'');
|
||||
}
|
||||
|
||||
return $url;
|
||||
@@ -337,55 +337,11 @@ function bildURL($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0,
|
||||
return $sportsmanager_joomla_url . 'images/sportsmanager/' . $typ . '/' . basename($pfad_angepasst);
|
||||
}
|
||||
|
||||
/*
|
||||
* #resize=250
|
||||
#resize=250,250,blue
|
||||
#resize=250,250,blue
|
||||
#resize=250,250&sizes=60%,80%,200%
|
||||
#resize=250,250,cover&sizes=60%,80%,200%
|
||||
#resize=250,250,fill&sizes=60%,80%,200%
|
||||
#crop=250,250,center,top
|
||||
#crop=250,250
|
||||
#crop=250,250,center,bottom
|
||||
#crop=250,250,left
|
||||
#crop=250,250,right
|
||||
*/
|
||||
function yoothemeBild($typ, $id, $crop = 'resize=250', $zusatz = "", $alternativ)
|
||||
{
|
||||
|
||||
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {
|
||||
global $sportsmanager_joomla_path;
|
||||
global $sportsmanager_joomla_url;
|
||||
|
||||
$typ_exploded = explode("/", $typ);
|
||||
$typ = $typ_exploded[0];
|
||||
$typ_prefix = count($typ_exploded) > 1 ? $typ_exploded[1] : "";
|
||||
$pfad = $sportsmanager_joomla_path . "/images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . ".";
|
||||
|
||||
if (is_file($pfad . "png"))
|
||||
$ext = "png";
|
||||
else if (is_file($pfad . "jpg"))
|
||||
$ext = "jpg";
|
||||
else if (!empty($alternativ)) {
|
||||
$id = $alternativ;
|
||||
$pfad = $sportsmanager_joomla_path . "/images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . ".";
|
||||
if (is_file($pfad . "png"))
|
||||
$ext = "png";
|
||||
else if (is_file($pfad . "jpg"))
|
||||
$ext = "jpg";
|
||||
else
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return null;
|
||||
|
||||
$time = filemtime($pfad . $ext);
|
||||
|
||||
$bildpfad = "images/sportsmanager/" . $typ . "/" . $typ_prefix . $id . "." . $ext;
|
||||
|
||||
|
||||
return '<img class="el-image" data-src="' . $bildpfad . '#' . $crop . '" ' . $zusatz . ' uk-img />';
|
||||
}
|
||||
|
||||
function bildHTML($typ, $id, $fixed_width = 0, $fixed_height = 0, $max_width = 0, $max_height = 0, $zusatz = "", $alternativ = "") {
|
||||
$typ_exploded = explode("/", $typ);
|
||||
$typ = $typ_exploded[0];
|
||||
$typ_prefix = count($typ_exploded) > 1 ? $typ_exploded[1] : "";
|
||||
@@ -525,22 +481,22 @@ function lightBoxHeader($lightbox_class = "lightbox") {
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<!--
|
||||
function show<?php echo $lightbox_class; ?>() {
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.display = "inline";
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.visibility = "visible";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.display = "inline";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.visibility = "visible";
|
||||
}
|
||||
//<!--
|
||||
function show<?php echo $lightbox_class; ?>() {
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.display = "inline";
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.visibility = "visible";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.display = "inline";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.visibility = "visible";
|
||||
}
|
||||
|
||||
function hide<?php echo $lightbox_class; ?>() {
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.display = "none";
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.visibility = "hidden";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.display = "none";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.visibility = "hidden";
|
||||
}
|
||||
function hide<?php echo $lightbox_class; ?>() {
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.display = "none";
|
||||
document.getElementById("<?php echo $lightbox_class; ?>").style.visibility = "hidden";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.display = "none";
|
||||
document.getElementById("<?php echo $lightbox_class . "_close"; ?>").style.visibility = "hidden";
|
||||
}
|
||||
|
||||
//-->
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user