Code Monkey home page Code Monkey logo

gdrive-cms-php's Introduction

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.

gdrive-cms-php's People

Contributors

ahmednuaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gdrive-cms-php's Issues

Documentation incomplete

You forgot to mention that you have to include in the last part of the redirect URL this:

/admin/callback

else the system doesnt authenticate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.