CMS project - Criticism/suggestion appreciated

Coding Critique is the place to post source code for peer review by other members of DevNetwork. Any kind of code can be posted. Code posted does not have to be limited to PHP. All members are invited to contribute constructive criticism with the goal of improving the code. Posted code should include some background information about it and what areas you specifically would like help with.

Popular code excerpts may be moved to "Code Snippets" by the moderators.

Moderator: General Moderators

Post Reply
jraede
Forum Contributor
Posts: 254
Joined: Tue Feb 16, 2010 5:39 pm

CMS project - Criticism/suggestion appreciated

Post by jraede »

So I've taken what I originally did for NiteFlip (before we took it down for a while to figure out our server situation), and made it into a new Web 2.0-ish CMS. The basic premise is that you can create an unlimited number of listing types, like city, event, recipe, actor, etc, and control how they are submitted, what sort of fields they require/allow, how the forms are displayed, user permissions, custom tags, user interactions (like, favorite, etc), and how they are related to other listings. Essentially you can create any sort of listing-intensive site and have the Web 2.0 capabilities of social networking and other user interactions built-in to the framework. I'm planning on making this open-source and focused on community contribution, that is, if I get enough interest.

My pride in all this is the form generator; it takes the fields you assign to a listing type and renders them into a form, complete with validation, error messages, etc.

Templating is done with essentially the same process as Wordpress, in which there are php functions embedded among the html to cycle through matched listings, to display their various fields, etc. Add-ons (I'm calling them modules for now) work with a hook system, and you can see what I did with the lm_scheduling module if you look at the code.

Anyway, if anyone has time and wants to check it out, I would appreciate any suggestions, comments, criticism, you name it. We're calling it Lumos, and the zip file can be found here, or you can check out a fresh install here. You can login with jason@limitdesigns.com, pw is admin. Just a warning, it's still in beta phases so there is some stuff that isn't functioning yet, but it's about 95% functional I'd say.

If you're going to try to run it on your server, put this in your .htaccess file, and replace ROOT-DIRECTORY with wherever you put all the files: [syntax]<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ROOT-DIRECTORY/index.php [L]
</IfModule>[/syntax]

...and this in a file called lm-config.php, in the root directory of the install (fill in your own values)

Code: Select all

<?php
/**
 * Configuration constants for Lumos
 */

/**
 * Database connection. Enter your information here.
 */

/** Host Name (Usually 'localhost') */
define('LM_DB_HOST_NAME','localhost');

/** Database username */
define('LM_DB_USER','db_user');

/** Database password */
define('LM_DB_PASSWORD','db_pass');

/** Database name */
define('LM_DB_NAME', 'db_name');

/** Root Directory of Lumos Installation (keep trailing slash) */
define('LM_DOCUMENT_ROOT', $_SERVER['DOCUMENT_ROOT'].'/');

/** Root URL of Lumos Installation (keep trailing slash) */
define('LM_URL', 'http://www.your-site.com/');

/** Does your server need a port to access it (ie, MAMP needs :80 after the root url to be able to work) */
define('LM_URL_PORT', FALSE);

require LM_DOCUMENT_ROOT . 'lm-system/lm-sys-config.php';
?>
Post Reply