Removed the boilerplate, added a note that it moved.
This commit is contained in:
parent
e5d3cb9988
commit
ec9b3296ae
9 changed files with 3 additions and 190 deletions
3
boilerplate/README.md
Normal file
3
boilerplate/README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
The PICKLES Boilerplate has been permanently moved to [[http://github.com/joshtronic/pickles-boilerplate]]
|
||||
|
||||
Feel free to clone the repository for your own needs.
|
|
@ -1,81 +0,0 @@
|
|||
<?php
|
||||
|
||||
$config = array(
|
||||
// Define your envrionments, name => hostname or IP
|
||||
'environments' => array(
|
||||
'local' => '127.0.0.1',
|
||||
'staging' => 'dev.mysite.com',
|
||||
'production' => 'www.mysite.com',
|
||||
),
|
||||
|
||||
// PHP configuration options
|
||||
'php' => array(
|
||||
'display_error' => true,
|
||||
'error_reporting' => -1,
|
||||
'date.timezone' => 'America/New_York',
|
||||
),
|
||||
|
||||
// PICKLES configuration options
|
||||
'pickles' => array(
|
||||
// Disable with a "site down" message
|
||||
'disabled' => false,
|
||||
// Use sessions
|
||||
'session' => true,
|
||||
// Force HTTPS
|
||||
'secure' => false,
|
||||
// Name of the parent template
|
||||
'template' => 'index',
|
||||
// Name of the default module
|
||||
'module' => 'home',
|
||||
// Name of the module to serve on 404 errors
|
||||
'404' => 404,
|
||||
// Default datasource
|
||||
'datasource' => 'mysql',
|
||||
// Whether or not you want to use the profiler
|
||||
'profiler' => array(
|
||||
'local' => true,
|
||||
'staging' => false,
|
||||
'production' => false,
|
||||
),
|
||||
),
|
||||
|
||||
// Datasources, keys are what's referenced in your models
|
||||
'datasources' => array(
|
||||
'mysql' => array(
|
||||
'driver' => 'pdo_mysql',
|
||||
'hostname' => 'localhost',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'database' => 'test'
|
||||
),
|
||||
),
|
||||
|
||||
// Security configuration
|
||||
'security' => array(
|
||||
// Login page
|
||||
'login' => 'login',
|
||||
// Your user table
|
||||
'model' => 'User',
|
||||
// The column you use to specify the user role
|
||||
'column' => 'access_level',
|
||||
// The available levels (roles)
|
||||
'levels' => array(
|
||||
10 => 'USER',
|
||||
20 => 'ADMIN',
|
||||
),
|
||||
),
|
||||
|
||||
// Anything can be defined
|
||||
'stuff' => array(
|
||||
'foo' => 'bar',
|
||||
'spam' => 'eggs',
|
||||
// and can be broken out by environment
|
||||
'bacon' => array(
|
||||
'local' => true,
|
||||
'staging' => true,
|
||||
'production' => false
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Same Model
|
||||
*/
|
||||
class SampleModel extends Model
|
||||
{
|
||||
protected $datasource = 'mysql'; // Name of the datasource in our config
|
||||
protected $table = 'test'; // Table to interact with from this model
|
||||
protected $order_by = 'posted_at DESC'; // Columns to order by
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
class home extends Module
|
||||
{
|
||||
public function __default()
|
||||
{
|
||||
// This is where your business logic lives
|
||||
|
||||
// You can create model objects like $model = new SampleModel();
|
||||
|
||||
// You can talk to the default database via $this->db
|
||||
|
||||
// You could even do nothing and delete this file
|
||||
|
||||
// If you have data you want to get from here to the template, just return array('my' => 'data');
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -1,31 +0,0 @@
|
|||
# Sets up ETags
|
||||
FileETag MTime Size
|
||||
|
||||
# Prevent session IDs from appearing
|
||||
php_value session.use_only_cookies 1
|
||||
php_value session.use_trans_sid 0
|
||||
|
||||
# Sets up the mod_rewrite engine
|
||||
RewriteEngine on
|
||||
RewriteBase /
|
||||
|
||||
# Strips the trailing slash
|
||||
RewriteRule ^(.+)/$ $1 [R]
|
||||
|
||||
# Makes sure to skip rewriting files and directories that really exist
|
||||
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||
RewriteCond %{REQUEST_FILENAME} -d
|
||||
RewriteRule .* - [L]
|
||||
|
||||
# Rewrites "dynamic" content filenames with dynamic timestamps data
|
||||
RewriteRule ^(.+)\.([\d]+)\.(css|js|gif|png|jpg|jpeg)$ /$1.$3 [NC,QSA]
|
||||
|
||||
# One rewrite to rule them all
|
||||
RewriteRule ^(.+)$ index.php?request=$1 [NC,QSA]
|
||||
|
||||
# Blocks access to .htaccess
|
||||
<Files .htaccess>
|
||||
order allow,deny
|
||||
deny from all
|
||||
</Files>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?php
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/pickles');
|
||||
|
||||
require_once 'pickles.php';
|
||||
new Controller();
|
||||
|
||||
?>
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . '/path/to/pickles');
|
||||
|
||||
require_once 'pickles.php';
|
||||
|
||||
echo 'Hi, I am a script' . "\n\n";
|
||||
|
||||
print_r($config)
|
||||
|
||||
?>
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sample PICKLES Site</title>
|
||||
<!-- The following line includes the jQuery file in /path/to/pickles/js -->
|
||||
<script type="text/javascript" src="<?php echo $__dynamic->js('/__pickles/js/jquery.js'); ?>"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>PICKLES Sample Site</h1>
|
||||
<h2>Super simple example of PICKLES in action</h2>
|
||||
<?php
|
||||
// Loads the module's template
|
||||
require_once $__template;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
// I'm the child template
|
||||
|
||||
// I can be loaded up with markup
|
||||
|
||||
// I can be loaded up with PHP
|
||||
|
||||
// Your call really
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue