Skip to content

Instantly share code, notes, and snippets.

<div class="container center">
<div class="header">
<h1><?php echo $site_name; ?></h1></div>
<div class="menu">
<?php echo $menu ?>
</div>
<div class="content" style="">
<?php echo $content; ?>
</div>
</div>
{
"content_width":750,
"blueprint":1,
"background":"#232323",
"googlefont":"Terminal+Dosis+Light",
"js":{
"1":"{base_url}js/jquery.uniform.min.js",
"2":"{base_url}js/jquery.fancybox-1.3.2.pack.js",
"3":"{base_url}js/jquery.mousewheel-3.0.4.pack.js"
},
<div class="container center">
<div class="header">
<h1><?php echo $site_name; ?></h1></div>
<div class="menu">
<?php echo $menu ?>
</div>
<div class="content" style="">
<?php echo $content; ?>
</div>
</div>
<div class="container center">
<div class="header">
<h1><?php echo $site_name; ?></h1></div>
<div class="menu">
<?php echo $menu ?>
</div>
<div class="content" style="">
<?php echo $content; ?>
</div>
</div>
<?php
function rowa($menua, &$cont) {
?><li><a href="<?php echo $cont->Html->url("/").$menua['Menu']['url'];?>"><?php echo $menua['Menu']['name']; ?></a><?php
if (!empty($menua['ChildMenu'])) {
echo "<ul>";
foreach ($menua['ChildMenu'] as $value) {
rowa(array("Menu" => $value), $cont);
}
echo "</ul>";
}
Change .htaccess to :
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /hd/simple-cms/app/webroot/ [L]
RewriteRule (.*) /hd/simple-cms/app/webroot/$1 [L]
</IfModule>
$message = Swift_Message::newInstance(__("A Friend Sent You A Message", true))
->setFrom(array($this->data["Form"]["sender_mail"] => $this->data["Form"]["sender_name"]))
->setTo(array($this->data["Form"]["friend_mail"] => $this->data["Form"]["friend_name"]));
// CHANGE TO >>>
$message = Swift_Message::newInstance(__("A Friend Sent You A Message", true))
->setFrom(array($this->data["Form"]["sender_mail"] => $this->data["Form"]["sender_name"]))
->setTo(array($this->data["Form"]["friend_mail"] => $this->data["Form"]["friend_name"]))
//Check if the last db update was installed
if (!file_exists(CONFIGS . 'update' . $this->lastV . '.yml')) {
@set_time_limit(60 * 60);
@App::import('Model', 'ConnectionManager');
$db = ConnectionManager::getDataSource('default');
//Loop across all the version numbers
for ($index = 1; $index - 1 < $this->lastV; $index++) {
//Was the version installed
if (!file_exists(CONFIGS . 'update' . $index . '.yml')) {
@ynh
ynh / gist:3241810
Created August 2, 2012 23:17
Update in beforeFilter() AppController
//Check if the last db update was installed
if (!file_exists(CONFIGS . 'update' . $this->lastV . '.yml')) {
@set_time_limit(60 * 60);
@App::import('Model', 'ConnectionManager');
$db = ConnectionManager::getDataSource('default');
//Loop across all the version numbers
for ($index = 1; $index - 1 < $this->lastV; $index++) {
//Was the version installed
if (!file_exists(CONFIGS . 'update' . $index . '.yml')) {
@ynh
ynh / gist:3241814
Created August 2, 2012 23:18
Update in beforeFilter() AppController
<?php
//Check if the last db update was installed
if (!file_exists(CONFIGS . 'update' . $this->lastV . '.yml')) {
@set_time_limit(60 * 60);
@App::import('Model', 'ConnectionManager');
$db = ConnectionManager::getDataSource('default');
//Loop across all the version numbers
for ($index = 1; $index - 1 < $this->lastV; $index++) {
//Was the version installed