Simple Multi Image Add-on (Un-Limited) with FancyBox Popups
#41
Posted 21 September 2009, 10:36
#42
Posted 21 September 2009, 12:26
datawebuk, on Sep 21 2009, 11:36 AM, said:
No, I have no sites with STS, ask at the STS thread, someone there should be able to help, if u ask politly!!
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#43
Posted 22 September 2009, 03:03
spooks, on Sep 21 2009, 07:33 PM, said:
Remember this modifies the individual product display in product_info.php, not the multiple product listing display in index.php.
Perhaps u need to read How do I install a contribution http://forums.oscommerce.com/index.php?sho...=0#entry1432157
Thanks for the advice & help. The "How do I" is invaluable.
Now, tho I'm getting this message whenever I list a new product:
Warning: Variable passed to each() is not an array or object in /home/theurba4/public_html/admin/categories.php on line 1127
I think I'm getting info-overload...
Thanks again,
pete.
#44
Posted 22 September 2009, 07:08
theurbanrooster said:
Go over the install again, u missed bits!! You could use the included file.
It does say in that other thread, if u have new errors, triple check your install, most likely missed smthg, why did u think it would be otherwise!!
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#45
Posted 25 September 2009, 18:43
Interested in the popup arrows easier to locate or stay on top always. See below:
I am noticing that when you have several images that in the popup I can only see the left and right arrows when I put my mouse over them. If you don't know to mouse over a specific area, I think the customer will not know that they can click a button to move forward or back through the images in popup.
Is there a way to make the buttons permanent perhaps at the bottom of the popup? Perhaps right next to or in title of image?
Thanks,
Charles
#46
Posted 25 September 2009, 20:19
fan4chevy, on Sep 25 2009, 07:43 PM, said:
To show always add:
span#fancy_left_ico {left: 20px; }
span#fancy_right_ico {right: 20px;} to the bottom of fancybox.css
to position at the bottom find:
span.fancy_ico {
position: absolute;
top: 50%;
margin-top: -15px;
width: 30px;
height: 30px;
z-index: 112;
cursor: pointer;
display: block;
} change the top: 50%; to top: 90%; or similar.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#47
Posted 26 September 2009, 11:44
There is a solution to this, you must edit the javascript in the js/jquery.fancybox.js file:
find (233)
'top': itemTop,
replace with
'top': '100px',
change the 100px to whatever value suites.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#48
Posted 26 September 2009, 17:08
I have searched high and low on specifics of how to get the background webpage to dim or overlay. However, I have been unsuccessful.
What I have seen is to put overlay to true and 0 to 1. I must be doing this in the wrong area. Can you please inform me of the exact code I need to change to dim the background and how to change it?
Thanks so much,
Charles
#49
Posted 26 September 2009, 19:55
fan4chevy said:
can be done with css, but what has that to do with this??
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#50
Posted 26 September 2009, 20:17
All I could find is things saying put default false to true and change 0 to 1 but I have not succeeded in changing anything if this is the area to change:
overlayShow: true,
overlayOpacity: 1,
If so the above did not dim my back page and your help is appreciated so I can keep my sanity.
#51
Posted 26 September 2009, 22:42
fan4chevy said:
Clearly settings for the overlay will not affect the background!.
There is no published method to darken the backgound with fancybox, I suspect there would be issues with the fade effect if such were done.
If you wish to try I suggest you research the jquery plugins.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#52
Posted 26 September 2009, 23:15
spooks, on Sep 26 2009, 06:42 PM, said:
There is no published method to darken the backgound with fancybox, I suspect there would be issues with the fade effect if such were done.
If you wish to try I suggest you research the jquery plugins.
Hi again,
I think it is a standard feature because I have seen it used elsewhere and at the main site it is one of the examples. See the first image on the left that is a red sided house with flowers. It shades the back. http://fancybox.net/example
Also is this not what is meant by overlay or is this something else?
#53
Posted 27 September 2009, 06:09
fan4chevy, on Sep 26 2009, 07:15 PM, said:
I think it is a standard feature because I have seen it used elsewhere and at the main site it is one of the examples. See the first image on the left that is a red sided house with flowers. It shades the back. http://fancybox.net/example
Also is this not what is meant by overlay or is this something else?
Ok I figured it out and it works awesome! I hope my 2 days of frustration will help another add this effect for those not sure what do do to DIM THE BACKGROUND!
------------------------------------------------
Open product_info.php
Look for the area above </head> where you pasted the fancybox code and find: 'overlayShow':
Change 'overlayShow': false to true
Save file and upload to catalog directory.
Now open jquery.fancybox.js and find: overlayOpacity:
Change the 0.3 to 0.4 or 0.6 if you want the dim background darker.
It really makes a difference.
Charles
#54
Posted 27 September 2009, 20:53
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#55
Posted 27 September 2009, 23:45
spooks, on Sep 27 2009, 04:53 PM, said:
#56
Posted 28 September 2009, 04:34
Ok here it is. This plug-In will enable you to have your Fancybox be draggable along with the drag arrowed icon as well. This is not a necessary feature but kind of cool!
As always, back up you work. Said to work fine in Firefox 3.x, Opera 9.1, Safari 4 for Windows beta, Chrome 1.x and IE6 and IE7 (not tested in IE8 yet)
Step1:
Open product_info.php and place the following script in the <head> section. (Anywhere between <head> and </head>)
Step2:
Copy the below code and name the file: jquery.easydrag.handler.beta2.js
Copy the file below here ( unfortunately I don't know how to add this file other then pasting it here:
/**
* EasyDrag 1.5 - Drag & Drop jQuery Plug-in
*
* Thanks for the community that is helping the improvement
* of this little piece of code.
*
* For usage instructions please visit http://fromvega.com/scripts
*/
(function($){
// to track if the mouse button is pressed
var isMouseDown = false;
// to track the current element being dragged
var currentElement = null;
// callback holders
var dropCallbacks = {};
var dragCallbacks = {};
// bubbling status
var bubblings = {};
// global position records
var lastMouseX;
var lastMouseY;
var lastElemTop;
var lastElemLeft;
// track element dragStatus
var dragStatus = {};
// if user is holding any handle or not
var holdingHandler = false;
// returns the mouse (cursor) current position
$.getMousePosition = function(e){
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX;
posy = e.pageY;
}
else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
return { 'x': posx, 'y': posy };
};
// updates the position of the current element being dragged
$.updatePosition = function(e) {
var pos = $.getMousePosition(e);
var spanX = (pos.x - lastMouseX);
var spanY = (pos.y - lastMouseY);
$(currentElement).css("top", (lastElemTop + spanY));
$(currentElement).css("left", (lastElemLeft + spanX));
};
// when the mouse is moved while the mouse button is pressed
$(document).mousemove(function(e){
if(isMouseDown && dragStatus[currentElement.id] != 'false'){
// update the position and call the registered function
$.updatePosition(e);
if(dragCallbacks[currentElement.id] != undefined){
dragCallbacks[currentElement.id](e, currentElement);
}
return false;
}
});
// when the mouse button is released
$(document).mouseup(function(e){
if(isMouseDown && dragStatus[currentElement.id] != 'false'){
isMouseDown = false;
if(dropCallbacks[currentElement.id] != undefined){
dropCallbacks[currentElement.id](e, currentElement);
}
return false;
}
});
// register the function to be called while an element is being dragged
$.fn.ondrag = function(callback){
return this.each(function(){
dragCallbacks[this.id] = callback;
});
};
// register the function to be called when an element is dropped
$.fn.ondrop = function(callback){
return this.each(function(){
dropCallbacks[this.id] = callback;
});
};
// disable the dragging feature for the element
$.fn.dragOff = function(){
return this.each(function(){
dragStatus[this.id] = 'off';
});
};
// enable the dragging feature for the element
$.fn.dragOn = function(){
return this.each(function(){
dragStatus[this.id] = 'on';
});
};
// set a child element as a handler
$.fn.setHandler = function(handlerId){
return this.each(function(){
var draggable = this;
// enable event bubbling so the user can reach the handle
bubblings[this.id] = true;
// reset cursor style
$(draggable).css("cursor", "");
// set current drag status
dragStatus[draggable.id] = "handler";
// change handle cursor type
$("#"+handlerId).css("cursor", "move");
// bind event handler
$("#"+handlerId).mousedown(function(e){
holdingHandler = true;
$(draggable).trigger('mousedown', e);
});
// bind event handler
$("#"+handlerId).mouseup(function(e){
holdingHandler = false;
});
});
}
// set an element as draggable - allowBubbling enables/disables event bubbling
$.fn.easydrag = function(allowBubbling){
return this.each(function(){
// if no id is defined assign a unique one
if(undefined == this.id || !this.id.length) this.id = "easydrag"+(new Date().getTime());
// save event bubbling status
bubblings[this.id] = allowBubbling ? true : false;
// set dragStatus
dragStatus[this.id] = "on";
// change the mouse pointer
$(this).css("cursor", "move");
// when an element receives a mouse press
$(this).mousedown(function(e){
// just when "on" or "handler"
if((dragStatus[this.id] == "off") || (dragStatus[this.id] == "handler" && !holdingHandler))
return bubblings[this.id];
// set it as absolute positioned
$(this).css("position", "absolute");
// set z-index
$(this).css("z-index", parseInt( new Date().getTime()/1000 ));
// update track variables
isMouseDown = true;
currentElement = this;
// retrieve positioning properties
var pos = $.getMousePosition(e);
lastMouseX = pos.x;
lastMouseY = pos.y;
lastElemTop = this.offsetTop;
lastElemLeft = this.offsetLeft;
$.updatePosition(e);
return bubblings[this.id];
});
});
};
})(jQuery);
End the copy from above here
Step 3:
Upload the above file that you haved named jquery.easydrag.handler.beta2.js to the /images/js folder where all of your other fancybox files are.
Step 4:
Open jquery.fancybox.js and find the code that reads hideOnContentClick : true, and change the true to false.
Step 5:
Upload jquery.fancybox.js to the /images/js folder
I hope you enjoy it!
Charles
Edited by fan4chevy, 28 September 2009, 04:36.
#57
Posted 28 September 2009, 08:31
fan4chevy said:
Well done again, only u missed off some of your instructions!!
Step1:
Open product_info.php and place the following script in the <head> section. (Anywhere between <head> and </head>)
<script type="text/javascript" src="<?php echo DIR_WS_IMAGES ?>js/jquery.easydrag.handler.beta2.js"></script>
<script type="text/javascript">
$(function(){
// add drag and drop functionality to #fancy_box
$("#fancy_outer").easydrag();
});
</script>
Step 4 & 5 are not strictly neccessary as that setting has already been set in the head
Thanks for finding that though, I`ll include it in the next release.
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#58
Posted 28 September 2009, 09:02
theurbanrooster said:
It does say in that other thread, if u have new errors, triple check your install, most likely missed smthg, why did u think it would be otherwise!!
Thanks. I didn't think it would be anything but my error. I was only hoping for a point in the right direction... Anyway, still trying. Still can only get one pic on listing, even tho i have uploaded 4.
Thanks for your help.
pete.
#59
Posted 28 September 2009, 10:26
theurbanrooster, on Sep 28 2009, 10:02 AM, said:
r u seeing the fancy popup? have u tried using the supplied product_info.php
Remember, What you think I ment may not be what I thought I ment when I said it.
Post osC questions don't PM them. Vampire?
Contributions:
Multi Images with Fancy Popups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#60
Posted 28 September 2009, 22:28
I have been checking and checking the install and I still get the fancy popup box with no picture..
My doc type is..
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
Exactly how it is in the install..
Any Ideas?
Thanks in advance..
Edited by Allensbayou, 28 September 2009, 22:35.














