4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)
[Mod] Zoom MOD
Rembrandt:
so.. ich denke ich habe dich lange genug schwitzen lassen.. :mrgreen:
1.) also in root/js/loupe kopierst du die "loupe.js" und diesen "image" ordner aus den downloadpaket.
2.) deine template/media/jpg.html ersetzt du mit den folgend inhalt:
--- Code: ---<!-- Template file for JPG Files -->
{ifnot big}
<img src="{media_src}" border="1" alt="{image_name}"{width_height} /><br >
{endifnot big}
{if big}
<script type="text/javascript">
window.onload = function () {
loupe.add(document.getElementById('{image_name}'));
};
</script>
<div style="width:{width}px;height:{height}px; background:url(./data/media/{cat_id}/{image_file_name}) no-repeat;">
<img id="{image_name}" src="./data/media/{cat_id}/big/{image_file_name}" style="width:{width}px;height:{height}px;" alt="{image_name}" border="0" />
</div>
{endif big}
--- End code ---
3.) in der templates/header.html suche:
--- Code: ---{if has_rss}
--- End code ---
und füge darüber ein:
--- Code: ---<script type="text/javascript" src="./js/loupe/loupe.js"></script>
<script language="javascript" type="text/javascript">
loupe.defaultResopath = 'js/loupe/images/loupe/';
loupe.defaultVisible = false; //BOOLEAN visiblity on startup
loupe.defaultRadius = 100; //INT/FLOAT 0-100 lense radius (%) of loupe min(height/width)
loupe.defaultXpos = 8; //INT/FLOAT 0-n (px) horizontal offset of the lense
loupe.defaultYpos = 6; //INT/FLOAT 0-n (px) vertical offset of the lense
loupe.defaultXview = 0; //INT/FLOAT 0-n (px) horizontal start position
loupe.defaultYview = 0; //INT/FLOAT 0-n (px) vertical start position
loupe.defaultCrosshair = true; //BOOLEAN show crosshair
loupe.defaultOpacity = 25; //INT/FLOAT 0-100 (%) crosshair opacity
loupe.defaultColor = '#0000ff'; //STRING crosshair color
loupe.defaultName = ''; //STRING (canvas name|id)</script>
--- End code ---
4.) damit keine fehler aufscheinen wenn kein "big" blid vorhanden ist, suche in der includes/functions.php:
"width_height" => $width_height,
füge darunter ein:
"big" => (file_exists(MEDIA_PATH.(($cat_id != 0) ? "/".$cat_id : "")."/"."big"."/".$media_file_name)) ? 1:"",
deine großen bilder sollen eh im order "big" liegen, wenn nicht mußt du den pfad anpassen.
deine änderung n der loupe.js mache wieder rückgängig.
mfg Andi
kubiczek:
ups...
geht nicht.
http://www.grosspeterwitz.org/4images/details.php?image_id=1
Rembrandt:
wenn ich in deinen quellcode sehe hast du "big" nicht in der jpg.html drinnen stehn:
--- Code: ---<div style=" width:480px;height:600px; background:url(./data/media/1/Bild056.jpg) no-repeat; border:1px solid gray; margin-right: 1em; margin-bottom: 0.25em;">
<img id="ohne leerzeichen" src="./data/media/1/Bild056.jpg" style="cursor:wait;width:480px;height:600px;" alt="Bild056.jpg" border="0" />
</div>
--- End code ---
desweiteren hast du im header das script 2x drinnen stehn.
kubiczek:
hallo
das ist deine
jpg.html
--- Quote from: Rembrandt on February 09, 2011, 02:01:26 PM ---
--- Code: ---<script type="text/javascript">
window.onload = function () {
loupe.add(document.getElementById('{image_name}'));
};
</script>
<div style=" background:url(/data/media/{cat_id}/{image_file_name}) no-repeat;">
<img id="{image_name}" src="/data/media/{cat_id}/big/{image_file_name}" style="cursor:wait;width:{width}px;height:{height}px;" alt="{image_file_name}" border="0" />
</div>
--- End code ---
--- End quote ---
wenn ich es so mache
<script type="text/javascript">
window.onload = function () {
loupe.add(document.getElementById('{image_name}'));
};
</script>
<div style="position:static; width:{width}px; height:{height}px; border:0px; background: url(./data/media/{cat_id}/{image_file_name})top left no-repeat; text-align:left;">
<img id="{image_name}" src="./data/media/{cat_id}/big/{image_file_name}" style="cursor:wait;width:{width}px;height:{height}px;" alt="{image_file_name}" border="0" />
</div>
funktioniert meine testumgebung 1.7.9 petfekt im FF IE und Chrome
http://www.grosspeterwitz.org/4images/details.php?image_id=1
habe es eben noch mal kontrliert im header.html ist das script nur ein mal.
Rembrandt:
ist ja kein unterschied, jetzt stimmt auch der quelltext.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version