


Specification, Structure, Source Library, Version & Suggestions for Future Development 
For telAngelix.com


Prepared for Kasra Meshkin
By
Scott Wright

2001 11 11


Specification, Structure, Source Library, Version & Suggestions for Future Development 
For telAngelix.com


Maintaining the Site

Explanation of variable text files:

1.	Global Variables (every 'config file' should have these)

verticeNumber = the number of vertex's or main links on the main menu

saucer_frequency = the saucer frequency is set to the highest or most frequent 
setting by default in the txt file as 1. If you increase that number you are 
increasing the value of a multiplier which is applied to the number of seconds 
until its arrival.

site_title = just what you would expect

highlight_colour = one of six words orange,red,grey,grey/blue,pink,cammo,lime. 
This controls the colour of the main menu on the site and a few other items

checkloaded = true (always, this is a termination string that allows flash to 
determine whether or not the entire config file has been loaded)(it also follows 
that it must be the last variable in the config file

perspective = any number between 1 and 10. This controls the extrusion of the 
menu. When objects move towards you how close (big) are they? 
Recommendation: 2

time1 = true or false. When a user has just registered the time1 value will equal 
true and when they login to the management interface it will bring them to the 
first time set up. In all other situations this variable should be set to false.

clientSite = true or false. For all the actual telangelix company sites the variable 
should be set to false. This is crucial. If it is not set this way the swf will interpret 
the links as if the main site was a client site and there are significant 
configuration differences between the two.

2.	General Discussion of config files

The files are nothing more than a series of name=value pairs in mime compliant 
format. The first pair can look like name=value, every subsequent pair must be 
preceded by an ampersand in the fashion,

name=value& name=value& name=value& name=value&

You will notice that the last ampersand is bolded, this is to draw your attention to 
the fact that nothing is after it. Flash would prefer that the config txts be an 
unbroken line of name/value pairs with preferably no white space. Weake 
humans find it difficult to read this format. Our fix is this. At every point you want 
to use a carriage return (such an antiquated term) in the txt file you must 
terminate that line with an '&'. This creates a few empty variables on the _root of 
the swf that look like (|,||,|||, etc.). No harm. I recommend a decent text editor that 
will allow for very long lines as there are long variables where you will not  be 
able to insert line breaks (ie. '&') If you do flash will always interpret it as the 
begining of a new variable. If you are right in the middle of a long submenu I am 
sure you can imagine the trouble it will cause.

3.	Links to other URLS

Each link to a url must be placed within the javascript you see below. It 
references a function located in the <head> of the .main sites html document. 
You can specify posistions etc. It measures position from (0,0)(upper right hand 
corner of the screen) in pixels. There are other window properties you can add 
into the script. Each must be preceeded by a comma and be within the single 
quotes. There are several other properties you can specify with javascript in the 
section between the last pair of ' '.

javascript:openNewWindow+('http://www.techno.ca','newWin1','width=400,height=400,scrollbars=no,top=100,left=250')

4.	Links to txt files

Links to txt files are (from the main site www.telangelix.com) are the name of the 
text file including the extension. So a text file about hockey might be named 
hockey.txt. When you want to refer to it from the config file, you call it by listing 
the filename and ext. All text files for the main site must be placed within the root 
directory of the site ie where the index page is located. The text files for the client 
sites are different from those for the main site.

For the main sites, each txt file must be named as above and placed within the 
proper directory. Each file must have 3 variables:

a)title=title of the document to be displayed 

b)bodytext=The text of the body including simple HTML tags. Think HTML 1, 16 
tags. Font colour, a href, bold, italic, underline, line break, paragraph etc. It is 
possible to use this tags to excellent effect. For instance placing mail addresses 
in an a href mailto: link, will allow you to trigger the mail client of the user. xcellent 
effect. For instance placing mail addresses in an a href mailto: link, will allow you 
to trigger the mail client of the user. You might also underline or bold the address 
to indicate that it is a link.

