Example #1
0
 private function _load_configs()
 {
     // Get bootstrap configs.
     $this->load->config('cms', TRUE);
     $this->data['cms'] = $this->config->item('cms');
     // Load configs from file passed in.
     $configs = CMS\Libraries\Config::load_configs_from_file();
     foreach ($configs as $key => $row) {
         $this->data['cms'][$key] = $row;
     }
     // Make sure our tables are built
     $this->load->library('CMS_Tables');
 }
Example #2
0
| 				 Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
|	['swap_pre'] A default table prefix that should be swapped with the dbprefix
|	['autoinit'] Whether or not to automatically initialize the database.
|	['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
|							- good for ensuring strict SQL while developing
|
| The $active_group variable lets you choose which connection group to
| make active.  By default there is only one group (the 'default' group).
|
| The $active_record variables lets you determine whether or not to load
| the active record class
*/
$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = CMS\Libraries\Config::get('db_host');
$db['default']['username'] = CMS\Libraries\Config::get('db_username');
$db['default']['password'] = CMS\Libraries\Config::get('db_password');
$db['default']['database'] = CMS\Libraries\Config::get('db_database');
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
/* End of file database.php */
/* Location: ./application/config/database.php */
Example #3
0
    ?>
/javascript/site.js"></script>
	<script type="text/javascript" src="<?php 
    echo $cms['assets_base'];
    ?>
/javascript/media.js"></script>
	
	<?php 
    foreach (CMS\Libraries\Config::get('app-header-files') as $key => $row) {
        include $row;
    }
    ?>

	
	<?php 
    echo CMS\Libraries\Config::get('app-header-head');
    ?>
	
	<script type="text/javascript">
		var app = angular.module('cloudcms', []);
	</script>
</head>

<body>
	<div id="saved">
		<p>Saved.</p>
	</div>
	
	<div class="navbar navbar-inverse topbar">
	  <div class="navbar-inner">
	    <div class="container">
Example #4
0
 private static function load_laravel_3($lar_path)
 {
     // ----------- Grab The Database Config ----------------- //
     // We grab the array for detecting if this is a local or production env.
     // We assume the path.php file is one directory above the applications
     // directory. If it is not you will have to configure the CMS by hand.
     require $lar_path . '/../paths.php';
     // The require above screws up the current working directory. So we fix.
     chdir(self::$_root_path);
     // Figure out what env we are in.
     if (!(self::$env = self::detect_env($environments, $_SERVER['HTTP_HOST']))) {
         self::$env = 'production';
     }
     // Grab the default configs.
     $tmp = (require $lar_path . '/config/database.php');
     $default = $tmp['default'];
     $database = $tmp['connections'][$default];
     // If we are in a local dev env we look for a local folder and merge.
     $file = $lar_path . '/config/' . self::$env . '/database.php';
     if (is_file($file)) {
         $tmp = (require $file);
         if (isset($tmp['connections'][$default])) {
             $database = array_merge($database, $tmp['connections'][$default]);
         }
     }
     // Set the database configs we sucked out of Laravel
     CMS\Libraries\Config::set('db_host', $database['host']);
     CMS\Libraries\Config::set('db_database', $database['database']);
     CMS\Libraries\Config::set('db_username', $database['username']);
     CMS\Libraries\Config::set('db_password', $database['password']);
 }
Example #5
0
 private function _build_thumb_nail($file, $newfile)
 {
     $this->load->spark('wideimage-ci/11.02.19');
     $width = CMS\Libraries\Config::get('cp_thumb_width') * 1.1;
     $height = CMS\Libraries\Config::get('cp_thumb_height') * 1.1;
     $this->wideimage->load($file)->resize($width, $height, 'outside')->crop('center', 'center', CMS\Libraries\Config::get('cp_thumb_width'), CMS\Libraries\Config::get('cp_thumb_height'))->saveToFile(CMS\Libraries\Config::get('cp_tmp_dir') . '/' . $newfile);
     return $newfile;
 }
Example #6
0
    ?>
				
					<?php 
    if (CMS\Libraries\Config::get('edit-continue-button') == 'Save_And_Continue') {
        ?>
						<input type="hidden" name="redirect_url" value="<?php 
        echo current_url();
        ?>
" id="redirect_url" />
						<button type="submit" class="btn btn-primary" name="btn" value="save_add" id="save_add">Save &amp; Add Another</button>
					<?php 
    }
    ?>
					
					<?php 
    if (CMS\Libraries\Config::get('edit-continue-button') == 'Save_And_Continue_Editing') {
        ?>
						<button type="submit" class="btn btn-primary" name="btn" value="save_continue_editing" id="save_cont_editing">Save &amp; Continue Editing</button>					
					<?php 
    }
    ?>
					
		  	<?php 
}
?>
		  	
		  	<a href="<?php 
echo site_url($cms['cp_base'] . '/buckets/listview/' . $bucket['CMS_BucketsId']);
?>
" class="cancel-link no-deep-true">Cancel</a>
		  </div>	
Example #7
0
    echo $page_title;
    ?>
');
</script>
<?php 
}
?>

<?php 
if (!$this->input->is_ajax_request()) {
    ?>
			</div>
			<footer class="footer"><p>&copy; Cloudmanic Labs, LLC 2014 - Version <?php 
    echo CMS::get_version();
    ?>
</p></footer>
    </div>
	<?php 
    echo CMS\Libraries\Config::get('app-footer-body');
    ?>
	
	<?php 
    foreach (CMS\Libraries\Config::get('app-footer-files') as $key => $row) {
        include $row;
    }
    ?>
	
  </body>
</html>
<?php 
}