Emaze Forums: Code

Terminology
system Collection of all conferences. The system includes everything.
conference Collection of forums. Level at which most options, permissions are set.
forum Collection of messages. A forum can be in multiple conferences, allowing the same forum to list messages in a different order and even be moderated for one group, but not another..
alias File which allows you to use any URL for users to log in, enter anonymously, or go to add user screen. Must be a valid filename. Emaze Forums automatically places a .cfm extension after the alias.
anon Users may enter a conference or the system without a username, i.e., they enter anonymously.
group Collection of users. Used for assigning permissions. Users may belong to multiple groups, in which case they are given the maximum combined permissions.
admin Users may be given admin permission to a forum, meaning they can delete all messages and moderate (approve, reject new messages).

Directories
admin Files which runs the admin screens.
attachments Stores attachments. Each forum is a subdirectory by forumID name. Directory can be anywhere. It does not need to be within EmazeForums.
conf Stores conference settings, including body tag, headers, footers, and various settings for quicker retrieval (rather than database). Each file name begins with the confID.
default Default settings for new conferences and forums.
forum Settings for each forum. Each file name begins with the forumID.
program Files which run the user interface (you know, the actual program).
system Stores system options, including body tag, headers, footers, and other settings.



Below is a list of variable file names in Emaze Forums. Filenames with text surrounded by sharp signs (#text#) indicate these files are created by Emaze Forums. There are 6 types of these files:

#confID#SomeText.cfm
Stores information for a particular conference. There will be one of each file for each conference. The confID is the unique identifier of a conference. It is simply a number, starting with 1, assigned when the conference is created. The files are deleted when the conference is deleted. These files are all stored in the conf directory.

#confID#-#groupID#Permissions.cfm
Stores the permissions of a particular group for a particular conference. There will be one of each file for each conference / group combination. In other words, if you have 5 conferences and 10 groups, there will be a total of 50 files. The groupID is the unique identifier of a group. It is simply a number, starting with 1, that is assigned when the group is created. The appropriate files are deleted when the conference or group is deleted. These files are all stored in the conf directory.

#forumID#SomeText.cfm
Stores information for a particular forum. There will be one of each file for each forum. The forumID is the unique identifier of a forum. It is simply a number, starting with 1, assigned when the forum is created. The files are deleted when the forum is deleted. These files are all stored in the forum directory.

#SomeText#.cfm
These are alias files which point to the login screen, anon login script, or add user screen for a conference or the system. They do not have the conference ID in the name since they are the URLs used to allow users to enter Emaze Forums. These files are all stored in the EmazeForums directory, or whatever the main directory is.

#forumID#/
Name of subdirectory within attachments directory. Used to store uploaded files for each forum.

#attachmentFilename#
Name of uploaded file in attachments/#forumID# directory.



Below is a list of all files by directory, with an explanation of the purpose of each file. Each file is commented to help you understand how Emaze Forums works. We have made every attempt to comment the code as best as possible. However, if you ever have any questions, please let us know.



EmazeForums/
#confUrlAdduserAlias#.cfm Alias file for each conference to add user screen
#confUrlLoginAlias#.cfm Alias file for each conference to login screen
#confUrlAnonAlias#.cfm Alias file for each conference directly to homepage (anon login)
#systemAnonAlias#.cfm Alias file for system to homepage (anon login)
#systemLoginAlias#.cfm Alias file for system to login screen
#systemAdduser#.cfm Alias file for system to add user screen
emazeforums.mdb Default database file for Access 97
database.html Text file containing database tables, fields, and field settings
files.html List of initial files and directories
initialize.cfm Script which initializes system with basic system information.


EmazeForums/admin/
bodyEdit.cfm Edit body tag options. In separate file since same code is used in multiple files.
confCreate.cfm Create a new conference with default conference options.
confDefault.cfm Home page to set default options for new conferences. Simply includes defaultHome.cfm .
confDefaultHome.cfm Home page for default options. Included after default options are updated.
confEdit.cfm Edit an existing conference. Points to confEdit2.cfm, which does the actual updating.
confEdit2.cfm Updates conference options.
conference.cfm Home page for editing existing conferences. Simply includes conferenceHome.cfm .
conferenceHome.cfm Home page for edit conference options. Included after conference options are updated.
confStatus.cfm Edit status of conferences: active or inactive. Delete inactive conferences.
confSelectList.cfm Creates list of conferences for navigation.
forum.cfm Home page for editing existing forums.
forumAll.cfm Lists all forums by status: active, inactive, archived.
forumCreate.cfm Create a new forum with default forum options.
forumDefault.cfm Set default options for new forums.
forumEdit.cfm Edit an existing forum. Points to forumEdit2.cfm, which does the actual updating.
forumEdit2.cfm Updates forum options.
forumHome.cfm Home page for editing forums.
forumSelectList.cfm Creates list of active or archived forums for each conference for navigation.
forumStatus.cfm Edit status of existing forums: active, inactive, archived. Delete inactive forums.
forumStatus_add.cfm When an inactive forum is made active/archived, forum is added to list of forums for conferences with custom order.
forumStatus_remove.cfm When an active/archived forum is made inactive, it is removed from forum list of conference with custom order.
forumStatus_update.cfm When forum status is changed, updates status in database.
group.cfm Home page for editing existing groups. Simply includes groupHome.cfm .
groupCreate.cfm Create a new group.
groupDelete.cfm Deleting existing groups.
groupEdit.cfm Edit group options. Calls groupEdit2.cfm, which does the actual updating.
groupEdit2.cfm Updates group options.
groupHome.cfm Home page for edit group options. Included after group options are updated.
help.cfm Help file for admin screens. Same as help.html file in EmazeForums/ directory.
index.cfm Login page for admin screens.
logoutAdmin.cfm Logs master user out of admin screen.
main.cfm Home page of admin screens. Contains an explanation of screens.
security.cfm Ensures unauthorized users cannot access admin screens. Checks for admin cookie which is given upon login to admin screens.
sysAddEdit.cfm Edit system add user, edit user screen headers.
sysAlias.cfm Edit alias files for system: login, anon login, add user.
sysAttachments.cfm Edit system attachment options, including attachments directory and file extensions (dis)allowed.
sysBadLogin.cfm Edit system bad login, no permissions pages. Bad login is when username and/or password are incorrect. No permissions page is for when user attempts to log in, but does not have at least read permission for the system or that particualr conference.
sysBody.cfm Edit system body tag, which appears on system pages, not individual conference pages. This includes system home page, system log in screen, system add user page, and edit user page.
sysEmail.cfm Edit settings for emails sent to users who subscribe to messages.
sysHomepage.cfm Edit system homepage header and footer.
sysLogin.cfm Edit system login screen header and footer. Determine whether users may log into system automatically via cookie.
sysMaster.cfm Edit master user info. Master is userID 0 and cannot be edited thru the normal admin screens. The master username also cannot access the forums.
sysMngAttachments.cfm Frame index for page to manage attachments. Lists attachments in each directory, enabling master to delete them.
sysMngAttachments_dir.cfm Lists the forum directories in the attachment directory.
sysMngAttachments_files.cfm Lists the files in the forum directory you choose.
sysPath.cfm Edit main system paths, including path and URL to Emaze Forums directory, Cold Fusion datasource name, whether cookies are used for anon users, and whether users may post messages in HTML.
sysQuery.cfm Edit system search query and results headers.
system.cfm Home page for system settings. Includes link to the various pages to edit system options.
toc.cfm Table of contents frame on left side of admin screens.
user.cfm Frame index for edit users screens.
userCreate.cfm Create new user.
userDelete.cfm Delete existing users.
userEdit.cfm Edit existing users. Create list of users based on search in userHome.cfm . Calls userEdit2.cfm .
userEdit2.cfm Displays user info to edit in right frame and processes the changes.
userHome.cfm Left frame for editing users. Displays list of users, allows searching.
userImport.cfm Import users from a comma-delimited text file.
validateUser.cfm Validate new users, ensuring username is not taken and password was verified properly. Adds user to user database.


EmazeForums/attachments/
aDeleteme.html File to delete. Exists because you cannot zip a directory with no files in it.
#forumID#/ Directory for each forum which as at least one attachment. Used to reduce the change that users upload an attachment with the same name, in which case Emaze Forums simply renames the file.
      #attachmentFilename# Uploaded file in #forumID# directory.


EmazeForums/conf/
cDeleteme.txt File to delete. Exists because you cannot zip a directory with no files in it.
#confID#AdduserHeader.cfm Header for add user scren for each conference.
#confID#AnonPermissions.cfm Anonymous permissions for each conference. Stored in database, but also text file for quicker retrieval.
#confID#Body.cfm Conference body tag. Individual elements stored in database, but full body tag is simply included in pages to be quicker.
#confID#Description.cfm Conference description. Stored in database, but also text file for quicker retrieval.
#confID#ForumFooter.cfm Footer of each forum in the conference. Is either the footer itself, or the path to an external file.
#confID#ForumHeader.cfm Header of each forum in the conference. Is either the header itself, or the path to an external file.
#confID#ForumOrder.cfm Order in which forums are listed in conference. Stored in database, but also text file for quicker retrieval.
#confID#Forums.cfm Custom order in which forums are listed for conferences which list forums in custom order. Does not exist except when conference uses custom order.
#confID#ForumSelect.cfm Select list of forums in conference in proper order. Used for navigation. Avoids re-creating list for each page.
#confID#HeaderFooter.cfm Conference header and footer settings for forum. Determines whether confFooter and confHeader are included, or whether they include the path listed in those files to the external files. Stored in database, but also text file for quicker retrieval.
#confID#HomepageFooter.cfm Footer of conference home page.
#confID#HomepageHeader.cfm Header of conference home page.
#confID#Hypertext.cfm Settings for whether messages automatically have URLs and email addresses hyperlinked. Stored in database, but also text file for quicker retrieval.
#confID#IncludeIndex.cfm Setting for whether to include index in forums. Stored in database, but also text file for quicker retrieval.
#confID#LoginCookie.cfm Setting for whether users may log into the conference automatically via cookie. Stored in database, but also text file for quicker retrieval.
#confID#LoginFooter.cfm Footer of conference login screen.
#confID#LoginHeader.cfm Header of conference login screen.
#confID#LogoutURL.cfm Logout URL where users are sent after clicking Logout button. Stored in database, but also text file for quicker retrieval.
#confID#Moderated.cfm Setting for whether conference is moderated, i.e., whether messages must be approved. Stored in database, but also text file for quicker retrieval.
#confID#MsgOrder.cfm Order in which messages are listed in forum. Stored in database, but also text file for quicker retrieval.
#confID#Name.cfm Conference name. Stored in database, but also text file for quicker retrieval.
#confID#NewUserGroup Default group(s) users added via conference login screen belong to. Stored in database, but also text file for quicker retrieval.
#confID#Search.cfm Permitted search options. Stored in database, but also text file for quicker retrieval.
#confID#SearchQueryHeader.cfm Header before search query interface.
#confID#SearchResultsHeader.cfm Header before search results.


EmazeForums/default/
confAdduserHeader.cfm Default header for add user screen for new conferences.
confAnonPermissions.cfm Default anon login permissions for new conferences.
confBody.cfm Default body tag for new conferences.
confBodyList.cfm Default body tag options for new conferences. Stores options in list rather than body tag itself.
confCreateList.cfm List of default files to be copied to conf directory when a new conference is created.
confDeleteList.cfm List of files in conf directory to be deleted when a conference is deleted.
confForumFooter.cfm Default forum footer for new conferences.
confForumHeader.cfm Default forum header for new conferences.
confForumOrder.cfm Default order in which forums are listed in new conferences. Cannot be custom order.
confHeaderFooter.cfm Default header and footer settings for new conferences. Determines whether confFooter and confHeader are included, or whether they include the path listed in those files to the external files.
confHomepageFooter.cfm Default home page footer for new conferences.
confHomepageHeader.cfm Default home page header for new conferences.
confHypertext.cfm Default settings for whether messages automatically have URLs and email addresses hyperlinked.
confIncludeIndex.cfm Default setting for whether to include index in forums.
confLoginCookie.cfm Default setting for whether users may log into the conference automatically via cookie.
confLoginFooter.cfm Default footer of conference login screen for new conferences.
confLoginHeader.cfm Default header of conference login screen for new conferences.
confLogoutURL.cfm Default logout URL for new conferences where users are sent after clicking Logout button.
confModerated.cfm Default setting for whether conference is moderated, i.e., whether messages must be approved.
confMsgOrder.cfm Default order in which messages are listed in forum.
confNewUserGroup.cfm Default group(s) users added via conference login screen belong to.
confSearch.cfm Defaul search options.
confSearchQueryHeader.cfm Default header before search query interface.
confSearchResultsHeader.cfm Default header before search results.
forumFooter.cfm Default custom footer for new forums.
forumHeader.cfm Default custom header for new forums.
forumHeaderFooter.cfm Default setting for header and footer option for new forums. Determines whether confFooter and confHeader are included, or whether they include the path listed in those files to the external files.


EmazeForums/forum/
fDeleteme.txt File to delete. Exists because you cannot zip a directory with no files in it.
#forumID#Description.cfm Forum description. Not currently used anywhere, but could be used on conference home page. Also stored in database.
#forumID#Footer.cfm Custom forum footer.
#forumID#Header.cfm Custom forum header.
#forumID#HeaderFooter.cfm Default setting for header and footer option for new forums. Determines whether Footer and Header are included, or whether they include the path listed in those files to the external files.
#forumID#Name.cfm Forum name. Stored in database, but also text file for quicker retrieval.
#forumID#Status.cfm Status of forum: 0=inative, 1=active, 2=archived


EmazeForums/program/
adduser.cfm Add new user page for when adding users within a specific conference. Conference add user alias files point to it.
addusers.cfm Add new user page for adding users to system rather than a specific conference. System add user alias file points to it.
anonLogin.cfm Sends anon users to conference home page. Determines permissions and creates cookie. Conference anon alias files point to it.
anonLogins.cfm Send anon users to system home page. Determines permissions and creates cookie. System anon alias file points to it.
confCheck.cfm Used in readForum.cfm and confHomepage.cfm to automatically log a user in as an anonymous user if they are not already logged in. Also used to determine conference permissions when coming from a system page or another conference.
confHomepage.cfm Creates conference home page.
copyright.cfm Emaze Forums copyright information. Included at bottom of each page.
delete.cfm Deletes messages, either by using deleting own message or admin user.
edituser.cfm Enables users to edit their own information, including username, password, personal info, cookie preference, and unsubscribe to messages. System page, not customized for each conference.
forumIndex.cfm Creates forum index.
getAttachment.cfm Used to download attachments. Ensures unauthorized users may not download attachments.
getPermissions.cfm Determines conference permissions when users log in or switch conferences.
getSystemPermissions.cfm Determines system permissions, including which conference user may read, when user logs in or returns to system home page.
homepage.cfm Creates system home page.
login.cfm Login page for users who log into conferences. Conference login alias files point to it.
logins.cfm System login page. System login alias points to it.
move.cfm Moves message to another forum (master only)
moderate.cfm Processes which messages are approved, reject, or ignored when admin moderates forum.
navigate.cfm Displays navigation buttons at top and buttom of each page.
navSelect.cfm Displays navigation select lists of forums in that conference and other conferences for which user has permission.
newForum.cfm Create new forum when user choose to post message to new forum.
postMessage.cfm Writes new message to database.
postMsgTemplate.cfm Interface for posting a new message. Included in both postMessage.cfm and reply.cfm .
printMsg.cfm Outputs messages in forum when user reads forum.
readForum.cfm Main pages which creates forum page when user reads it.
reply.cfm Creates page when replying to an existing message.
search.cfm Searches messages by user's criteria.
secure.cfm Ensures unauthorized users cannot access any files or pages. Checks for user permissions and userID cookies given upon login.
subscribe.cfm Subscribes user to a message to be emailed when responses are posted.
validate.cfm Validates user information when they are added to the user database. Ensures username is not already taken and password is verified properly. Also writes new user to database.


EmazeForums/system/
attachment01.cfm Stores variable for whether only specific attachment extensions are allowed or not allowed. (0 = all extensions but these are allowed, 1 = only these extensions are allowed)
attachmentExtensions.cfm File extensions which are specifically allowed or not allowed for attachments.
attachmentPath.cfm Path to directory where attachments are stored.
attachmentURL.cfm URL to download attachments.
badLogin.cfm Page displayed when users enter incorrect username and/or password when logging in to the system or a conference.
confAnonSelect.cfm List of conferences for which anonymous users have read permission.
confSelect.cfm Displays select list of conferences user has permission to read in navigation bar.
email.cfm Settings for the email sent to users who subscribe to be notified when replies are posted to a particular message.
nextConfID.cfm Stores next conference ID to be assigned when creating a new conference.
nextForumID.cfm Stores next forum ID to be assigned when creating a new forum.
nextGroupID.cfm Stores next group ID to be assigned when creating a new group.
nextMsgID.cfm Stores next message ID to be assigned when posting a new message (but not a reply to an existing message).
nextUserID.cfm Stores next user ID to be assigned when a new user is created.
noPermission.cfm Page displayed when user attempts to log in to conference or system, but does not have at least read permission.
systemAdduserHeader.cfm Header for system add user page.
systemAlias.cfm Stores the name of the system alias files for add user, login, and anon login.
systemBody.cfm System body tag. Used on system log in screen, home page, and edit user page.
systemBodyList.cfm Stores values in the system body tag.
systemDomain.cfm Stores domain name of site for purposes of writing permanent cookie for automatic login.
systemEditUserHeader.cfm Header of edit user page.
systemHomepageFooter.cfm Footer of system homepage.
systemHomepageHeader.cfm Header of system homepage.
systemInfo.cfm Sets variables for main system data. Contains 3 CFSET tags, which are included in every page.
systemLoginCookie.cfm Default setting for whether users may log into the system (all conference for which they have permission) automatically via cookie.
systemLoginFooter.cfm Footer of system login screen.
systemLoginHeader.cfm Header of system login screen.
systemLogoutURL.cfm Logout URL where users are sent when they log out from the system home page.
systemNewUserGroup.cfm Group(s) users are added to when they add themselves to the user database via the system add user page.
systemSearch.cfm Stores search options for system search.
systemSearchQueryHeader.cfm Header of system search page.
systemSearchResultsHeader.cfm Header of system search results page.



Copyright 1998, Emaze Software Corporation. http://www.emaze.com
If you have any questions, please email us at sales@emaze.com .