c)checkloaded=should be set to true 

For client sites the text of the text documents is listed as string variable within the 
config txt file itself. The link to the text file in the client sites has 3 variables 
attatched to it. 

a)label to be displayed on the link
b)title
c)text

In the config file for the client sites you will find these variables in this form:

a)	&Vertex1_label=Sample Title
b)	&Vertex1_title_text=Sample Title
c)	&Vertex1_bodytext=Sample body 

Note that the title for the label and the title text will always be the same 'if' the 
interface is   used to create the client site.	

5.	Music 

Music is currently arranged in this fashion. There are four swf files located in the 
main directory. These files are embedded wav files which Flash publishes as 
MP3s. They are downloaded on demand, not when the media is downloaded 
from the main site. You can experiment with different file sizes. Given the 
possibility of streaming it may not be entirely inappropriate to place entire tracks 
within the swf.  To add a track:

a)	Open Flash 5.0 (new document)
b)	Highlight frame 1 layer 1 on the new document 
c)	Choose 'file'  'import'  navigate to desired .wav or . file mp3  hit 
open
d)	Make sure the 1st keyframe is still highlighted  move your mouse 
over it
e)	Right click  and select 'sound' from the menu
f)	A floating panel will open up, next to the word sound you will see a 
drop down 
g)	Scroll down to your file and select it (there should only be 1)
h)	This will have placed your tack on the timeline although you will not 
be able to see it
i)	On the floating sound panel you will see a text field marked 'loops'
j)	Set this value to 9999
k)	  Save the document as trackx.fla
l)	Publish the document by selecting 'file' 'publish'
m)	You should now have a document named trackx.swf ready for 
upload                                                                                                     

6.	Sub-Menus

Sub-Menus are a collection of either text links or URLs. They are 
collected in one variable and are written as an array seperated by '|'. 
Functionally you can add as many links to a sub-menu as you like. 
However if the list becomes more than a certain amount there will be a 
noticeable pause as flash parses the array. If a link is a submenu it will 
have 3 separate variables asscoaited with it. The label for the link on the 
main spiral menu. The array of links that make up the submenu and the 
indivudual labels for these links. For example:

(this is the label for the link on the main menu)
&Vertex1_label=This is the label for the submenu on the main spiral 
menu&

