
Description
This script will replace anything before a start body tag and
after
a stop body tag in any html file it finds with these tags within
its
working area and below.
Features
? Simply and quickly replace blocks of text or copy in files
? Recurses to an unlimited number of directories under its operating dir.
? Allows you to easily change an entire sites layout by replacing
chunks
from static html documents, unlike using SSI which
can slow your server.
Installation
Path to Perl
#!/usr/bin/perl
1. The script uses the most common path to Perl however if the
script doesn’t run for you, you may have to change the first
line
of each cgi and pm file.
Configuration
1. The script modpage.cgi has several variables you may wish to
set.
These files should reside in the same location as
this script.
a) $topfile, this file is the header file you wish to use
to replace any text before the start body
tag.
b) $botfile, this file is the footer file you wish to use
to replace any text after the stop body tag.
Uploading
1. Change to the root directory where you wish to start replacing
text.
2. Upload modpage.pl and the top.html and bot.html in ASCII mode.
3. CHMOD modpage.pl to 755.
Running
Insert into your html files these 2 tags.
1. At the beginning of your body, after the header html in your
pages,
add this tag: <!-- start body -->
2. After your body text and before the footer html of your pages
starts,
add this tag: <!-- stop body -->
Now that all your html files that you create for a website have
these
2 tags, you can at any time change the look and feel of your
pages simply
by changing the html in top.html and bot.html and running modpage.pl
from a
telnet session as follows:
1. Change to the directory the script sits in.
2. Type: ./modpage.pl
|
|
||||||||
|
||||||||
|
||||||||