Пример #1
0
> Contact me for any inquiries.
> E: Xander@CompactCMS.nl
> W: http://community.CompactCMS.nl/forum
************************************************************ */
/* make sure no-one can run anything here if they didn't arrive through 'proper channels' */
if (!defined("COMPACTCMS_CODE")) {
    define("COMPACTCMS_CODE", 1);
}
/*MARKER*/
if (!defined('BASE_PATH')) {
    $base = str_replace('\\', '/', dirname(__FILE__));
    define('BASE_PATH', $base);
}
// This file loads the appropriate configuration
/*MARKER*/
require_once BASE_PATH . '/lib/sitemap.php';
// This file parses the template and coding
/*MARKER*/
require_once BASE_PATH . '/lib/class/engine.class.php';
// Set friendly menu names
$ccms['mainmenu'] = isset($ccms['structure1']) ? $ccms['structure1'] : null;
$ccms['leftmenu'] = isset($ccms['structure2']) ? $ccms['structure2'] : null;
$ccms['rightmenu'] = isset($ccms['structure3']) ? $ccms['structure3'] : null;
$ccms['footermenu'] = isset($ccms['structure4']) ? $ccms['structure4'] : null;
$ccms['extramenu'] = isset($ccms['structure5']) ? $ccms['structure5'] : null;
// Initialize ccmsParser class
ccmsParser::setTemplateAndEchoPHP(BASE_PATH . '/lib/templates/' . $ccms['template'] . '.tpl.html', $ccms, '<?php global $ccms, $cfg, $db, $modules, $v; ?>');
if ($cfg['IN_DEVELOPMENT_ENVIRONMENT']) {
    dump_request_to_logfile(null, true, true, true);
}
Пример #2
0
 public function splitTemplate($str)
 {
     $str = preg_replace('/\\[(.*?)\\]/', "{%\\1%}", $str);
     return parent::splitTemplate($str);
 }