(this is the array of links (url/txt))
&Vertex1_submenu_links=javascript:openNewWindow+('http://www.tech
no.ca','newWin1','width=400,height=400,scrollbars=no,top=100,left=250')
|javascript:openNewWindow+('http://www.yahoo.ca','newWin2','width=40
0,height=400,scrollbars=no,top=100,left=250')|submenu_test.txt|submen
u_test.txt&

(this is the array of labels  they must be in the same order as the 
links above)
&Vertex4_submenu_labels=label 1,label 2,label 3,label  4&

A link which is not a submenu will have one less variable associated with 
it and the submenu_links variable will be one string variable and not an 
array of links. It is not important that the extra variables be included but 
empty. The flash has been programmed to auto-sense link type and will 
only look for the extra variables when they are needed.

7.	Question and Answer Interface

The question and answer interface is currently very primitive. I believe it is an interesting and 
promising arena and one place where with a small amount of effort we could produce something 
with a wide field of application.  So in terms of future projects or extensions this is an area I would 
suggest concentration. Below you will find a list of the current limitations of this interface. These 
should be read as opportunities for extension.

The basic structure is as follows. These variables are located in the main directory in a txt file 
named qa.txt. Each answer 'has' multiple questions. Each individual question is named first by a 
letter which indicates which answer it 'belongs to', and a number which indicates its order, but is 
irrelevant except insofar as it provides a unique identifier for the pattern matching function.  
Answers are named only answerq and the letter which identifies them. You see an example 
below. Note you may use HTML in the reponse section.

qa1=what is telangelix&
&qa2=what do you do&
&qa3=what does telangelix do&
&qa4=what kind of business are you&
&answerqa=telAngelix Corp is a new age high.tech company holding the rights,ownership or 
assests of several US or CANADIAN companies, including: Processing Inteligence Corporation, 
eRendezvous Corporation (KasChum Internet cafe - Much eRendezvous), Xirac Computing 
Consultant and Dipole Partners. <p>The Spiritual part of telAngelix is not about commercial 
profitabilty, politics, racism, ageism, sexism, any "ism". It is about the soul's journey in the human 
body trying to fulfill. telAngelix is the result of the union of two people striving to help creation. 
Although established as a company committed to operating within society's current corporate 
structure, TelAngelix defies any definitive identification as such. Rather TelAngelix is an 
evolutionary entity seeking to explore avenues available to help individuals within our world.

Limitations: Each new question or new answer requires a corresponding change in the source. A 
more flexible function could be created. The categories are identified by letter and hence limited 
currently to 26. There is a certain amount of pattern matching, ie discarding of irrelevant 
information. This process could be fine tuned. The interface does not learn. It could.  I know your 
basic idea does not include db connectivity or backend script. Flash needs more horsepower in 
terms of text parseing power. If the preceeding suggestions were put in place we might see a 
slow down as the db of questions got larger. Further the user will be forced to download every 
possible question and answer whereas they may have only one question. This seems inherently 
limiting. I would recommend using a database with back end scripting to take care of text 
parseing. This would allow for faster access, and larger database which is more easily instantly 
updateable as it is a shared centralized resource.  I believe this does not harm the elegance of 
the idea. It only requires that  the user be connected to the internet while querying. In the case 
where it is important that searches be possible off line I could come up with a workable solution 
which would be a combination of approaches.




Database Structure & Directories Passcodes 

1. Directories

Directory structure is important. The relative placement of the various 
folders is assumed in the logic of the PHP and ActionScript. Changes to 
relative placement will result in a non-functioing site.  The structure is:

Main Docs directory at Telangelix has all the php files, aforementioned 
configuration and text files, and main html files. It also has the images 
directory. It has also a folder called sites. Sites should only have other 
folders with in it. These folders contain all the client sites. Each client site 
folder should have four files, tel.swf, main.txt, interface.html, and 
index.html.  The directory for each user will be named as the username 
which is unique within the system. All PHP scripts assume this to be true 
as well.

      2. Database Access

db p/c=telAng6

from run: (cmd prompt)

telnet shell19.addr.com
user:kasra
p/c:telAng5

     3. mysql db user info

Username: kasra
Database name: kasra
Password: telAng6

To Access the MySQL database

Type:
mysql -ukasra -ptelAng6 kasra


Use the following script to access MySQL db via PHP3/4


This script with run with permissions of:  644. This script can be used as 
a generic include to access the database from PHP. When the db is 
migrated to another serving environement, if we are lucky this should be 
the only file necessary to change, as an include its values should then 
cascade throught he rest of the scripts.


<?php

$DBName = "kasra";
$DBUser = "kasra";
$DBPass = "telAng6";
$DBHost = "localhost.addr.com";

$link = mysql_connect ( $DBHost, $DBUser, $DBPass )
or die ( "Could notconnect<br><br>" );

print ( "<br><br>Connected to mysql server successfully<br><br>" );

mysql_select_db ( $DBName )
or die ( "Could not select database<br><br>" );

print ( "Connected to database successfully<br><br>" );

mysql_close ( $link );

?>

4. Database Structure

The database structure:  There is one table. The table has 9 rows. The 
following will describe each of the fields and the data type associated 
with it:

usernumber   mediumint(10) UNIQUE   auto_increment 

username  varchar(25) binary    PRIMARY KEY

userpassword   varchar(25) binary 

fname      varchar(25)        

lname     varchar(25)        

useremail  varchar(50)        

registerdate  date  0000-00-00 

 lastaccesstime  timestamp(14)    NULL VALUES ALLOWED      

 config_info     text   NULL   VALUES ALLOWED

Important points are, the username is the primary key. It must remain 
unique. There can not be two identical usernames. The registration date 
and last accesstime are also recorded with the future use of this data in 
mind. There is also an unused row called config_info which is placed in 
the table for use in the case where the data storage for user config 
variables are migrated over to the database. The txt file would be stored 
in that cell.
5. Removing Users

The interface for removing users is located at: 

http://www.telangelix.com/test/remuser.html 

and will be located at

http://www.telangelix.com/remuser.html 


It simply requires the username and a password. The password is 
telAng5. If you want to change it Use the mytelangelix interface and 
change the password for the username 'admin'. If you request a user that 
doesn't exist you are going to get PHP errors returning. When successful 
it removes the user's entry from the database and deletes their directory 
and all the files within it recursively.

Changes like this should be made via the interface. Of course the db is 
completely editable via the cmd prompt. However there are no 
safeguards and it requires fewer keystrokes to empty the entire db than 
to remove one user.

PHP Programs

All PHP programs are written for PHP 4.0. They are should be located in 
the main directory of the web server. All make use of a php file named 
include.inc. When the site is migrated to another environment. The new 
configuration information should only have to be updated here.

1)	changepc.php -  changes the passcode in the database 
from present to selected, mails updated info to user
2)	Forgot_pc.php  mails current passcode to the address 
that corresponds to the provided username
3)	login.php  checks username and passcode, retrieves 
config txt file on success and passes the file to the 
sitemaker.swf and allows it to advance to the interface
4)	post_vars.php  receives name=value pairs from 
sitemaker.swf, strips certain characters, and writes them 
to a config file located in the user's directory. It 
overwrites any prev info.
5)	registration.php  this script checks the db to verify that 
no one has the requested username. If the username is 
free, this script adds the info to the db, generates an 
initial  passcode, and sends all the registration 
information to the user at the provided email address. It 
also creates the user's directory on the web server and 
copies (from files in the main directory) the initial set of 
files into the user directory and renames them 
appropriately. **You may intuit then that there are files in 
the main directory which acts as a source for the files in 
the client directories. If you change them, you will of 
course change future user files but not past ones. They 
are called: clientindex.html, clientflash.swf, 
clientdefault.txt, and interface.html. interface.html is also 
the html file which house the main interface.
6)	remuser.php  checks the admin passcode, and 
removes the user which corresponds to the username 
from the db along with their directory on the web server
7)	telsites.php -  queries the database for all active users 
and returns a list of usernames which is then loaded into 
the 'telangelix sites' interface on the main site.



Publishing the .fla into .swf

There are many options when publishing a swf from an fla. The best 
possible way to record the publishing info is to archive one of the source 
files. If necessary it can be reopened and the settings copied over. The 
main interface is published as tel.swf  It is not scaleable. It is set to 
display at 760 x 550 pixels. Debugging is not permitted. If it becomes 
necessary re-publish the file and upload it after back the original on the 
web server up. Do not publish an HTML file simultaneously, you must 
uncheck this option. If it overwrites the current HTML file you will lose all 
the extra code which is written in there. Generally it is best to keep the 
source file named as such and either publish to that name and change 
the file name or mark the settings properly and publish only the swf to 
the tel.swf file name.

Version Info

Macromedia Flash 5.0
Macromedia Flash Player Developer Edition
Macromedia Dreamweaver 3.0
Electric Rain Swift 3D Version 1
Sonic Foundry Sound Forge Version 4.0 Build 205
PHP 4
MySQL
Helios Software TextPad 3.2.5

Suggestions for future Development

Look for them in the future. See the question and Answer Interface if you are 
	hungry for Suggestions.





9
telAngelix.com Site Specifications
