Config Files


Here are my config.php and default_config.php. NOte phile loads config first and then default_config. I think I need to make a little better distinction about what to keep in each one.

config.php

<?php
// use this config file to overwrite the defaults from default_config.php
// or to make local config changes.
$config = array();
// run the generator.php file or fill this with a long string
// must not be empty; try to make it unique each site.
$config['encryptionKey'] = 'jacmgr123phile456';
// ===========================================================
// Site Descriptions
$config['site_title'] = 'My PhileCMS Blog'; // Site title
// jacmgr: Some themes have subtitle for title
$config['site_slogan'] = 'Travels through PHP'; // Site title
// ===========================================================
$config['base_url'] = \Phile\Utility::getBaseUrl(); // use the Utility class to guess the base_url
// ===========================================================
// DATE TIME STUFF
// figure out the timezone
$timezone = (ini_get('date.timezone')) ? ini_get('date.timezone') : 'UTC';
$config['timezone'] = $timezone; // The default timezone

$config['date_format'] = 'jS M Y'; // Set the PHP date format
$config['date_format_two'] = 'Y F d'; // Set the PHP date format
// ===========================================================
// For retrieveing lists 
$config['pages_order']  = 'page.folder:asc meta.date:desc meta.title:asc';
//old 1.1 method not used
//$config['pages_order_by'] = 'title'; // Order pages by "title" (alpha) or "date"
//$config['pages_order'] = 'desc'; // Order pages "asc" or "desc"
// ===========================================================
// THEME
$config['theme'] = 'default';
$config['theme'] = 'outdoor0';
$config['theme'] = 'tales1';
$config['theme'] = 'talespblog';
//$config['theme'] = '5minblog';
// Also See //TWIG section of the config.
//$config['plugins']['phile\\templateTwig']['template-extension'] = 'html.twig';
// ===========================================================
// ZONES USED IN THEME if using the jacZones Plugin
$config['zones'] = array( 'side' => 'sidebar', 
                          'bottom' =>'bottom',
                          'topmenu'=>'topmenu',
                          'bottomleft'=>'bottomleft',
                          'bottomcenter'=>'bottomcenter',
                          'bottomright'=>'bottomright',
//                        'featured'=>'zone_featured',
                        );
// Turn Zones Off 
//$config['zones'] = null;


// PLUGINS
//plugins override from config_default
//$config['plugins']['mycompany\\demoPlugin' ]['active']              = false;// sample plugin distro
$config['plugins']['phile\\phpFastCache' ]['active']                = false;// the default cache engine
$config['plugins']['phile\\simpleFileDataPersistence']['active']    = false;// optional datastorage (tags)

$config['plugins']['jaccms\\jacCms']['active']                      = true;//
//redirect fudge needs core hack if true. 
//Needs to be loaded, but not active.... 
$config['plugins']['jaccms\\jacCms']['RedirectIndex']               = false; //redirect fudge needs core hack if true. 

//$config['plugins']['jaccms\\jacNavigation']['active']               = false;// no longer used
$config['plugins']['jaccms\\jacPageSource']['active']               = true;// shows raw page source (non-admin)
$config['plugins']['jaccms\\jacMetaHeirarchy']['active']            = true;//
$config['plugins']['jaccms\\jacZones']['active']                    = true;//
$config['plugins']['jaccms\\jacContentVariables']['active']         = true;//
$config['plugins']['jaccms\\jacBreadcrumbs']['active']              = true;//

//SHORT CODES
$config['plugins']['jacshortcodes\\jacShortCodes']['active']        = true;// Overall Master ShortCode Processor
$config['plugins']['jacshortcodes\\jacShortCodeInclude']['active']  = true;// Include a page in a page
$config['plugins']['jacshortcodes\\jacShortCodeAmazon']['active']   = true;// Amazon Asin iframe

//$config['plugins']['jacshortcodes\\jacShortCodeFilter']['active']        = false;//   FIND NEW WAY AND DELETE!!!
$config['plugins']['jacshortcodes\\jacShortCodeFilterSnippet']['active'] = true;// search shortcode FIND NEW WAY AND DELETE!!!

//images
$config['plugins']['jacimages\\jacTimthumb']['active']    = true;// Image display and cache and upload

//mathJAX
//$config['plugins']['mathjax\\mathJax']['active'] = true;// Fix so it adds JS auto then use plugin

//Page table of Contents for wiki; Tags
//$config['plugins']['pschmitt\\tableOfContents']['active']    = true;// 
//$config['plugins']['pschmitt\\Tags']['active']    = true;// 
//$config['plugins']['pschmitt\\Tags']['tag_template'] = 'index-ptags';
//$config['plugins']['jaccms\\jacTags']['active']    = true;// 
//$config['plugins']['jaccms\\jacTags']['tag_template'] = 'index-tags';
//
// Plugins for User Access login / admin etx....
$config['plugins']['jaccms\\jacMiniAuth']['active']         = true;// Login/logout for admin only.
$config['plugins']['jaccms\\jacAdmin']['active']            = true;// Page CRUD functions

//$config['plugins']['sturple\\phileCollections']['active']            = false;// interesting
//$config['plugins']['infostreams\\pagelistSnippet']['active']           = true;// hacked into my search shortcode
//$config['plugins']['infostreams\\snippets']['active']                = true; // Similar to shortcode processor
// ===========================================================
// set PHP error reporting
$config['display_errors'] = 2;
$config['error_log_jaccms'] = ROOT_DIR.'/error_log_jaccms.log' ;     //not used anywhere
// ===========================================================
//TWIG override some defaults
$config['plugins']['phile\\templateTwig']['debug']            = true;//
$config['plugins']['phile\\templateTwig']['cache']            = false;//
//certain themes use different extensions; within a theme all use same extension
//if using default .html don't need to vhange
//$config['plugins']['phile\\templateTwig']['template-extension'] = 'html.twig'; // template file extension
// ===========================================================
// ===========================================================
//COMMENT SYSTEM  NO PLUGIN, CODE IS IN TEMPLATE.
//DISQUS based comment system
//Flag used in template to implement comment system
//TRUE: Then site comments are on  FALSE: Site comments are off and not displayed
//PAGE META also controls which pages will have or not have comments
$config['comments'] = false; //true;

// ===========================================================
// ===========================================================
//add some variables that can be used in content
$config['SYSTEMFOLDER'] = ROOTSYSTEM_DIR ;
$config['CONTENT_DIR'] = CONTENT_DIR ;
// ===========================================================
// ===========================================================
// it is important to return the $config array!
return $config;


default_config.php

<?php

/**
 * Phile default config.
 *
 * Don't do changes here but overwrite them in your local config.
 */
$config = [];

/**
 * Base URL to Phile installation without trailing slash
 *
 * e.g. `http://example.com` or `http://example.com/phile`
 *
 * Default: try to resolve automatically in Router
 */
$config['base_url'] = (new Phile\Core\Router)->getBaseUrl();

/**
 * page title
 */
$config['site_title'] = 'PhileCMS';

/**
 * default theme
 */
$config['theme'] = 'default';

/**
 * date format as PHP date format
 */
$config['date_format'] = 'jS M Y';

/**
 * Set page order
 *
 * Format <type>.<attribute>:<order>
 * type:
 * - "page" page attribute
 * - "meta" page meta attribute
 * order:
 * - "asc" (default) ascending order
 * - "desc" descending order
 *
 * Orders are chainable to for sub-ordering.
 *
 * Examples:
 * - "meta.title" sort by meta title ascending
 * - "page.folder:asc meta.date:desc" sort by folder-name first and by date withing folders
 */
$config['pages_order'] = 'meta.title:desc';

/**
 * timezone
 */
$config['timezone'] = (ini_get('date.timezone')) ? ini_get('date.timezone') : 'UTC';

/**
 * charset used for HTML and Markdown files
 */
$config['charset'] = 'utf-8';

/**
 * set PHP error reporting
 */
$config['display_errors'] = 2;

/**
 * include core plugins
 */
$config['plugins'] = [
    /**
     * error handler
     */
    'phile\\errorHandler' => [
        'active' => false,
        'handler' => \Phile\Plugin\Phile\ErrorHandler\Plugin::HANDLER_DEVELOPMENT
    ],
    /**
     * setup check
     */
    'phile\\setupCheck' => ['active' => true],
    /**
     * parser
     */
    'phile\\parserMarkdown' => ['active' => true],
    /**
     * meta-tag parser
     */
    'phile\\parserMeta' => [
        'active' => true,
        /**
         * Set meta-data format.
         *
         * - 'Phile' (default) Phile legacy format
         * - 'YAML' YAML
         *
         * Phile is going to switch to YAML for parsing meta tags. But if you
         * want to use YAML today you can change the format here.
         */
        'format' => 'Phile'
    ],
    /**
     * template engine
     */
    'phile\\templateTwig' => ['active' => true],
    /**
     * cache engine
     */
    'phile\\phpFastCache' => ['active' => true],
    /**
     * persistent data storage
     */
    'phile\\simpleFileDataPersistence' => ['active' => true],
];

return $config;