Skip to content

Latest commit

 

History

History
64 lines (53 loc) · 1.93 KB

README.md

File metadata and controls

64 lines (53 loc) · 1.93 KB

Contentifier

Single file website / content engine aimed to be a combination of the compactness of http://github.com/vrana/adminer and the featureset of Wordpress.

GitHub file size in bytes

admin screenshot

How to use

Requirements

Contentifier uses PDO, so you'll need at least PHP5; currently it's been tested with MySQL 5 and SQLite 3.

Installation

Get contentifier.php or contentifier.min.php. Place it next to an index.php that looks like this:

<?php
include_once("contentifier.php");

class MyContentifier extends Contentifier
{
  // if you don't specify anything else, it'll try to connect
  // to a mysql server on localhost using "contentifier" as db and user name
  public function sqlpass() { return "your-sql-password-here"; }
}

$contentifier = new MyContentifier();
$contentifier->install();
?>

Now load it in a browser. When it prompts you for the first user, create one. Once that's done, replace

$contentifier->install();

with

$contentifier->run();

That's it. Now you can hit the admin interface to create some content.

Semantic URLs

You can also sweeten the URLs by using a .htaccess like this:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</IfModule>

...and adding this to your derived class:

  public function rewriteenabled() { return true; }

Templating

By default it includes template.html and replaces {%MENU%} and {%CONTENT%} with the respective data.

Examples of more complex templates and plugins

Please refer to https://github.com/Gargaj/contentifier/wiki/Examples

How to build

Use rake.php to compile the contents of the contentifier folder into one file.