Skip to content

Indocoderweb/gdrive-cms-php

 
 

Repository files navigation

A Google Drive CMS

PHP Version (>=5.3.2)

This is a simple CMS proof-of-concept that uses Google Drive as the CMS part. This means that you don't need to bother with testing different WYSIWYG editors, dealing with authentication, passwords and sessions.

How does it work?

A user will authenticate themselves using OAuth 2 and grant read permissions to the app. They then select a folder that contains the site's content (only documents at the moment) and then they'd select a document within this folder to define as the home page.

The folder can have many folders and documents within it, the CMS builds the multi dimention menu for you.

Once the user has selected the folder and the home page, the app scans through the documents copying over the text/html versions of the content into a MySQL database ready to be served.

How can I use it?

  1. Clone the app: git clone [email protected]:ahmednuaman/gdrive-cms-php.git or download the zip.
  2. Upload it to your server and rename the config.php.example to config.php.
  3. Follow the instructions within the config.php (such as setting the keys, paths and what not).
  4. Don't forget to set the oauth_callback of the Google OAuth call to http://yourserver/path/admin/callback
  5. Set up the DB table.
  6. Visit the admin area, it'll be at http://yourserver/path/admin/, log in and follow the instructions.
  7. When it's all done visit http://yourserver/path/ and voila!

How can I make it work at root?

Currently my demo sits within a folder (as that's just how I do my tests and examples). In order to make this version work at root you'll need to update:

  • config.php:12 and define URL_PREFIX as an empty string, e.g.: define('URL_PREFIX', '');.
  • .htaccess:93 and just comment out this line.

Why did you do this?

I work on a lot of projects where my clients use Google Drive to update copy leaving me to then either update a CMS or some flat JSON/XML/YAML files. I could risk allowing my clients to update flat files but if I had £1 for every time a JSON/XML/YAML file didn't validate, well, I'd have about £38.

I think that for the future this is quite a nice idea where I can allow my clients to specify a document in an environment that they're used to (a word processor or spreadsheet) to be used as the copy master for any site or project we work on.

About

A simple CMS powered by Google Drive (PHP version)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.9%
  • Other 0.1%