Changing the index.html file with additional coding

Status
Not open for further replies.

Confused

New Member
Joined
Mar 22, 2013
Messages
3
Location
Rowlett, TX
Lightroom Experience
Intermediate
Help!! I have managed to get lightroom to do most of what I want, but would like to add a javascript code to disable the right click option on my large images. I have to code and it goes just behind the <head> script, but I cannot figure out how to add this. Anyone have any suggestions?
 
Hi Confused, welcome to the forum!

You should just be able to open exported web gallery index.html file in a text editor and add it in there.
 
Thanks Victoria,

I did that on each page and it worked but Im looking for a more permanent solution as doing it that way I have to open the large_image.html for each file and I wanted to automate it as sometimes I post more than 500 pics at a time and that is very time consuming. The script is easy to put in as it goes just after the <head> closure tag. I found the hidden lightroom header.html file, but it is locked.

I currently have saved it as another file and adjusted it to be what I need to be but since it the .css file is pointing to the original file, I still have not been able to master my problem. Maybe if I knew more about directing the .css file to point to my new header file I could make it happen.
 
To be honest, right click disabling can be bypassed so easily that it's hardly worth doing. Instead I'd encourage you to add a watermark to the images which makes it much more time consuming to abuse your images.

But if you do want to add a right click to hundreds of html files, you are going to have to make a copy of LR's built-in HTML gallery which you seem to have found.

Paste this default_html.lrwebengine in your application support folder (which has the presets and templates) in a folder called Web Galleries, which you may have to create. Rename the default_html, and then open the file galleryInfo.lrweb in a text editor. Change the title and id lines to something different from the built-in HTML gallery. For example:

title = LOC "$$$/AgWPG/Templates/HTML/Title=Lightroom HTML Gallery JB modified" ,
id = "com.adobe.wpg.templates.beardsworthMod",

You can then add your code to the header.html file.

Restart LR and you will see your modified version of the default HTML gallery.

John
 
Last edited:
John, You are my hero today!!! It worked wonderfully and you have saved me hours. You guys here have taught me so much in a short period of time.

I do use a watermark on my photos, but sometimes I need a little extra protection. I know there are ways around it but the average Joe or Josephina that Im dealing with don't really want to take the time to find ways around the right click disable, plus they don't always think there is a way around it.

Thanks so much... now on to the next project.
 
Glad to help. We've a wide range of experience on this forum and have a pretty good sense when someone will benefit from a more techy answer than usual.

John
 
Status
Not open for further replies.
Back
Top