dreamweaver mx

magneto125

Member
Aug 8, 2001
147
0
0
I'm trying to insert the same chunk of code in each and every page to keep images from getting stolen.
But the problem is i have like several hundred pages to update. Is there a way dreamweaver can update all the pages automaticly???...I really don't wanna do it by hand :-(

Thanks in advance...
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Sounds like a job for a perl script. Maybe someone can whip one up for you.


BTW, you know those don't work, right? You download all the images to your computer as you view the page and you can get them from the cache.
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
go to "find and replace"

find <head>

replace with <head><script>your javascript here</script>

Run that on your entire directory.
 

magneto125

Member
Aug 8, 2001
147
0
0
Thanks for you replys. Yeah i know i just want to disable right click and that little thing that comes up in xp to save images. I know theres a bunch of ways around it. Thought it might help to slow down people trying to take images. Thanks notfred i'll try that.
 

AgentEL

Golden Member
Jun 25, 2001
1,327
0
0
Are you using a template? If so, you can just make the modification to the template and apply the change to all derived pages. That's one of the strengths of Dreamweaver IMO.
 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
Originally posted by: amdfanboy
Sounds like a job for a perl script. Maybe someone can whip one up for you.


BTW, you know those don't work, right? You download all the images to your computer as you view the page and you can get them from the cache.

agreed. unless you can specify a way to block caching of images, which i don't think you can do.
 

magneto125

Member
Aug 8, 2001
147
0
0
No im not using a template i make most pages with notepad. But i'll use dreamweaver to do somethings. I seen in the snippets it has a disable right click script i put it and the starter script in the code but it dosen't work???? Nor does the one i was originally going to use. I found it at this
site. Its the one that disables the right click context menu.
 

mattg1981

Senior member
Jun 19, 2003
957
0
76
Originally posted by: amdfanboy
Sounds like a job for a perl script. Maybe someone can whip one up for you.


BTW, you know those don't work, right? You download all the images to your computer as you view the page and you can get them from the cache.


btw .. I got a perl script on the way to do it
 

mattg1981

Senior member
Jun 19, 2003
957
0
76
here is a simple perl script to look inside every .html file in the directory specified ... scan for the <head> tag and then prints on a newline under it <script>insert your script here </script>

it creates a new file (ie. the orignal was test.html) with a .NEW suffix (ie. the new file would be called test.html.NEW). First test out the script, and if you like the results, edit the perl script or create a new one to delete all .html files and then rename .html.NEW to .html.

hope this helps

Usage: sreplace <file/directory>


edit: forgot to mention you will have to replace that top line as well with the directory of your perl program

edit2: the code window is screwing up <'s and >'s along with other characters. Here is the code in a non-formated window:

-------------------------------<BEGIN CUT HERE>--------------------------

#!/usr/local/bin/perl -w

die "Usage: sreplace <folder listing>" unless @ARGV == 1;

@files = `ls @ARGV`; #change this command on windows to `dir \b @ARGV` (I think)

@htmlfiles = grep(/\.html$/,@files);

foreach $file (@htmlfiles) {
print $file, "\n";
open(CUR, "$file");
open(OUT, "> $file.NEW");

while (<CUR>) {
if ($_ =~ /<head>/) {
print OUT $_;
print OUT "<script>insert script here</script>\n";
} else {
print OUT $_;
}
}
}
 

magneto125

Member
Aug 8, 2001
147
0
0
Thanks for the script. I messed with dreamweaver and got the snippet code working but when i open my pages i get the prompt about opening pages with scripts in them from xp cause i have sp2 installed and if you don't enable it you can just right click and save anyway. Is there anyway to make it use the script by default?
Thanks in advance
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
I'm sure you realize print screen will always work for stealing images anyway. I've used it a few times when things were "disabled".
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |