Friday, January 29, 2010

Secure Your Blog Photos: A How-To

I can't believe I'm writing a post about how to do anything on a blog since I have all the technical ability of a blind monkey. But, after my last post mentioning that I disabled the right-click function on my blog, some of you have asked how I did it.

For those of you who couldn't give a hoot about blogs, HTML code and all things technical, you can quit reading now. Come back tomorrow for more of my usual fare.

Now to the technical stuff. First of all, I didn't do this by myself. I had some code and instructions from the Internet, but no matter what I tried, I couldn't get it to work.

Enter Brad Murray, of Brad and his wife Jen have quadruplet boys. You can check them out at Just promise me you won't abandon my cuties for theirs! :-)

Anyway, Brad provided me with a little HTML code and the instructions on where to insert it in Blogger to disable the right-click function. I followed his directions and lookee there, it worked! Even I couldn't mess this up.

Here are the code and the instructions, courtesy of  Brad, who was kind enough to allow me to share them with you.

The instructions are for Blogger blogs only. The code would work on any blog, I'm sure, but the instructions might differ a little bit if you are using a different platform.

Go to the Layout tab on your blog. Click on "Add another gadget," then choose the HTML/Java Script gadget.

When the "Configure HTML/JavaScript" box opens, paste the code below in the content section. Don't title the gadget.

Then make sure to move the gadget to the very top of your blog so it will affect everything on the page. I couldn't get mine to move above the header, but I placed it right below, and it works on the whole page, including the header.

Here's the code, but listen carefully. Because I know NOTHING about code, I couldn't figure out how to get this to show up as text instead of functioning as code, so I removed two of these little dudes: <.

For this code to be complete and actually work, the first line needs to have a < at the very beginning, right before "script"). And the last line also needs to have a < at the very beginning, also right before "script." See, I told you I was illiterate when it came to this stuff.

Brad, if you're reading this and shaking your head, feel free to chime in with how I can fix this and make it easier for my readers. I may not be able to deal with this code stuff, but you need to fix a dangling participle, I'm your woman.


script language="JavaScript">
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;

And there you have it. I hope it works for you, because if it doesn't all I can offer is my sympathy.
© Trippin' Mama 2010


The Murray Crew said...


My apologies that the carrot's (<>) disappeared when I sent the e-mail. Bravo on figuring that out!

I am going to actually create a "bloggers help page" on my website as a service to bloggers. I will give tips, tricks, and code to use for different basic functions for bloggers like yourself who want to dabble in it, but not necessarily learn the whole code.

Probably do this within the next month or so, so keep a lookout!


Christy AKA Trippin' Mama said...


You give me WAY too much credit. The caret were there in the original code you sent. But when I copied that into my blog post the text didn't show up, because the JavaScript was working. I couldn't figure out how to make it show up as text instead of functioning as code, so I took the carets out and added my extra instructions to put them back in.


Megan said...
This comment has been removed by the author.
fraizerbaz said...

Neato! Thanks to you both for sharing this very cool tip!

Nikki said...
This comment has been removed by a blog administrator.
Abby said...

Jen and Christy,
Thanks for the tips. I would hate to make our blog private :( But, do want to make it safer. I will be doing this.

Brenda said...

Hi, not sure if you'll see this post since it's been over a month since your original. I wanted to say thanks for posting this and I used it right away. But today I noticed that if I left click on the picture it will enlarge it and then I can right click and email it or copy it. Have you run into the same problem and do you know any way to prevent this from happening? Love your blog, your kids are so fun!

mom of 8 1/2 month GGG triplets :)