Skip to content

Gargaj/contentifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Single file website / content engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages