My favorites | Sign in
Logo
             
Search
for
Updated Oct 10, 2009 by haschek
Labels: Phase-Deploy, FirstSteps, Core, Plugins, Templates
ConfigureSandboxPublisher  
About configuration of Sandbox Publisher, using sandbox.default.php and sandbox.user.php

Configure your Sandbox

We assume that your Sandbox is running on your server in /sandboxcms/ -- if not, please replace it by the directory you have installed Sandbox Publisher within.

Default configuration

Sandbox Publisher comes with a default configuration which can be found in /sandboxcms/spcms/sandbox.default.php and it contains only some basic settings for default paths to plugins and templates directories and the standard template. These are:

Maybe those settings will be extended in later versions of Sandbox Publisher, so please do not edit this file. If you need a different configuration, you can use /sandboxcms/spcms/sandbox.user.php instead. This is important especially if you want to update your Sandbox installation.

User configuration

To create a user configuration, copy sandbox.default.php to sandbox.user.php within the same directory. Do not just rename this file. It is very important for the updating process, especially if you use the trunk version from svn and updating regularly. Using sandbox.user.php prevents you from overwriting your own configuration of Sandbox Publisher.

Configuration details

Basic setting are about directories where plugins and templates may be located, a list of plugins which are directly loaded at start of Sandbox Publisher and the name of the default template. You can extend those settings and add your own stuff you may need later.

Extend basic settings

The basic settings are stored in a boolean variable and one array:

For directories you can use two different types of path names:

The settings for initially used plugins and the default template are file names within those directories (relative to one of the directories) or absolute file names, both versions without the file extension .php.

<?php

// Is your Sandbox app/website in production use?
$production = false; // show errors, warnings, notices, exceptions
// $production = true, // hide output at errors/exceptions for security issues

// template folders
$c['template']['folder'][] = './templates/';
$c['template']['folder'][] = '/var/www/sandboxcms/othertemplates/';

// templates
$c['template']['name'] = 'default.tpl';
$c['template']['layout'] = 'layouts/main.tpl';

// plugin folders
$c['plugin']['folder'][] = './plugins/';
$c['plugin']['folder'][] = '/var/www/additionalplugins/';

// load plugins at start
$c['plugin']['load'][] = 'MyPlugin';
$c['plugin']['load'][] = '/var/www/sandplugs/OtherPlugin';
$c['plugin']['load'][] = 'subdirto/nextplugin';

?>

Add own settings

You can add anything what you think to need later, e.g. constants for your website home URI or other variables (which you may use by global or $_GLOBALS).

<?php

define('MY_WEBSITE_HOME', 'http://yourserver.com/sndbx/');
$myswitch = true;
?>

Delete default settings

You also can delete default settings by using PHP's unset(). Initially no settings are needed to create the Sandbox instance.

Next

Now your instance of Sandbox Publisher should run, out of the box you can use it with local files stored on your server within the Sandbox path (the directory where the .htaccess is located and all sub directories).


Sign in to add a comment
Hosted by Google Code