New messages Members Forum rules Search
  • Page 1 of 1
  • 1
Forum moderator: kostova, Brazen  
uCoz Support Forum by uCozers » Coding » CSS » Protecting your precious image... (sml[tutorial]oh the precious images...)
Protecting your precious image...
kostovaDate: Friday, 2009 October 02, 0:35 AM | Message # 1
Font size: A | A |
Colonel
Group: Administrator
Message: 268
[ ]
Offline
When it comes to protecting our images, we all look to the notorious function: Disable Right Click!

Although, we never really see the importance of right clicking until it's taken away from us. Like a person, somewhat (michael jackson haha!).
Some of us, when we encounter the nonfunctional right click that's suppose to be enabled on your computer, get annoyed by it. Some of us even go to the lengths to temporarily rid of the nuisance.

But you don't really have to go to those nasty popups that say "This image is mine. Don't steal it! *no right clicking* " or say even nothing at all, making a person go crazy, trying to figure out why their mouses aren't working.

Which is why, the good ol' protecting your images comes in all fashions.
I'm going to go on a blatant assumption that you, a uCoz user, are using this for the photo albums module. So here's the down low on that.
Page with a full-sized photo and comments

Code
<!- replace $PHOTO$ with the following code -->
               <div id="photoContainer">
                       <img src="http://davidwalsh.name/dw-content/blank.gif" width="100%" height="120%" alt="" class="eeyaw"/>
                       $PHOTO$
                   </div>
                   <style type="text/css">
                       div#photoContainer {position:relative;} img.eeyaw {position:absolute;top:0;left:0;z-index:10;}
                       div#photoContainer img {}
                   </style>

So basically what this does is this,

You see? Right clicking is still enabled. No need for javascript. Compatible with all browsers and best of all, Dumbledore will still be puzzled.

prerequisites:
http://davidwalsh.name/dw-content/blank.gif [download > replace url]

Happy right-clicking!

 
BadBoyDate: Friday, 2009 October 02, 2:51 AM | Message # 2
Font size: A | A |
Lieutenant
Group: uCozer
Message: 74
[ ]
Offline
i like this way better

your tutorial seems kind of messy...
also it does not tell us exactly what this code does
i had to install it just too see how it works, basically it replace url of your image with http://davidwalsh.name/dw-content/blank.gif
right click still enables which is good thing....

Added (2009-10-02, 2:51 Am)
---------------------------------------------
fyi you placed your code in css part of the forum, i thing it is wrong

 
kostovaDate: Friday, 2009 October 02, 2:53 AM | Message # 3
Font size: A | A |
Colonel
Group: Administrator
Message: 268
[ ]
Offline
BadBoy, the image shows it.
If you try and right click the image and view it and/or copy the url, the blank image covers it.

The image example shows what it will look like if you were using firefox and right click, and view the image. Instead, you're viewing the blank.

And it is placed correctly. The code exemplifies what CSS can do for you, which is less obtrusive than javascript.

 
njustedDate: Sunday, 2010 October 24, 2:23 PM | Message # 4
Font size: A | A |
Private
Group: User
Message: 12
[ ]
Offline
nice code!
 
uCoz Support Forum by uCozers » Coding » CSS » Protecting your precious image... (sml[tutorial]oh the precious images...)
  • Page 1 of 1
  • 1
Search:


Copyrights uCozers 2009 - 2019 To TOP
Refresh Smileys Manager