Mason Tree

 

This 'site' creates a virtual tree, on a database.
First, the download: mason_tree.tar.gz

If you'll start at the home, you will see this:

Wellcome to the home page!

Subfolders:
test_dir 1 m test_dir_2

Items:
test_item_1

Oh, let's browse a folder!

Up to home

Subfolders:
test_subdir 1 changed test_suxbdir_2

Items:
Leaf no 5 item 2 test

Can we edit it? sure we can!

Edit Folder: test_dir 1 m

Edit Folder's Properties:
Folder URL:
Folder Name:

Remove SubFolders:
Remove Subfolder: test_subdir 1 changed
Remove Subfolder: test_suxbdir_2

Remove SubItems:
Remove Sub item: Leaf no 5
Remove Sub item: item 2 test

Hey, what about the leafs?

Return to folder: test_dir 1 m

A lot of text can be entered here.

Edit this item!

Item Name:
Content:

A ReadMe file is included:

Installation Procedure for Mason Virtual Directory

1. Needed Software:

Apache 1.3.29 (http://httpd.apache.org/)
Mod Perl 1.29 (http://perl.apache.org/)
Mason 1.25 (http://www.masonhq.com/)
MySQL 4 (http://dev.mysql.com/)

2. This package contain:

This readme.txt file.
'site' directory containing perl modules:
dtype.pm - Data types handling
url.pm - URL generation
crev.pm - Database work
'mason' directory containing dynamic HTMLs
item.html - viewing items
folder.html - viewing folders
edit_item.html - editing an item
edit_folder.html - editing a folder.
Note that these files contain perl code inside, and are not just htmls.
building_site_db.txt - SQL commands for building the database.

3. Configurating Apache:

Adject your startup.pl file:
use lib qw(/home/semuel/perl/);
set the path to point to the 'site' directory location.

Inside your Apache httpd.conf file:
PerlModule Apache::DBI
PerlRequire startup.pl
PerlModule HTML::Mason::ApacheHandler

# Alias for the location of the files:
Alias /mason/ /home/semuel/mason/
# Set this variable to where the mason files are:
PerlSetVar MasonCompRoot /home/semuel/mason
# Set this to some free directory that apache can write to:
PerlSetVar MasonDataDir /home/semuel/mason_data

<Location /mason/>
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</Location>

4. Configurating MySQL

use building_site_db.txt like this:
mysql -u root < building_site_db.txt
Note: This will destroy a database named 'crev', if exist.
If this is not what you wish, please manually edit building_site_db.txt.
You may need also to adject the database connecting string, at the buttom of site/crev.pm file.

5. The End

Use URL: http://localhost/mason/folder.html?path=
to see the results.

Does that looks good? oh yeah. I like.
Well, that was a cute pet project.
See my license plate.

Semuel. (09/06/2004)