Sunday, August 7, 2011

some basic config stuff for yii


--- testdrive/protected/config/main.php 2011-07-07 06:16:45.000000000 -0700
+++ test/protected/config/main.php 2011-07-21 10:13:13.000000000 -0700
@@ -7,7 +7,7 @@
// CWebApplication properties can be configured here.
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
- 'name'=>'My Web Application',
+ 'name'=>'My Awesome Web Application',

// preloading 'log' component
'preload'=>array('log'),
@@ -16,15 +16,19 @@
'import'=>array(
'application.models.*',
'application.components.*',
+ 'application.extensions.yiidebugtb.*', // debugging toolbar
),

'modules'=>array(
+ // uncomment the following to enable the Gii tool
+
'gii'=>array(
'class'=>'system.gii.GiiModule',
'password'=>'obihai',
// If removed, Gii defaults to localhost only. Edit carefully to taste.
'ipFilters'=>array('127.0.0.1','::1'),
),
+
),

// application components
@@ -34,16 +38,18 @@
'allowAutoLogin'=>true,
),
// uncomment the following to enable URLs in path-format
- /*
'urlManager'=>array(
'urlFormat'=>'path',
+ 'showScriptName'=>'false',
'rules'=>array(
- '<controller:\w+>/<id:\d+>'=>'<controller>/view',
- '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
+ '<controller:\w+>'=>'<controller>/list',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
+ '<controller:\w+>/<id:\d+>/<title>'=>'<controller>/view',
+ '<controller:\w+>/<id:\d+>'=>'<controller>/view',
+
+/* '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', */
),
),
- */
'db'=>array(
'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db',
),
@@ -68,6 +74,13 @@
'class'=>'CFileLogRoute',
'levels'=>'error, warning',
),
+ array( // configuration for the toolbar
+ 'class'=>'XWebDebugRouter',
+ 'config'=>'alignLeft, opaque, runInDebug, fixedPos, collapsed, yamlStyle',
+ 'levels'=>'error, warning, trace, profile, info',
+ 'allowedIPs'=>array('127.0.0.1','::1'),
+ // '192.168.1.54','192\.168\.1[0-5]\.[0-9]{3}'),
+ ),
// uncomment the following to show log messages on web pages
/*
array(
@@ -82,6 +95,7 @@
// using Yii::app()->params['paramName']
'params'=>array(
// this is used in contact page
'adminEmail'=>'webmaster@example.com',
),
+ 'defaultController' => 'site/login',
);

1 comment:

  1. and the top level .htaccess file

    IndexIgnore */*

    RewriteEngine on

    # if a directory or a file exists, use it directly
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # otherwise forward it to index.php
    RewriteRule . index.php

    ReplyDelete

#RSFtalks with Edward Snowden

What an intelligent, thoughtful individual. I find it difficult to forgive 44 for failing to pardon this patriot and instead pursuing him ...

Other Popular Posts: