[DEV] DevourCMS v1.0.0 [PHP / OOP / MySQLi]

Status
Not open for further replies.

Zeus

Active Member
Jun 30, 2012
150
30
MD5 Can't be decrypted. So he won't be using it.

Correct, anyway, added some more to the hashing class, it now encrypts numbers too. :)

I haven't done much on the CMS today, i've been doing homework and I went out to look at fire-places. I'll do some work now, might begin the template system and get some visual work done in the next couple of days, what you guys think? ^.^
Updates
Okay, so I did a configuration file, which isn't finalised yet and things most likely will change in it. I decided to do two different templating systems, one for the front-end and the other for the dashboard. It'll make it much easier when coming to creating and adjusting styles too.

Anyway, here's the config file;

PHP:
<?php
/*------------------------------------------------------------------------|
| Devour CMS - Copyright (c) Josh Priestley 2012                          |
| ------------------------------------------------------------------------|
| Permission is hereby granted, free of charge, to any person obtaining a |
| copy of this software and associated documentation files                |
| (the "Software"), to deal in the Software without restriction,          |
| including without limitation the rights to use, copy, modify, merge,    |
| publish, distribute, sublicense, and/or sell copies of the Software,    |
| and to permit persons to whom the Software is furnished to do so,       |
| subject to the following conditions:                                    |
| ------------------------------------------------------------------------|
| The above copyright notice and this permission notice shall be included |
| in all copies or substantial portions of the Software.                  |
| ------------------------------------------------------------------------|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF              |
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  |
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY    |
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,    |
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE       |
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                  |
| ------------------------------------------------------------------------|
 
 /*
  *   Disable direct access
  */
 //if(!defined('Devour')) exit ('Direct file access disallowed');
 
 /*
  * MySQLi Details
  */
 $config['mysql']['host'] = 'localhost'; /* Your MySQL host */
 $config['mysql']['username'] = 'root'; /* Your MySQL username */
 $config['mysql']['password'] = 'hello123'; /* Your MySQL password */
 $config['mysql']['database'] = 'devour'; /* Your MySQL database */
 
 /*
  * Updating
  */
 $config['update']['enabled'] = '1'; /* Do you want the CMS to inform you when an update is enabled? */
 
 /*
  * Templating
  */
 $config['template']['frontEnd'] = 'Devour'; /* The front end theme you want to use */
 $config['template']['dashboard'] = 'Simple Dashboard v1'; /* The dashboard theme you want to use */
 
 /*
  * Plugins
  */
 $config['plugins']['dashboard'] = '1'; /* Plugins enabled (just dashboard) */
 $config['plugins']['frontEnd'] = '1'; /* Plugins enabled (just front end) */
 $config['plugins']['frontEndUsing'] = array('Twitter','Facebook'); /* What plugins do you want to have enabled for the front end */
 $config['plugins']['dashboardUsing'] = array('UserStats','EditingNews','UserMaker 1.0'); /* What plugins do you want to have enabled for dashboard? */
 
 /*
  * Site Settings
  */
 $config['site']['url'] = 'http://localhost'; /* Site URL, not ending in a / */
 $config['site']['name'] = 'Devour BETA'; /* Site Name */
 
 /*
  * Account Settings
  */
 $config['account']['maxAcc'] = '1'; /* Maximum accounts per user */
 $config['account']['defRank'] = 'Normal'; /* Default rank when a user registers */
 
 /*
  * Owner Permissions
  */
 $config['owner']['username'] = 'Josh'; /* The username of the registered owner of your site */
?>

Any ideas to add/remove from it?

Thanks
- Zeus
 

TheJb

New Member
Jun 8, 2011
10
2
As its a CMS would it not make more sense to have most of those options editable in an Admin area and stored in SQL Database?

Just wondering, as that would make more sense than editing a file.
 

Zeus

Active Member
Jun 30, 2012
150
30
As its a CMS would it not make more sense to have most of those options editable in an Admin area and stored in SQL Database?

Just wondering, as that would make more sense than editing a file.

You are the best person ever my good sir, i'll change most of it to the database. :)
 

TheJb

New Member
Jun 8, 2011
10
2
You are the best person ever my good sir, i'll change most of it to the database. :)
Oh one thing, I'd leave is the owner part in but base it on a unique ID, that way if the owner changes there name it isn't affected.

vBulletin uses a similar idea based on the owner, so that other users can't edit or delete the account.
 

Zeus

Active Member
Jun 30, 2012
150
30
Oh one thing, I'd leave is the owner part in but base it on a unique ID, that way if the owner changes there name it isn't affected.

vBulletin uses a similar idea based on the owner, so that other users can't edit or delete the account.


New configuration file:-

PHP:
<?php
/*------------------------------------------------------------------------|
| Devour CMS - Copyright (c) Josh Priestley 2012                          |
| ------------------------------------------------------------------------|
| Permission is hereby granted, free of charge, to any person obtaining a |
| copy of this software and associated documentation files                |
| (the "Software"), to deal in the Software without restriction,          |
| including without limitation the rights to use, copy, modify, merge,    |
| publish, distribute, sublicense, and/or sell copies of the Software,    |
| and to permit persons to whom the Software is furnished to do so,       |
| subject to the following conditions:                                    |
| ------------------------------------------------------------------------|
| The above copyright notice and this permission notice shall be included |
| in all copies or substantial portions of the Software.                  |
| ------------------------------------------------------------------------|
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF              |
| MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  |
| IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY    |
| CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,    |
| TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE       |
| SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                  |
| ------------------------------------------------------------------------|
 
 /*
  *   Disable direct access
  */
 if(!defined('Devour')) exit ('Direct file access disallowed');
 
 /*
  * MySQLi Details
  */
 $config['mysql']['host'] = 'localhost'; /* Your MySQL host */
 $config['mysql']['username'] = 'root'; /* Your MySQL username */
 $config['mysql']['password'] = 'hello123'; /* Your MySQL password */
 $config['mysql']['database'] = 'devour'; /* Your MySQL database */
 
 /*
  * Other Settings
  */
 $config['site']['url'] = 'http://localhost'; /* Site URL, not ending in a / */
 $config['owner']['username'] = 'Josh'; /* The username of the registered owner of your site */
 
 /*-----------------------------------------------------------------------------------------|
 | All other options are configurable via the dashboard under the section of 'configuration'|
 |------------------------------------------------------------------------------------------*/
?>

All the other values are now kept in a table named dcms_config, which options will be configurable via the housekeeping :)
 

TheJb

New Member
Jun 8, 2011
10
2
I'm guessing the CMS doesn't use an install?

If it has an install I would definitely put the site url into the dcms_config table, so that it can be entered on the install, if not it makes sense to keep it in the file.
 

Zeus

Active Member
Jun 30, 2012
150
30
I'm guessing the CMS doesn't use an install?

If it has an install I would definitely put the site url into the dcms_config table, so that it can be entered on the install, if not it makes sense to keep it in the file.

Nope, version 0.5 will bring the installer, :)

Updates
Added another function to the class.core.php file which gets a files contents and echo's them. It'll be useful for doing themes via the dashboard, with a little drop down menu listing each file in the skins folder. ;) Also, data which was previously pulled from the configuration file is now pulled from the dcms_config table. A plugins table has also been created which holds the in use plugins :D
 

AlexFallen

Developer
Jul 19, 2011
490
64
Nope, version 0.5 will bring the installer, :)

Updates
Added another function to the class.core.php file which gets a files contents and echo's them. It'll be useful for doing themes via the dashboard, with a little drop down menu listing each file in the skins folder. ;) Also, data which was previously pulled from the configuration file is now pulled from the dcms_config table. A plugins table has also been created which holds the in use plugins :D
Installer? Yes! Why not in this version tho?
 

Macemore

Circumcised pineapples
Aug 26, 2011
1,681
819
I have three pages of your source. I'm going to post them, change the post date, and make it look like you're starting from my le code.
BWAHAHAHAHHAHAHAHAHAHHAHA

Seems legit. keep up the good work :D
 

Zeus

Active Member
Jun 30, 2012
150
30
I have three pages of your source. I'm going to post them, change the post date, and make it look like you're starting from my le code.
BWAHAHAHAHHAHAHAHAHAHHAHA

Seems legit. keep up the good work :D

Uhm, thanks I guess.. LOL.


Installer? Yes! Why not in this version tho?


First version will be extremely basic, 0.5 which is a big leap from 0.0.1 will include heaps more amounts of features, so stay tuned. :]
 

Zeus

Active Member
Jun 30, 2012
150
30
Updates
Was thinking of doing a MySQLi class, but decided to leave that until a later version. I have also re-done the maintenance system, it uses a while and is some what faster. Please note, development will stop tomorrow for approximately two weeks until I get my computer back as it is going on Thursday morning for fixing.
 

Zeus

Active Member
Jun 30, 2012
150
30
nice, you should do the FB CONNECT too :p GL

I might implement Facebook and Twitter in later versions as standard, but with the plugin system, that should be easy enough for another developer to do :)
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
I might implement Facebook and Twitter in later versions as standard, but with the plugin system, that should be easy enough for another developer to do :)
It actually is quite simple, just make a facebook app, link it, and let the facebook email be inputed into the database :cool:
-
But uhm, will this cms be light weight too? ^_^
 

Zeus

Active Member
Jun 30, 2012
150
30
It actually is quite simple, just make a facebook app, link it, and let the facebook email be inputed into the database :cool:
-
But uhm, will this cms be light weight too? ^_^

Light weight meaning..?
 

Zeus

Active Member
Jun 30, 2012
150
30
Wait im sorry, i didnt word that correctly.
What i mean is will the cms have organized directorys. ( sort of like revcms if you have seen it )

Oh! Why wouldn't it have? It has easy directories which are very easy to navigate through, I'll post the file structure tomorrow as I'm on my iPad at the moment, but yeah, it will. The CMS is going amazingly good, although I'm still wondering whether to move the maintenance columns into the configuration columns, mm what do you think?
 

DaLightz

See ya'll in the afterlife.
May 19, 2012
1,136
262
Oh! Why wouldn't it have? It has easy directories which are very easy to navigate through, I'll post the file structure tomorrow as I'm on my iPad at the moment, but yeah, it will. The CMS is going amazingly good, although I'm still wondering whether to move the maintenance columns into the configuration columns, mm what do you think?
Nice!vAnd, maybe the maintenance could be powered by the db therfore if you are out and about, you can acess the site via admin panel and set maintenance in the admin panel. Instead of having to log in to the web host/vps, going to the config file, and changing the maintenance settings. ^_^
 
Status
Not open for further replies.

Users who are viewing this thread

Top