Ultra5 Set-Up and flow Chart

### *** *** ###

Flow Chart
Installation
Sub Domain Installation (optional)
Tryal System
Banner Rotation System
Changing the look of Ultra5 Librarys, Images, Buttons, Sounds
Notes


See Also:
Help on Creating Templates

Form Fields
Template Tags



### *** *** ###


After you have the program setup on your server, use this utility to test the build and mail.



NEVER   NEVER   NEVER   EDIT A SCRIPT WITHOUT MAKING A BACKUP COPY FIRST!!!

ALWAYS   use a plain text editor to make changes to the program files. Use Notepad or any other plain text editor that you have. I highly recommend Ultra Edit for making changes to the program files. Ultra Edit is a wonderful editor, I have been using it for 4 years.

Be sure to upload/download program files in ASCII mode!!

### *** *** ###

Directory Structure

    cgi-bin
          |
          |
          ultra (folder)
		|
		banner-mgt.pl		(Banner management)
		|
		banner-upload.pl   	(Banner Upload)
		|
		banner-write-dat.pl	(Used to add teh URL for a banner)
		|
		banner.pl  		(Banner Rotation Program)
		|
		bg.pl			(Tile Background Viewer)
		|
		border_bg.pl		(Border Background Viewer)
		|
		bottom-colors.pl   	(Color Picker)
		|
		forgetpassword.pl  	(End User password service)
		|
		form-upload.pl		(Upload for Form Pages)
		|
		form.pl			(Form Page for User Imput)
		|
		guestbook.pl		(Guestbook)
		|
		index_site.pl		(Used to "Index" the User Sites)
		|
		login.pl      		(Main Login for Users)
		|
		mailform.pl		(Form mailer for Users)
		|
		members.pl		(Members Administration Page)
		|
		menu-repair.pl		(Used to Repair a Corrupt Menu)
		|
		new-signup.pl		(Signup for New User)
		|
		new_user.pl		(Signup for New User)
		|
		preview.pl		(User Page Preview)
		|
		savepage.pl		(Saves User Page)
		|
		search.pl      		(User Search Engine)
		|
		show-page.pl		(Page Viewer for Preview)
		|
		statusers.pl		(Shows User Disk Usage)
		|
		sub_domain.pl		(SubDomain System)
		|
		test-mail.pl		(Test Ultra5 Mail)
		|
		test-ultra.pl		(Test Ultra5 Build)
		|
		top-colors.pl		(Color Display Page)
		|
		ultra-admin.pl		(Main Administration)
		|
		ultra-edit.pl		(User Advanced Editor)
		|
		ultra-filemanager.pl	(User File Manager)
		|
		ultra-mail.pl		(Ultra5 Mail Utility)
		|
		ultra-vcheck.pl		(User Online Check Program)
		|
		ultra5-configuration.pl	(Main Configuration File)
		|
		upload.pl     		(User File Upload)
		|
		user-list.pl		(Shows List of Users)
		|
		viewimages.pl		(User List of Images in their Folder)
		|
		|
           counter (folder)
		|       |
		|       |
		|       gr-count.pl (graphical page counter)
		|       |
		|       |
		|       counterlogs (folder for count logs)
		|
		|
             config (folder)
                    |
                    |
                    ultra5-configuration.txt	(Main Configuration File)
                    ultra5-options.txt	        (Main Configuration Options)
                    
             lib (library folder)
                    |
                    |
                    cookie-lib.pl (cookie program)
                    rlaj-library.pm (sub-routine library)
                    Sendmail.pm (mailer for windows servers)
                    smtp-mail.pm (mail program)
                    ultra5mail.pm (mailer for user signups)
                    
             logs (folder)
                    |
                    |
                    logs (user database and all log files)

             email-body (folder)
                    |
                    |
                    mail (mail body files for system)

             search (folder)
                    |
                    |
                    index.idx (search index and page top)
                    search-config.txt (search configuration)


                         ### *** *** ###
                         ### *** *** ###
                         ### *** *** ###



