Developer Manual
FCMS Overview
The following information describes a high level overview of how the site was designed.
Code
Each section of FCMS has its own .php page. For example: the homepage, calendar and message board have their own
.php pages, home.php, calendar.php and messageboard.php respectively. These files contain the
basic HTML structure of the site. Most of the code for the site is stored in classes in the /inc directory.
Each page of the site has its own class. The names of the classes are typically just the name of the page followed
by _class.php. For example: the class for the caledar is called calendar_class.php.
The files for the administration section of the site are stored in the /admin directory.
The files for the photo gallery are stored in the /gallery directory. The /gallery directory also
contains the /avatar, /photos and /upimages directories.
Themes
All themes for FCMS consist of at least one .css file and either make use of the existing images for the default
theme or include their own images located in a directory, named the same as the theme itself. See example below.
+ /themes
+......... /images
+................. /default
+................. /your_new_theme
- default.css
- your_new_theme.css
For more information on creating themes for FCMS, please read the Theme Creation Manual.
Database Design
fcms_address
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| userid | int(11) | No | 0 | |
| updated | timestamp | No | CURRENT_TIMESTAMP | |
| address | varchar(50) | Yes | NULL | |
| city | varchar(50) | Yes | NULL | |
| state | varchar(50) | Yes | NULL | |
| zip | varchar(10) | Yes | NULL | |
| home | varchar(20) | Yes | NULL | |
| work | varchar(20) | Yes | NULL | |
| cell | varchar(20) | Yes | NULL | |
fcms_board_posts
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| date | timestamp | No | 0000-00-00 00:00:00 | |
| thread | int(11) | No | 0 | Refers to fcms_board_threads.id |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| post | text | No | | |
fcms_board_threads
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| subject | varchar(50) | No | Subject | |
| started_by | int(11) | No | 0 | Refers to fcms_users.id |
| updated | timestamp | No | 0000-00-00 00:00:00 | |
| updated_by | int(11) | No | 0 | Refers to fcms_users.id |
| views | smallint(6) | No | 0 | |
fcms_calendar
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| date | date | No | 0000-00-00 | |
| title | varchar(50) | No | MyDate | |
| desc | text | Yes | NULL | |
| created_by | int(11) | No | 0 | Refers to fcms_users.id |
| type | set('Birthday', 'Anniversary', 'Holiday', 'Other') | No | Other | |
| private | tinyint(1) | No | 0 | |
fcms_gallery_category
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| name | varchar(50) | No | category | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
fcms_gallery_comments
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| photo | int(11) | No | 0 | Refers to fcms_gallery_photos.id |
| comment | text | No | | |
| date | timestamp | No | 0000-00-00 00:00:00 | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
fcms_gallery_photos
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| date | timestamp | No | 0000-00-00 00:00:00 | |
| filename | varchar(25) | No | noimage.gif | |
| caption | text | Yes | NULL | |
| category | int(11) | No | 0 | Refers to fcms_gallery_category.id |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| views | smallint(6) | No | 0 | |
| votes | smallint(6) | No | 0 | |
| rating | float | No | 0 | |
fcms_news
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| title | varchar(50) | No | | |
| news | text | No | | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| date | datetime | No | 0000-00-00 00:00:00 | |
fcms_news_comments
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| news | int(11) | No | 0 | Refers to fcms_news.id |
| comment | text | No | | |
| date | timestamp | No | 0000-00-00 00:00:00 | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
fcms_poll_options
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| poll_id | int(11) | No | 0 | Refers to fcms_polls.id |
| option | text | No | | |
| votes | int(11) | No | 0 | |
fcms_poll_users
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| option | int(11) | No | 0 | Refers to fcms_poll_options.id |
fcms_polls
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| question | text | No | | |
| started | datetime | No | 0000-00-00 00:00:00 | |
fcms_prayers
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| for | varchar(50) | No | | |
| desc | text | No | | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| date | datetime | No | 0000-00-00 00:00:00 | |
fcms_user_awards
| Field | Type | Null | Default | Comments |
| id | int(11) | No | | |
| user | int(11) | No | 0 | Refers to fcms_users.id |
| type | varchar(20) | No | 0 | |
| value | smallint(4) | No | 0 | |
| count | smallint(4) | No | 0 | |
fcms_users
| Field | Type | Null | Default | Comments |
| id | int(25) | No | | |
| access | tinyint(1) | No | 3 | |
| activity | datetime | No | 0000-00-00 00:00:00 | |
| joindate | timestamp | No | CURRENT_TIMESTAMP | |
| fname | varchar(25) | No | fname | |
| lname | varchar(25) | No | lname | |
| email | varchar(50) | No | me@mail.com | |
| birthday | date | No | 0000-00-00 | |
| theme | varchar(25) | No | default.css | |
| username | varchar(25) | No | 0 | |
| password | varchar(255) | No | 0 | |
| avatar | varchar(25) | No | 0x0.gif | |
| boardsort | set('ASC', 'DESC') | No | ASC | |
| showavatar | set('YES', 'NO') | No | YES | |
| displayname | set('1', '2', '3') | No | 1 | |
| frontpage | set('1', '2') | No | 1 | |
| timezone | set('-12 hours', '-11 hours', '-10 hours', '-9 hours', '-8 hours', '-7 hours', '-6 hours', '-5 hours', '-4 hours', '-3 hours -30 minutes', '-3 hours', '-2 hours', '-1 hour', '-0 hours', '+1 hours', '+2 hours', '+3 hours', '+3 hours +30 minutes', '+4 hours', '+4 hours +30 minutes', '+5 hours', '+5 hours +30 minutes', '+6 hours', '+7 hours', '+8 hours', '+9 hours', '+9 hours +30 minutes', '+10 hours', '+11 hours', '+12 hours') | No | -5 hours | |
| dst | tinyint(1) | No | 0 | |
| activated | tinyint(1) | No | 0 | |