![]() |
|
Slideshow Drag and Drop Enquiry. - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html) +--- Thread: Slideshow Drag and Drop Enquiry. (/thread-11685.html) |
Slideshow Drag and Drop Enquiry. - deadman2k - 12-03-2014 Hi All, I have a customer wanting to display images of their artwork, however they requested that right click and drag and drop to be disable on all images within their galleries. I have successfully managed most of the request by updating the theme to include: ` window.onload = function (e)
}; function disableDragging(e) So my enquiry is how can I stop these image presented in Colorbox and the Colorbox Sideshow from being dragged? Slideshow Drag and Drop Enquiry. - deadman2k - 12-03-2014 I'm using: Slideshow Drag and Drop Enquiry. - acrylian - 12-03-2014 The only secure image is the image you don't put on the net… Please see a text we prepared for rather pointless measures of protection like this: http://www.zenphoto.org/news/site-protection#disabling-the-right-click-button Slideshow Drag and Drop Enquiry. - deadman2k - 12-03-2014 I understand the image security, but it does not help with my clients request, everything else seems to work fine, apart from image drag when displaying within the colorbox. The images will also be secured as outline in the link above, but as mentioned the client is insistent of having these images prevented of being dragged. Ive search the internet and the forum and not being able to find a solution. I have even inspected the page source to try an identify which object/element over-riding conditions set out in the header. Ive even tried to find out where the element is being generated: `
`
To address my issue. So where can I manually add the above to address my issue, if the Colorbox and Slideshow are ignoring my conditions outlined in my theme? Slideshow Drag and Drop Enquiry. - acrylian - 12-03-2014 The link above was meant to make clear that these are IMHO rather pointless measures (If you can't drag you can simply make a screenshot…). It would be better if you could educate your client how the web works… Sorry, I really cannot help with this issue. This is also not really a Zenphoto specific problem. Scripts are loaded by the theme_head filfer so whatever you wish to do you need to do it after that. You find info about colorbox itself here: http://www.jacklmoore.com/colorbox/ Slideshow Drag and Drop Enquiry. - deadman2k - 15-03-2014 Thanks for the advice. I have been in contact with Jacklmoore.com and they have advice using the onComplete function that is available within Colorbox. "Colorbox create's a new element, which wasn't in the document at the time you looped through them all assigning event handlers. You should use Colorbox's onComplete callback so that you run your code after it has added your content to the document." For example:
` But I have been unable to get this to function, please advice where I'm going wrong, and if possible an easy solution in order for me to address this matter. Slideshow Drag and Drop Enquiry. - deadman2k - 15-03-2014 OK I have finally found a work around, as above I have had major issues trying to get the Colorbox [list] photo.setAttribute('ondragstart', 'return false;'); [*]Save the file This has now protected images from been dragged or selected whilst being displayed in a Colorbox. Which has finally answered and fixed my problem outlined here. Thanks to ACrylian and the Guys from Colorbox (jacklmoore.com for quick responses regarding this matter. |