Download Perl ScriptsBookViewer - $0 Version 3.01
Add to Cart
demo/see it work
BookViewer Script by CrookedBush.com
(c) 2000-2003 Jason Silver
The BookViewer Script turns text files into virtual books.
Upload text files to a directory, then run the script. They are
opened by the script, displayed as a Library from which you can
choose. When you click on a book, the words are divided into pages
like a real book.
1. Setting some options at the beginning of the file
2. Creating the text books (any amount)
3. Using FTP to upload the files
4. Setting permissions on the files
5. Setting up links to the books
1. Using a text editor like textpad, or notepad, open the script
Make changes to the variables at the top of the file
The URL to your book images (some servers won't display images
if they're in the CGI bin). Include trailing slash. Relative
URL's are fine eg: '/images/covers'
$url_to_data = 'http://www.crookedbush.com/books/';
This is the actual path to this script (from server root), like
C:/data/etc/ or data/server/etc/
$path_to_data = '/www/crookedbush/books/';# path to the books and styles (from server root)
This the URL to the script.
$cgiURL = 'http://www.crookedbush.com/cgi-bin/';#URL to this scipt
The name of this script
$script = 'bookviewer.pl';# name of this script
If you haven't registered, please leave the ads at the bottom
of the book. Set to zero if you've registered:
$use_ads = 0;# Set use ads to 0 if you don't want ads.
Set the home link to the URL of your main page.
$home_link = "http://www.crookedbush.com/books/"; # link to your main home page.
To have page turning sounds and other upcoming sounds added to the book to make it seem
more realistic. Set to '0' (zero) to turn off.
$sounds = 1;
The books will have a little 'new' icon next to them when they are within this amount of
$new_book_limit = 5; # How many days is a book considered 'new'
The Library can display books in multiple columns. Set this to 4 to have four columns.
$library_columns = 4; # How many columns in library view
2. Set up the book in a notepad or textpad program.
1st line: title
2nd line: sub title
3rd line: author
4th line: book description
5th line: style (more styles available at www.intelliscript.net)
6th line: Story begins
Each carriage return, (new line) needs the html <br> (which stands for break).
The beginning of each new page (or chapter) needs <newpage> on a line by itself.
3. Upload the following files to your server
a. the script cgi-bin ($cgipath)
b. the images, books, and sounds to the graphics location ($url_to_data)
c. If you've purchased the additional book styles, upload them to the $url_to_data
with each style being in it's own folder or directory. For example, style12 is
in a folder called style12.
4. Set the permissions for the script file to '755'
Set the permissions for the text books to '777'
5. Open a book directly by including a question mark after the script
name, then typing bookname=name-of-book
6. Now test the script.
When it's working, you'll see the cover of the book, and be
able to turn through all the pages of the book.
7. Create your own styles by scanning or photographing an old book and
dividing it up into sections. A cover is 3 columns wide and 4 rows high.
An inside page is 3 columns wide and 3 rows high. Create your own sounds
and dimensions for each book by making a text file called settings.txt.
It looks like this:
font_name=Garamond, Times New Roman,times
Prizes are awarded for creative books. Send me your ideas!
THAT'S IT, FOLKS!
If you have suggestions, love mail, or hate mail, I want to hear
about them. firstname.lastname@example.org