Skip to content

morrislaptop/settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Settings Plugin

Settings allows you to provide a web interface to settings, routes and translations that traditionally could only be changed by editing files by hand. Obviously there are reasons for this, so using this plugin incorrectly might corrupt your application.

Included Features

Configs

A simple interface where you can enter key / value pairs that will eventually go into the Configure::class. A good example for this would be the ability to turn off debugging remotely in case you let it on.

Accessible via http://yourdomain.com/admin/settings/configs

Routes

A simple interface where you can add routes and specify which controller and action the route points to. An extra field is also included where you can add extra PHP code to further control your routes.

Accessible via http://yourdomain.com/admin/settings/routes

Translations

Another simple interface where you can add translations for your application. The plugin will automatically write the translations into the correct language and domain .po file inside your locale folder.

Accessible via http://yourdomain.com/admin/settings/translations

Installation

Add the repo to your working directory

git submodule add https://github.com/morrislaptop/settings app/Plugin/Settings

Load the plugin

CakePlugin::load('Settings', array('bootstrap' => true));

Create a settings folder inside your cache folder and give full writable permissions

mkdir app/tmp/cache/settings
chmod -R 0777 app/tmp/cache/settings

Give full writable permissions to your app/locale folder and all sub folders.

chmod -R 0777 app/Locale

Create the database tables

app/Console/cake schema create -p Settings Settings

Add the following to your routes.php

Router::parseExtensions('json');
if ( file_exists(CACHE . 'settings' . DS . 'routes.php') ) {
	require_once(CACHE . 'settings' . DS . 'routes.php');
}

About

Ability to update properties in Configure::read via an admin interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published