Re: Image Handler 2 Support
OH MY!! I think I did it!!!
Don't ask me to explain how because I can't! Basically I saw a second override folder in there, added the second header_php to that one, and it's now IN MY ADMIN:clap:
Whew.....now for round 2. Can I get it working correctly:lookaroun
Re: Image Handler 2 Support
Should be super easy from now on in.
Was just a wee case of a few bits in the wrong place.
Now a good rule of thumb is to make sure any images you are going to use on your site are less than 500kb in file size and that they don't have any spaces or funny characters in them - i.e my&& 20 picture.jpg
then you'll be laughing.
Re: Image Handler 2 Support
I hope so!
I just noticed that my additional product photos have disappeared since the IH started working. Why would that be?
Re: Image Handler 2 Support
I guess I should have said that I've checked and it's set to 3 in admin, and I checked and the additional_image php thing is in my override folder for modules.
Re: Image Handler 2 Support
Quote:
Originally Posted by
gee38l
OK i have an error in IE7:
Line: 125
Char: 7
Error: "ClientY" is null or not an object
Now i have been reading about this error and i have tried to change PageY to ClientY still seems to come up. I noticed in a previous post someone had posted a modified file but the link was broken.
Im using the most recent IH2 install, installed and reinstalled numerous times and followed a few ways on here but still nothing.
I think it has only started happening today!
Can someone please check my js file?
Link:
www.truwater.com.au
HTML Code:
/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
Modified by Tim Kroeger ([email protected]) for use with
image handler 2 and better cross browser functionality
*/
var offsetfrommouse=[10,10]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; //duration in seconds image should remain visible. 0 for always.
var currentimageheight = 400; // maximum image size.
var padding=10; // padding must by larger than specified div padding in stylessheet
// Global variables for sizes of hoverimg
// Defined in "showtrail()", used in "followmouse()"
var zoomimg_w=0;
var zoomimg_h=0;
if (document.getElementById || document.all){
document.write('<div id="trailimageid">');
document.write('</div>');
}
function getObj(name) {
if (document.getElementById) {
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
} else if (document.all) {
this.obj = document.all[name];
this.style = document.all[name].style;
} else if (document.layers) {
this.obj = document.layers[name];
this.style = document.layers[name];
}
}
function gettrail(){
return new getObj("trailimageid");
}
function truebody(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function showtrail(imagename,title,oriwidth,oriheight,zoomimgwidth,zoomimgheight, image, startx, starty, startw, starth){
zoomimg_w=zoomimgwidth;
zoomimg_h=zoomimgheight;
//if (oriwidth > 0){ offsetfrommouse[0] = oriwidth; }
//if (oriheight > 0){ offsetfrommouse[1] = -1 *(zoomimgheight-oriheight)/2 - 40; }
// alert (offsetfrommouse[0] + "," + offsetfrommouse[1]);
if (zoomimgheight > 0){ currentimageheight = zoomimgheight; }
trailobj = gettrail().obj;
trailobj.style.width=(zoomimgwidth+(2*padding))+"px";
trailobj.style.height=(zoomimgheight+(2*padding))+"px";
trailobj.setAttribute("startx", startx);
trailobj.setAttribute("starty", starty);
trailobj.setAttribute("startw", startw);
trailobj.setAttribute("starth", starth);
trailobj.setAttribute("imagename", imagename);
trailobj.setAttribute("imgtitle", title);
document.onmousemove=followmouse;
}
function hidetrail(){
trailstyle = gettrail().style;
trailstyle.visibility = "hidden";
document.onmousemove = "";
trailstyle.left = "-2000px";
trailstyle.top = "-2000px";
}
function followmouse(e){
var xcoord=offsetfrommouse[0];
var ycoord=offsetfrommouse[1];
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15;
var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight);
//if (document.all){
// trail.obj.innerHTML = 'A = ' + truebody().scrollHeight + '<br>B = ' + truebody().clientHeight;
//} else {
// trail.obj.innerHTML = 'C = ' + document.body.offsetHeight + '<br>D = ' + window.innerHeight;
//}
var relativeX = null;
var relativeY = null;
if (typeof e != "undefined"){
if ((typeof e.layerX != "undefined") && (typeof e.layerY != "undefined")) {
relativeX = e.layerX;
relativeY = e.layerY;
} else if ((typeof e.x != "undefined") && (typeof e.y != "undefined")) {
relativeX = e.x;
relativeY = e.y;
}
if (docwidth - e.pageX < zoomimg_w + (3 * padding)) {
xcoord = e.pageX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += e.pageX;
}
if (docheight - e.pageY < zoomimg_h + (2 * padding)){
ycoord += e.pageY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.pageY - docheight - truebody().scrollTop));
} else {
ycoord += e.pageY;
}
} else if (typeof window.event != "undefined"){
if ((typeof event.x != "undefined") && (typeof event.y != "undefined")) {
relativeX = event.x;
relativeY = event.y;
} else if ((typeof event.offsetX != "undefined") && (event.offsetY != "undefined")) {
relativeX = event.offsetX;
relativeY = event.offsetY;
}
if (docwidth - event.clientX < zoomimg_w + (3 * padding)) {
xcoord = event.clientX - xcoord - zoomimg_w - (2 * offsetfrommouse[0]);
} else {
xcoord += truebody().scrollLeft+event.clientX;
}
if (docheight - event.clientY < zoomimg_h + (2 * padding)){
ycoord += event.clientY - Math.max(0,(0 + zoomimg_h + (5 * padding) + e.clientY - docheight - truebody().scrollTop));
} else {
ycoord += truebody().scrollTop + event.clientY;
}
}
trail = gettrail();
startx = trail.obj.getAttribute("startx");
starty = trail.obj.getAttribute("starty");
startw = trail.obj.getAttribute("startw");
starth = trail.obj.getAttribute("starth");
imagename = trail.obj.getAttribute("imagename");
title = trail.obj.getAttribute("imgtitle");
// calculate and set position BEFORE switching to visible
var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15;
var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight);
if(ycoord < 0) { ycoord = ycoord*-1; }
if ((trail.style.left == "-2000px") || (trail.style.left == "")) { trail.style.left=xcoord+"px"; }
if ((trail.style.top == "-2000px") || (trail.style.top == "")) { trail.style.top=ycoord+"px"; }
trail.style.left=xcoord+"px";
trail.style.top=ycoord+"px";
// alert (trail.style.left+","+trail.style.top);
if (trail.style.visibility != "visible") {
if (((relativeX == null) || (relativeY == null)) ||
((relativeX >= startx) && (relativeX <= (startx + startw))
&& (relativeY >= starty) && (relativeY <= (starty + starth)))){
newHTML = '<div><h1>' + title + '</h1>';
newHTML = newHTML + '<img src="' + imagename + '"></div>';
trail.obj.innerHTML = newHTML;
trail.style.visibility="visible";
}
}
}
Thanks gee38l
Anyone? I have followed countless threads and advice but i still cant get it to not error in ie7.... :dontgetit
Re: Image Handler 2 Support
Quote:
Originally Posted by
gee38l
Anyone? I have followed countless threads and advice but i still cant get it to not error in ie7.... :dontgetit
You tried this one?
http://www.zen-cart.com/forum/showpo...postcount=2340
Re: Image Handler 2 Support
Quote:
Originally Posted by
tophand
Thanks tophand that seems to be what i was looking for i saw another file that a user posted earlier on in the thread but the link was dead. The only one i didnt try :cool:
Re: Image Handler 2 Support (jpg vs JPG)
Hi,
After installing IH2 and Lightbox Mods on fresh install of zen Cart 1.3.8a, all is well thankfully :)
What great modifications :) Thank you!
The only issue I am having is..
When I upload the main image it sometimes uploads it either uppercase (JPG) or lowercase (jpg), which is ok, However it becomes a major problem in the ######## when you when you add additional images because the additional images usually add in lowercase jpg, so what that means if your main image is uppercase JPG, it means the additional images will NOT show!!
The only way to show them is by going into your server images folder and renaming the image extension to whichever extension is the main page, and only then will the additional images show!
Now, why are the images uploading either in JPG or jpg at times and how to fix this issue? I can't seem to figure it out and I am going crazy :frusty:.
Any help would be greatly appreciated.
Best Regards,
Re: Image Handler 2 Support
Also, another thing to my previous post!!
Everything was working fine until I added more products, now the site is not showing completely, and the products are not showing?
I turn IH2 off from the Admin and the site shows up well again, then install IH2 the same thing happens, products don't show?
Everything from the admin seems fine!
Please help I am after fixing this site before the holidays and start selling!
Thanking you in advance.
Regards,
Re: Image Handler 2 Support
Quote:
Originally Posted by
MamaT
I hope so!
I just noticed that my additional product photos have disappeared since the IH started working. Why would that be?
I guess I should have said that I've checked and it's set to 3 in admin, and I checked and the additional_image php thing is in my override folder for modules.
After searching this thread, I've also checked the jscript file, AND the images are showing under additional images of admin/tools/imagehandler2.