Root (Your Main Directory)
               |               
               |
               ultra (Main Builder Directory)
                       |
                       |
                      admin (your administration page)
                       |
                       |
                      banner-images (images for banner rotation program)
                       |
                       |
                      bkgrnd (all background images, buttons, etc)
                       |
                       |
                      border_bg_pages (HTML pages for border background selection)
                       |
                       |
                      commonimages (images used by the builder)
                       |
                       |
                      forms (program forms)
                       |
                       |
                      help (user help files)
                       |
                       |
                      icon_library (icon images for user use within the program)
                       |
                       |
                      image_library (images for user use within the program)
                       |
                       |
                      imagelibrary_pages (page viewer for browsing the library)
                       |
                       |
                      lib (libraries for javascript functions)
                       |
                       |
                      page_library (HTML menu pages for the image library)
                       |
                       |
                      samplepages (page design samples)
                       |
                       |
                      sound_library (available midi's for user pages)
                       |
                       |
                      templates (templates used by the program to generate pages)
                       |
                       |
                      tmp (temp folder for user preview of their page)
			  (* Must be world writable)
                       |
                       |
                      welcome_images (welcome images)
                       |
                       |
                      welcome_pages (HTML menu pages for welcome images)


                         ### *** *** ###
                         ### *** *** ###
                         ### *** *** ###


Setting Up Your User Root Directory (Folder)

Root (Your Main Directory)
               |               
               |
        User Root Folder (* Must be world writable)
                       |               
                       |
                        All User Folders 


Main Page Builder

Flow Chart

The opening page of Ultra HTML is index.html

The user now selects a page layout they would like to use, then the user logs into the system.

User Login > login.pl >top_colors.pl > form.pl > preview.pl > savepage.pl
bottom_colors.pl

Editors

Utilities


If the user selects template1 to use as their page layout


Installation

                      ### *** IMPORTANT *** ###

### *** If FTP'ing this file, be sure to send in ASCII format *** ###

# chmod is not necessary on NT servers - Ask your Server Administrator for help.

# You must chmod the .pl's to 755 
# chmod /cgi-bin/ultra/config directory to 777
# chmod /cgi-bin/ultra/config/ultra5-configuration.txt file to 666
# chmod /cgi-bin/ultra/config/ultra5-options.txt file to 666
# chmod /cgi-bin/ultra/logs directory to 777
# chmod /cgi-bin/ultra/logs/user.log to 666
# chmod /cgi-bin/ultra/logs/user.log.tmp to 666
# chmod /cgi-bin/ultra/logs/ok_domain.txt to 666
# chmod the /ultra/tmp directory to 777
# chmod the user root directory to 777
# chmod the /cgi-bin/ultra/counter/counterlogs directory to 777
# chmod the /cgi-bin/ultra/search directory to 777
# chmod the /cgi-bin/ultra/backup directory to 777
# chmod the /cgi-bin/ultra/email-body files to 666


# Edit files with a plain text editor, such as notepad
# I highly recommend an editor called Ultra Edit (shareware)
# http://www.ultraedit.com - it is a great editor for cgi and html

Setting Up the HTML Pages

Files that may need to be edited for your server

No other files should need changed.

Administration

The adduser program is simple and straight forward. Simple fill in the blanks for each user you add. The only required fields are: username, password, and number of pages allowed.

The Edit User Profile program allows you to remove users, modify their personal data, change password, deny them access, or remove a user completely from your system.

The New Signup program is for users to setup their own account. 'new-signup.pl' This program collects user information and allows the user to build a site very quickly. This program can use a 'trial period' to allow free signups for a certain period of time. When the site expires they no longer have access to the page builder or editor.

The New User program is for users to setup their own account. Used mainly for free web page type of programs. Although you can use a credit card fromt end to collect money from a user, then re-direct them to the 'new_user.pl' for site setup.

Notes:
You can not change the form for the upload.pl You may change the look of the form to suite your site.
The order and structure must remain the same.
DO NOT RE-ARANGE THE FIELD STRUCTURE.

                         ### *** *** ###
                         ### *** *** ###
                         ### *** *** ###

                     ### *** OPTIONS *** ###

               Located in the configuration file

            ### *** Sub_Domain configuration *** ###

# NOTE:  To use Sub_Domains for your users, you must set your DNS Server
# to accept "wildcards". This is NOT an Ultra configuration. You will
# need to have the server administrator set this up for you.

# If you want to use the sub-domain feature, set the variable below to '1'
# The sub-domain address would be (http://username.domain.com)
# 1 = Yes	0 = No
$use_sub_domain = '0';   

# Enter the URL to your default page. This is the page to display if
# there is not a match for a users sub-domain.
$main_url = "$home_page/homepage.html";

# Enter the title for your default page. (your domain name or site title)
$default_title = "Ranson's Scripts Ultra5 Web Site Designer";

# Enter your domain name. DO NOT enter the www (or default prefix)
# Use a dot (.) before your domain name.
$user_domain = '.server';

            ### *** End Sub_Domain configuration *** ###

# Note on Translator: This uses the Alta Vista translator,
# it is a free service. It would be good to send an email
# to AltaVista and ask for permission to allow your users
# access to this service. As of this moment they have been
# open to anyone using their service. That could change.
# If you would like the ability or users to be able to put a 
# 'translator' link on their pages, set the variable below
# to '1'                  # 1 = Yes	0 = No
$use_translator = '1';
$Translator_web_address = 'http://babel.altavista.com/translate.dyn';

# If you want to use the user to be able to choose "Villages" where
# They can place their folder, set use_communitys below to '1' 
# 1 = Yes	0 = No
$use_communitys = '0';

# Enter the path to the community file
$community_list = "$program_cgi_files/logs/community.list";

# Set the variables below to allow users access to the additional pages.
# 1 = Yes	0 = No
$allow_guestbook  = '1';
$allow_contact_us = '1';
$allow_about_us   = '1';

# Set $Use_Cookies below to '1' if you want to save the users
# username and password as a "cookie" on their machine. If we
# $Use_Cookies then the user will only have to enter their PW and 
# UN once per session. The cookie gets deleted when the user 
# closes their browser.
# 1 = Yes	0 = No
$Use_Cookies = '1';

# Do you want to allow users to upload HTML pages to their directory
# 1 = Yes	0 = No
$html_upload = '1';

# Enter the maxium size for image files to be uploaded by the user
# Enter number of bites - for 50k enter '50000'
$maxium_image_size = '75000';

# Do you want users to be able to add sound files to their pages
# 1 = Yes	0 = No
$allow_sound = '1';

# If you want to place a banner at the top of each user page
# enter your banner code in the variable below. The default
# banner code for the "built in" banner rotation is below.
$User_page_banner = qq(<CENTER><A HREF="$ultra_cgi_url/banner.pl?U"><IMG SRC="$ultra_cgi_url/banner.pl?I" BORDER=0></A></CENTER><BR>);

# NOTE FOR BANNER - The program uses this tag  <!USER_PAGE_BANNER> 
# on each template to place the banner on the user page.
# This tag appears just after the <BODY> tag on the template page.
# You may change the placement on the templates.

# If you want a link at the bottom of each user page to your home page
# or your copyright information, enter the link below.
$User_page_link = qq(<CENTER>This page is courtesy of <A HREF="$home_page">$default_title</A><P><A HREF="$ultra_easy/members.shtml">Members Area</A></CENTER>);

# Pop-up-window option
# This opens a 'pop up window' on each user page used for advertising etc.
# If you want a pop up window:
# 1 = Yes	0 = No
$pop_up_window = '0';

# Enter the full web address for the page to open for the pop-up-window
$page_to_open = 'http://server/ultra/popup.html';

# Enter the size of the window - width and height for the pop up 
# ( use a comma between width,height )
$pop_up_width_height = 'width=450,height=50';

# Meta Tags
# Set the meta_tags option to '1' below if you want users to be 
# able to add meta tags to their pages
# 1 = Yes	0 = No
$meta_tags = '1';

# To place an under construction page in the users directory at
# signup, set the $copy_index_page variable to "1"
# 1 = Yes	0 = No
$copy_index_page = '1';


# Below is the default text that appears on a new About Us and Contact Us pages.
$contact_us_welcome_text = 'Use this space to type a welcome message for your contact page.  To make the page look best, make your text fit in the text area below.<BR><BR>You can type as much text a you like here. You  can also use HTML tags if you like. Use a blank line to separate paragraphs.';

$about_us_company_text = 'Use this space to type your Company or Personal information.  To make the page look best, make your text fit in the text area below.  Use a blank line to separate paragraphs.';


# Enter any text that you want to appear at the bottom of the program pages
# NOTE: You can not use the words "copyright YOUR NAME" 
# This program is copyright by Ranson's Scripts
# you can say "Copyright 1997/2001 all Rights Reserved"
$Page_Bottom_text = 'Copyright 1997/2001 Ranson\'s Scripts all Rights Reserved';


                        ### *** TRIAL OPTION *** ###


# To use the "Trial" option, set use_trial below to '1'
# 1 = Yes	0 = No
$use_trial = '1';

# Enter the number of days for free access to the builder before user expires
# They are denied access to the system after ?# days
$exp_days = '5';

# Set the number of days to leave the user site on the server AFTER the user 
# has expired.  This is a "Grace Period" to allow the user time to pay for the site.
# EXAMPLE: if you set the $exp_days to 5 and you want to remove
# the site after 15 days, set the $remove_user_after to '10'  (5 + 10 = 15 days)
$remove_user_after = '10';

# Enter the path and name of the mail body file that is sent to expired users
# The default file is used below - do not change unless you need to.
$trial_exp_mail_body = "$program_cgi_files/email-body/trial_mail.txt";

# Enter the "Subject" for the trial expired mail.
$trial_exp_subject = 'Your Trial Period Has Expired';

# Enter the text for trial users that you want to appear on the final screen (savepage.pl)
# after the user saves a page - you can use as much text (HTML tags) as you need.
# DO NOT DISTRUB THIE LINE DIRECTLY BELOW
$Trial_user_text = qq(
<CENTER><B><FONT FACE="Arial" COLOR="000080" SIZE="+1">Thank you for demoing our system.</FONT></B>
<BR><BR>
<B><FONT FACE="Arial" COLOR="000080" SIZE="+1">If you would like to signup for hosting, <A HREF="">Click Here</A></FONT></B></CENTER>
<BR><BR>
); # DO NOT DISTRUB THIS LINE

                        ### *** :) *** ###

             ### *** END OF CONFIGURATION SECTION *** ###
  

 

Sub Domain Installation

Step by Step Setup

The Sub-Domain System requires Server Side Includes.

1. You will need to have the DNS server record for the domain you are using
   set up to accept "wildcards"
   This has been tested in Linux and BSD
2. Place an index.shtml page in the "users" directory with only one line of code in it:
   <!--#exec cgi="/cgi-bin/ultra/sub_domain.pl"-->
3. Set the varaible to "1" in ultra5-configuration.pl - $use_sub_domain = '1'; 

Make sure that somewhere on your help pages or one of your main pages that 
you tell the user what their domain name will be. - http://username.your_domain.com
The user will be told this at signup, and we will email the user this address.

When a user saves a page, they will be shown the "real" address to the file:
http://www.your_domain.com/users/UserName/Filename.html   This can not
be changed. The Sub-Domain System will not work to a specific file in a users
directory.  The Sub-Domain System will take the user to their Home Page (index.html) 
then they will be able to navigate the site from there.

A sample index.shtml file can be found in the /read-me/users folder.

If you are using the Sub-Domain system, I highly recommend you use a seperate 
domain name for your users.


 

WildCarding Your DNS Server

In the .db record for your domain, simply add an "alais" "*" - just like
you would add an "alais" like "www" or "ww2"

Snipit of .db record:

$ORIGIN your_domain.com.
www             IN      A       209.48.61.51   ; Your "users directory" IP address
                                           
*               IN      A       209.48.61.51   ; Your "users directory" IP address


How The Sub-Domain Works


All HTTP requests are directed to the index.shtml file in the "users" directory.

The index.shtml redirects the request to the sub_domain.pl.

The sub_domain.pl looks up the requested user in the password file (user.log).
If there is a match, the sub_domain.pl creats a frame set and "calls" the
"real" address for the users Home Page: 
http://www.your_domain.com/users/UserName/  

The Address line in the users browser will show the Sub-Domain address.
http://UserName.your_domain.com  

Browser >> index.shtml >> sub_domain.pl >> users Home Page

 

 

Changing the look of Ultra5

NOTE: You may not put a "copyright" on the Ultra5 pages.

You may put "brought to you by YOUR NAME" or something like that.


Image Library You can add to the image library by creating new images and uploading them to the /ultra/image_library folder. Use the HTML pages in the page_library for a template to make your new page. These pages are used by the program. Image must be *.jpg You will also need to make new pages in the /ultra/imagelibrary_pages, these are the pages used for browsing the library. Welcome Image Library The welcome library can be changed in the same way as the image library. Or you can make new images and use the same names as are already there. Images are in the /ultra/welcome_images folder Menu pages are in the /ultra/welcome_pages folder Sound Library You can add to the sound library by uploading new sounds to the library and adding the new file to the menu. Sound files in the library MUST be named SL-name.mid Sound file names must start with the SL- in order for the program to know that the sound the user wants in the library. Changing Buttons The easiest way to change the buttons is to make a new set and use the same names for the images that are there now. The first set of buttons are: s1aboutus.gif s1blankantler.gif (blank image -> s1 is the style, blank means "blank", antler is the font face.) s1cart.gif s1contactus.gif s1email.gif s1guestbook.gif s1home.gif s1menu.gif All buttons MUST start with an s and must be .gif images. There are 20 sets of buttons included with Ultra5. Changing Ultra5 Logo The logo for Ultra5 is located in the /ultra/commonimages folder and is named ultra5-logo.gif. Make your new logo and name it the same name then upload it to the /ultra/commonimages folder and you are done. Common Images All the images used by the Ultra5 builder pages are located in the /ultra/commonimages folder Logos Icons etc Template Images All the template images used by the Ultra5 builder are located in the /ultra/templates folder index.html page templates border background templates mail templates guestbook templates speciality templates
Ultra5 Trial System

With the trial system you can allow users to create and account for a certain period of time to build a home page and "test" the system. After the period of time has elapsed, they can no longer access the page builder. If a user tries to login after the trial period has expired they will receive an error screen. You can edit the error screen to suite your site. Refer them to a signup page or ...
The HTML for the error screen is in the rlaj-library.pm starting on line 535.

The HTML code and text for the final screen (savepage.pl) that the users sees after they save their page is in the ultra5-configuration.pl file. Use this code to prompt the user to go to a registration area to signup for your service, or any info you want a "trial" user to see.

The trial system includes a utility for emailing users that have pased their exp. time. The time for expiration is set in the ultra5-configuration file. There are 2 times to set in the config file.

# FROM CONFIG FILE

# Enter the number of days for free access to the builder before user expires
# They are denied access to the system after ?# days
$exp_days = '5';

# Set the number of days to leave the user site on the server AFTER the user 
# has expired.  This is a "Grace Period" to allow the user time to pay for the site.
# EXAMPLE: if you set the $exp_days to 5 and you want to remove
# the site after 15 days, set the $remove_user_after to '10'  (5 + 10 = 15 days)
$remove_user_after = '10';
After the expire time, the user will receive an email when you run the "Remove Trial Sites" utility. This utility should be run about every 2 days depending on the number of signups and how ofter you would like to send reminders to your users. NOTE: if you have a lot of users the "Remove Trial Sites" utility can take a while to run, do not click stop on your browser or reload. Your browser may even time out, just let it do its thing.





Ultra5 Banner Rotation System

Ultra5 V3.0 has a built in banner rotation system. You can use this to place banners on your user sites. There are several configurations that you may use for this system.

You can have banners on free sites and not on paid sites by using 2 signup programs, set one for no banners (paid sites) and one to place banners on the users pages (free sites). The variable that controls this is in the "new_user.pl" and the "new_signup.pl". Simply make a copy of the signup program you want to use, and save it as "new_signup2.pl". Then change the variables in the program for you needs.

You can also control the banners individually for each user. Use the site administration program to turn on/off banners individually for each user.

The 3rd way of controling banners is to add a variable or "argument" to the link string for the templates. Each link to the login page has many variables that we pass to the system so Ultra5 will know what to do for that page. In the login link string you can add &fob to the template link and it will not add a banner to that page. (see the template-tags.html for more information on this)

Since Ultra5 builds static pages for users, the page will have to be edited if you change the banner statis for an individual user.
EXAMPLE: If you have banners on your free sites and a user wants to change to a paid site, use the site administration program to change the statis of that user, then the user must edit the page to remove the banner.





Image Librarys

Image Librarys
The image library is provided free of charge for your use. We have done all the work for you, 
formated and colorized the images, made HTML pages and a menu. The images are from the 
"Borderbound" CD "ClickArt" 40,000. You must purchase the image cd BEFORE you use the 
image library. 
The cost of the CD varies, should be around $15.00, and is available from most software stores.

Photo Library

We have a second image library available with aprox. 3900 photographic images. 
We have done the same resizing and HTML pages with this Photo Library. Cost $200.00

The Library license must be purchased from: 
Nova Developement Corp
23801 Calabasas Rd. Suite 2005
Calabasas, Ca. 91320
818.591.9600

http://www.novadevcorp.com

The CD runs about $59.00 and is available from most software stores.
the title of the collection is:
Art EXPLOSION 250,000 (Platinum Edition)

This gives you a license to use the images on your site.

We are providing a service only. We do not sell the images themselves,
the images are owned by Nova Developement Corp and a license is
required for their use. You are paying for the labor to resize the images, 
create thumbnails, and develop the HTML pages, for use with your program.












With this system you need to give the files "permission" for them to run 
(for executables) and permission for the logs to be written to. This is 
done with a chmod command (Unix). 

The executable files (cgi) need 
read-write-execute + read-execute +read-execute  or 755. 

The log files need read-write + read-write + read-write or 666.

Directories where we "write files on the fly" The directory must be set to 777
read-write-execute + read-write-execute + read-write-execute

For Windows OS, the System Administrator must set the permissions.

A brief explanation of file permissions:

	Who has permission:
		OWNER (USER or YOU)
		GROUP (USERS GROUP)
		OTHER (ALL OTHER USERS)

	Kind of permissions:
		r READ (READ ONLY FILE) 
		w WRITE (WE CAN CHANGE THE FILE)
		x EXECUTE (WE CAN RUN THE PROGRAM)

	Setting the permission for each group - for an executable file:
		OWNER = r-w-x  (cgi) so that you can read, write, and 
			       execute the file.(you can write to or 			      
                               change the file)

		GROUP = r-x this gives the group, or your group, read &
			      execute permissions.

		OTHER = r-x this gives all others read & execute
 			      permissions.

Giving your files permission can be done in 2 ways. 

If you have telnet, log-in to your directory where your files are, at the 
prompt type: chmod 755 (cgi name) ENTER. And for the logs 
chmod 666 (log file name) ENTER.

If you have ws-ftp, then log-in to the directory where the files are, 
highlight the .pl files click the right mouse button.
A menu comes up, select chmod(unix). A window will come up with the chmod 
options. 
For owner: click all 3 boxes, r-w-x 
For Group: click r x
For other: click r x

For WS FTP it looks like this.

Do the same for the log files, except use rw-rw-rw

If you have Cute-ftp, then log-in to the directory where the files are, highlight the xxxx.pl (or the cgi name) click the right mouse button. A menu comes up, select - Change File Atributes. A window will come up with the chmod options. For owner: click all 3 boxes, r-w-x For Group: click r x For other: click r x

For Cute FTP it looks like this.

For more details on chmod see chmod2.htm