Flede (Flexible data editor) is a free open source content management system. Flede provides flexible and powerfull mechanism (not policy) to manage data with almost any structure in MySQL database. Flede supports user authorization with group-based access rights with separate access rights to view, edit, add and delete data.
As Flede may be useful in many different situations we list only most common here:
Flede is supposed to work with PHP 4 or later and Mysql 4 or later. Flede managed tables should have unique id field. Flede interface is currently available in English and Russian.
You may download the latest version from SourceForge.net:
http://sourceforge.net/projects/flede/
If you want a table to be managed with flede you need to add a table description to MAIN TABLE. Table description determine a way table will be seen and accessible by flede users. Three flede internal tables are managed by flede and accessible to administrator by default as their definitions are added to main table during install. Go to "MAIN TABLE" from Tables list and click on "Add record".
Main table fields description: (don't panic, the example is in the next section). There is only several mandatory fields are marked bold and with asterisk, other fields may be safely left default.
Field name | Description |
---|---|
Table name:* | Name of table in database (e.g.: news) |
Table title:* | Name of table to display in flede (e.g: Company news) |
Title field:* | Name of table column to be displayed as record title (e.g.: title) |
Additional title fields: | Aditional title columns in pairs field:field_display_name serarated by semicolon (e.g: date:Issue date;author:Author of news or just date;author) |
Id field:* | Name of unique id column in the table (e.g. news_id) |
Order priority: | Table priority in the list of tables on main flede page (tables with smaller priority are on top) |
Hidden: | Hidden tables are not listed at flede main page, but can be accessed using explicit address (e.g.: index.php?t=7) |
Fields:* | Description of table columns to be
edited by flede user (not neccesary all table columns). It contains
one line for each table column. The format
of line is the following: field_name:field_type:field_display_name:default_value; field_name - is name of table field (e.g. news_author) field_type - is a field type in flede (not nessecary corresponding to mysql type). Field type determine the way how the field will be shown to flede user. The list of available types is:
default - is a default value (an optional parameter) |
Comments: | Semicolon separated comments to corresponding fields. Comments are considered as an addition to field_display_name and will be shown to user during table edit. |
Parent field: | If your table contains structured information (like website menu) you may select parent field name here (e.g.: parent_element_id). Then each record will be shown below and to the right of it's parent (record with id equal to parent field value). |
Theme field: | Use if you want to show table records split
into sections (themes). Format is: theme_field_name:themes_table_name:id_column:title_column Let's say you have news table with news_section column and you have also news_sections table with section_id and section_title columns. Use news_seaction:news_sections:section_id:section_title and your news will be separated by named sections in flede. |
Where query: | Use if you want to show in flede only record fulfiling some criteria (e.g. this.id>100). Use this.id insted of id here to avoid ambiguity in sql queries. |
Order by query: | Use if you want to order table records somehow (default: this.id desc) |
Table description: | Table description will be shown to user in top of table records list. |
Max file size: | Maximum file size for upload (if you have field of type "f"). Note that file size is also limited by php settings. |
Read group:* | Group id authorized to view records ("-1" - allow to all users) |
Add group:* | Group id authorized to add news records |
Edit group:* | Group id authorized to edit records |
Group authorized to delete:* | Group id authorized to delete records |
User table is much simpler.
Field name | Description |
---|---|
id* | User id |
Login name* | User login name |
Password* | User password, stored as md5() hash |
Real name | User real name |
Access groups | List of access groups, separated by comma (e.g 0,1,2), all users are automatically assumed to belong to "-1" group |
Last login | Last login time |
If you change your own list of access groups you need to relogin for changes to become visible.
Suppose we need to run a website with news (each containing some image) and articles (divided into sections) and have the following tables in the database:
mysql> describe articles; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | title | varchar(255) | YES | | NULL | | | date | datetime | YES | | NULL | | | message | text | YES | | NULL | | | short | text | YES | | NULL | | | active | int(11) | YES | | NULL | | | source | varchar(255) | YES | | NULL | | | section | int(11) | YES | MUL | NULL | | +-------------+--------------+------+-----+---------+----------------+ mysql> describe news; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | title | varchar(255) | YES | | NULL | | | date | datetime | YES | | NULL | | | message | text | YES | | NULL | | | short | text | YES | | NULL | | | active | int(11) | YES | | NULL | | | image | longblob | YES | | NULL | | | imagename | varchar(255) | YES | | NULL | | +-------------+--------------+------+-----+---------+----------------+ mysql> describe articles_sections; +-----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+--------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | title | varchar(255) | YES | | NULL | | | keywords | varchar(255) | YES | | NULL | | +-----------+--------------+------+-----+---------+----------------+
Let's make them accesible with flede.
Let's use group with id "0" for administration (access to system tables), "1" for articles_sections edit, "2" for news edit and "3" for articles edit, group "4" will be allowed to view all info. There is no special place for group definition, so we'll keep the numbers in mind.
Let's set up the following users (by adding info to usertable):
Administrator
Field name | Value | Description |
---|---|---|
id* | 1 | |
Login name* | admin | |
Password* | md5("flede") | |
Real name | Peter Ivanov | |
Access groups | 0,1,2,3,4 | need all access, so memebr of all groups |
Main editor
Field name | Value | Description |
---|---|---|
id* | 2 | |
Login name* | editor | |
Password* | md5("toredi") | |
Real name | Pavel Petrov | |
Access groups | 1,2,3,4 | main editor can manage articles,news and sections |
News editor
Field name | Value | Description |
---|---|---|
id* | 3 | |
Login name* | olga | |
Password* | md5("HudQwe") | |
Real name | Olga Pavlova | |
Access groups | 2,4 | Olga can view news and articles and edit news |
Articles author
Field name | Value | Description |
---|---|---|
id* | 4 | |
Login name* | ivan | |
Password* | md5("Vano") | |
Real name | Ivan Sidorov | |
Access groups | 3,4 | Ivan can view news and articles and edit articles, but can't edit articles_sections |
Company president
Field name | Value | Description |
---|---|---|
id* | 5 | |
Login name* | anna | |
Password* | md5("qynywee") | |
Real name | Anna Smirnova | |
Access groups | 4 | President can't edit, but can view everything |
Let's set up tables now (by adding them to MAIN TABLE)
Articles
Field name | Value | Description |
---|---|---|
Table name: | articles | name of table in database |
Table title: | Corporate articles | display name in flede |
Title field: | title | |
Additional title fields: | date | date will also be displayed in record list |
Id field: | id | id is unique id field here |
Fields: |
title:t:Article title; date:d:Publish date; message:T:Full text; short:T:Abstract; active:l:Active:1; source:t:Article source reference; section:B$articles_sections$id$title:Section | active is logical with default '1', message and short should be edited with textarea, title and source are short text, section will take values from articles_sections table with 0 value possible |
Theme field: | section:articles_sections:id:title | Articles will be shown divided into sections |
Read group: | 4 | |
Add group: | 3 | |
Edit group: | 3 | |
Group authorized to delete: | 3 |
News
Field name | Value | Description |
---|---|---|
Table name: | news | name of table in database |
Table title: | Company news | display name in flede |
Title field: | title | |
Additional title fields: | date | date will also be displayed in record list |
Id field: | id | id is unique id field here |
Fields: |
title:t:Article title; date:d:Publish date; message:T:Full text; short:T:Abstract; active:l:Active:1; image:f$imagename:News image | active is logical with default '1', message and short should be edited with textarea, title and source are short text, image will contain file with news picture and imagename will contain it's name |
Max file size: | 102400 | Maximum picture file size is 100Kb |
Read group: | 4 | |
Add group: | 2 | |
Edit group: | 2 | |
Group authorized to delete: | 2 |
Articles_sections
Field name | Value | Description |
---|---|---|
Table name: | articles_sections | |
Table title: | Articles sections | |
Title field: | title | |
Id field: | id | id is unique id field here |
Fields: |
id:t:Id; title:t:Article title; keywords:t:Section keywords | id is in fields list here, so it can be edited |
Read group: | 4 | |
Add group: | 1 | |
Edit group: | 1 | |
Group authorized to delete: | 1 |
Then each user can login and edit content, he is responsible for. Enjoy!
If you have any questions, comments, suggestions, bug reports, bug fixes, contact author by e-mail: rgbeast at flede dot org