Skip to content
This repository

Spark Plug Cakephp plugin is a user management and admin section using authsome and a simple acl.

branch: master
README
 ------------------------------------------------------
| SparkPlug is a simple auth-acl plugin for cakephp1.3 |
 ------------------------------------------------------

Default user created = admin
Default password = 1234
 
INSTALLATION
------------

1. Download the latest version or use git to keep the plugin up to date

	cd yourapp/app/plugins
	git clone git://github.com/jedt/spark_plug.git  

2. Schema import (use your favorite sql tool to import the schema)

	/app/plugins/spark_plug/config/schema/spark_plug.sql

3. Import config files

	3.1 open /app/config/core.php and paste on the last line
	
		include_once(ROOT.'/app/plugins/spark_plug/config/config.php');
		
	3.2 open /app/config/routes.php and paste on the last line
		
		include_once(ROOT.'/app/plugins/spark_plug/config/routes.php');
		
4. Include callback in your AppController class

	open or create the file /app/app_controller.php and paste or edit the file. It should look like this 
	
	<?php
		class AppController extends Controller {
			var $components = array ('Session','SparkPlug.Authsome' => 
				array('model' => 'User'));
        	var $uses = array('SparkPlug.UserGroup');
	
			function beforeFilter()
			{
	    		parent::beforeFilter();
            	SparkPlugIt($this);
			}
		}
	?>

5. Adjust plugin configuration

	Change /app/plugins/spark_plug/config/config.php (parameters are explained there) to suit your needs.
	
6. {OPTIONAL} Do you want your permission rules filtered ?

	cd yourapp/app/plugins
	git clone http://github.com/josegonzalez/cakephp-filter-plugin.git filter
	
	then modify in your app_controller components variable this line
	
	var $components = array ('Session', 'Filter.Filter', 'SparkPlug.Authsome' => 
				array('model' => 'User'));  

	(note 'Filter.Filter' component added)

7. {OPTIONAL} Do you want facebook users to access your app ?

	cd yourapp/app/plugins
	git clone http://github.com/webtechnick/CakePHP-Facebook-Plugin.git facebook
	
	then modify in your app_controller components variable this line
	
	var $components = array ('Session', 'Facebook.Connect', 'SparkPlug.Authsome' => 
				array('model' => 'User'));  

	(note 'Facebook.Connect' component added)
	
	then copy the file
	yourapp/app/plugins/facebook/facebook.php.example into yourapp/config/facebook.php
	
	then edit file yourapp/config/facebook.php
	and put your facebook app keys
	
	Yes, you have to login previously to your facebook account and then create a new application, using fb developers api 
	You will first need to update your facebook application with the connect url of your application's url.  This is done on 
	the facebook application settings. http://www.facebook.com/developers/apps.php) 

ROADMAP
-------



TODO
----

please check github page (github.com/jedt/spark_plug.git) 
Something went wrong with that request. Please try again.