This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class VhostShell extends Shell { | |
public function main() { | |
$this->out('Vhost config maker for Apache HTTPD'); | |
if (empty($this->args)) { | |
// show help | |
$this->help(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Allways nojimage! | |
*/ | |
class NojimageBehavior extends ModelBehavior { | |
public function beforeSave($model) { | |
foreach ($model->data[$model->alias] as $key => $value) { | |
$schema = $model->schema($key); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* virtual field collection Behavior for CakePHP 1.3 | |
* | |
* Copyright 2010, nojimage (http://php-tips.com/) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* AclComponent using Session Cache for CakePHP 1.3 | |
* | |
* Copyright 2011, nojimage (http://php-tips.com/) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
SomePluginController extends AppController { | |
function some_mehtod() { | |
$this->params['requested'] = true; | |
$params = Router::getParams(); | |
$this->plugin = false; | |
$this->params['plugin'] = false; | |
$params['plugin'] = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<FilesMatch "\.ctp$"> | |
Order allow,deny | |
Deny from all | |
</FilesMatch> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// in layout/default.ctp | |
?> | |
<!-- // .. snip --> | |
<?php echo $this->Js->writeBuffer(); ?> | |
</body></html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* AppEmailComponent (for Japanese) | |
* | |
* Copyright 2010, nojimage (http://php-tips.com/) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
App::import('Vendor', 'classTextile', array('file' => 'classTextile.php')); | |
/** | |
* | |
* Textile Helper | |
* | |
* @author nojimage | |
* @see http://bakery.cakephp.org/articles/walker/2006/10/17/textile-2-0-0-helper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Create symlink plugins and themes webroot to APP/webroot/ | |
* | |
* CakePHP 1.3 | |
* PHP versions 5 | |
* | |
* Copyright 2011, nojimage (http://php-tips.com/) | |
* |