Tip to hide "save as" not working

Phoca Gallery - image gallery extension
phidias81
Phoca Enthusiast
Phoca Enthusiast
Posts: 70
Joined: 05 Jan 2012, 01:20
Contact:

Tip to hide "save as" not working

Post by phidias81 »

Hello, I tried to use the tip from the guide to disable the "save as" function on right click, but it's not working. Is it only my problem?
I have joomla 2.5 and Phoca gallery 3.1.2
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tip to hide "save as" not working

Post by Jan »

Hi, did you set the right jquery library: jquery-1.6.4.min.js
Do you get some javascript error message on your site?
Jan
If you find Phoca extensions useful, please support the project
phidias81
Phoca Enthusiast
Phoca Enthusiast
Posts: 70
Joined: 05 Jan 2012, 01:20
Contact:

Re: Tip to hide "save as" not working

Post by phidias81 »

I meant the tip written in this guide is not working for me

viewtopic.php?f=1&t=60

BEFORE

Code: Select all

<?php defined('_JEXEC') or die('Restricted access');

echo '<div id="phocagallery">';
if ($this->tmpl['backbutton'] != '') {
	echo $this->tmpl['backbutton'];
}
AFTER

Code: Select all

<?php defined('_JEXEC') or die('Restricted access');
echo '<script language=JavaScript>
<!--
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 
</script>';

echo '<div id="phocagallery">';
if ($this->tmpl['backbutton'] != '') {
	echo $this->tmpl['backbutton'];
}
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Tip to hide "save as" not working

Post by Jan »

Hi, didn't test it, so cannot give any advice there :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply