Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keller-mark/infercms
Content management system that infers data types from database schema
https://github.com/keller-mark/infercms
Last synced: 12 days ago
JSON representation
Content management system that infers data types from database schema
- Host: GitHub
- URL: https://github.com/keller-mark/infercms
- Owner: keller-mark
- Created: 2018-01-27T01:18:31.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-27T05:30:51.000Z (almost 7 years ago)
- Last Synced: 2024-11-13T06:21:15.803Z (2 months ago)
- Language: JavaScript
- Size: 11.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# InferCMS
InferCMS is a PHP content management system that uses MySQL column data types to generate models and administrative functionality.
This project started out as spaghetti code used for simple websites that stored data in MySQL databases, and over the last few years slowly started to morph into a basic content management system that is meant to be used as follows:
- Configure site
- Connect to database in `/classes/DB.php`
- Set sitewide variables in `/classes/init.php`
- Set email account in `/classes/Email.php`
- Create `users` and `images` tables
- Set up custom models as MySQL table schema
- Create two PHP files for each model in `/classes` directory
- Singular file (e.g. MyItem.php)
- Plural file (e.g. MyItems.php)
- Use administrator portal to dynamically input content
- `/admin/edit_all.php?model=myItems`
- Access content in frontend pages
- Include `` to import all models
- In PHP, access content through the plural model
```
$all_items = MyItems::findAll();
$all_items[0]->get('name');
$all_items[0]->get('image1')->get('link');$single_item = MyItems::find(0);
$single_item->get('name');
$single_item->get('image2')->get('title');MyItems::delete(0);
```
### Administrator Portal Screenshots