Created
October 7, 2014 11:36
-
-
Save raminious/63f1c4d05f75d8115efa to your computer and use it in GitHub Desktop.
Config yii
This file contains 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 | |
return array( | |
'basePath' => dirname(__FILE__) . DS . '..' , | |
'language' => 'fa' , | |
'theme' => 'dream' , | |
'name' => 'پرشین مگز', | |
'import' => array( | |
'application.controllers.*', | |
'application.models.*', | |
'application.components.*', | |
'application.behaviors.*' | |
), | |
'preload' => array('log'), | |
'components' => array( | |
'request' => array( | |
'class' => 'HttpRequest', | |
'enableCookieValidation' => true, | |
'enableCsrfValidation' => true, | |
'csrfTokenName' => 'csrf', | |
'noCsrfValidationRoutes' => array('convert/ghostWebService/do') | |
), | |
'cache'=>array( | |
'class' => 'system.caching.CDbCache', | |
), | |
'clientScript'=>array( | |
//'class'=>'EClientScriptBoost', | |
//'cacheDuration'=>0, | |
'scriptMap' => array( | |
'jquery.js' => false, | |
'jquery.min.js' => false, | |
'jquery.ba-bbq.js' => false, | |
), | |
/* | |
'packages' => array( | |
'jquery'=>array( | |
'baseUrl' => '//googledrive.com/host/0ByYds0CQQbi5R0pVYTAzOS1SMmc/', | |
'js' => array('jquery.min.js?version=1.8.3'), | |
'coreScriptPosition' => CClientScript::POS_HEAD | |
), | |
'jquery.ui'=>array( | |
'baseUrl' => '//googledrive.com/host/0ByYds0CQQbi5R0pVYTAzOS1SMmc/', | |
'js' => array('jquery-ui.min.js?version=1.8'), | |
'depends' => array('jquery'), | |
'coreScriptPosition' => CClientScript::POS_BEGIN | |
) | |
), | |
*/ | |
), | |
/* | |
'assetManager' => array( | |
'class' => 'ext.ScriptBooster.EAssetManagerBoost', | |
'assetsBasePath' => 'static', | |
'assetsBaseUrl' => '/static' , | |
'minifiedExtensionFlags' => array('min.js', 'minified.js', 'packed.js'), | |
'pathIgnore' => array('extensions.TinyMCE') | |
), | |
*/ | |
'config' => array( | |
'class' => 'application.modules.setting.components.Config', | |
'file' => 'protected/modules/setting/config/settings.php', | |
), | |
'fileManager' => array( | |
'class' => 'FileManager', | |
), | |
'helper' => array( | |
'class' => 'Helper' , | |
), | |
'cipher' => array( | |
'class' => 'Cipher' | |
), | |
'sms' => array( | |
'class' => 'application.modules.sms.components.SmsSender' | |
), | |
'errorHandler' => array( | |
//'errorAction' => 'site/error' , | |
//'adminInfo' => 'technical@persiantest.com', | |
), | |
'log' => array('class' => 'CLogRouter', 'routes' => array(array('class' => 'CProfileLogRoute'))), | |
//'log' => array('class' => 'CLogRouter', 'routes' => array(array('class'=>'CWebLogRoute', 'categories' => 'system.db.*, application'))), | |
'coreMessages'=>array( | |
'basePath'=>'protected/messages', | |
), | |
'user' => array( | |
'class' => 'WebUser', | |
'allowAutoLogin' => true, | |
'loginUrl' => array('/login/'), | |
), | |
'db' => array( | |
'class' => 'CDbConnection', | |
'connectionString' => 'mysql:host=localhost;dbname=persianmags_v1', | |
'emulatePrepare' => true, | |
'username' => 'root', | |
'password' => '', | |
'charset' => 'utf8', | |
//'schemaCachingDuration' => 86400, | |
'enableProfiling' => true, | |
'enableParamLogging' => true, | |
), | |
'authManager' => array( | |
'class' => 'CDbAuthManager' , | |
'connectionID' => 'db' , | |
'defaultRoles' => array('guest', 'authenticated', 'author', 'publisher'), | |
'assignmentTable' => 'authassignment' , | |
'itemChildTable' => 'authitemchild', | |
'itemTable' => 'authitem' , | |
'showErrors' => true, | |
), | |
'urlManager'=>array( | |
'urlFormat' => 'path', | |
'showScriptName' => false, | |
'rules'=>array( | |
'/' => array('site/index', 'urlSuffix' => ''), | |
'<controller:\w+>/<id:\d+>' => '<controller>/view', | |
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', | |
'<controller:\w+>/<action:\w+>' => '<controller>/<action>', | |
'content/<article>.html' => 'news/read', | |
'<view:\w+>.html' => 'site/page', | |
//static pages | |
'<view:\w+>.html' => 'site/page', | |
'<directory:\w+>/<content:\w+>.html' => 'site/page/view/<directory>.<content>', | |
//cart modules | |
'cart/op/<action:\w+>' => 'cart/cart/<action>', | |
//content module | |
'content/op/<action:\w+>' => 'content/content/<action>', | |
'content/op/<action:\w+>/<id:\d+>' => 'content/content/<action>', | |
//contact module | |
'contact/op/<action:\w+>' => 'contact/contact/<action>', | |
'contact/op/<action:\w+>/*' => 'contact/contact/<action>', | |
//category module | |
'category/op/<action:\w+>' => 'category/category/<action>', | |
'category/op/<action:\w+>/*' => 'category/category/<action>', | |
), | |
), | |
), | |
'modules' => array( | |
'cart' => array(), | |
'payment' => array(), | |
'content' => array(), | |
'contact' => array(), | |
'laws' => array(), | |
'convert' => array(), | |
'category' => array() | |
), | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment