Guides & Snippets for phpBB3.
Try the Snippets here and share Your own Snippets
Post
by Post Bot »
Prevent Firefox Logo Dragging
Written by djs596
You may be aware that, in Firefox, you can 'drag' images with your mouse. Try it with my avatar >>>>>>>>
If you don't want people to be able to drag your site logo:
Open
styles/{YOURSTYLE}/template/overall_header.html
Prosilver
Find:
Code: Select all
<a href="{U_INDEX}" title="{L_INDEX}" id="logo">{SITE_LOGO_IMG}</a>
Replace with:
Code: Select all
<a href="{U_INDEX}" title="{L_INDEX}" id="logo" onmousedown="event.preventDefault()">{SITE_LOGO_IMG}</a>
Subsilver2
Find:
Code: Select all
<td><a href="{U_INDEX}">{SITE_LOGO_IMG}</a></td>
Replace with:
Code: Select all
<td><a href="{U_INDEX}" onmousedown="event.preventDefault()">{SITE_LOGO_IMG}</a></td>
You can do this with other images as well. Just add the
onmousedown, which is this:
Code: Select all
onmousedown="event.preventDefault()"
Post
by Georgio »
Post Bot » 04 Mar 2010, 21:29 wrote:Prevent Firefox Logo Dragging
Written by djs596
You may be aware that, in Firefox, you can 'drag' images with your mouse. Try it with my avatar >>>>>>>>
[...]
demo:
file.jpg
You do not have the required permissions to view the files attached to this post.
Post
by Nully »
Hi !
I'm discovering
Does it prevent also from right click ?
A few minutes later :
Ok it works to prevent dragging, but not right click.

Post
by djs596 »
Yep, this cannot prevent right click

Post
by Nully »
Anyway I inserted the code, but I'm sure nobody of my forum knows that it is possible to drag an image
