Thursday, April 18, 2013


 

 

 

 

Features of Yii-User

  • Login from User Name or Email
  • Registration
  • Activation accounts (verification email)
  • Recovery password (send recovery key to user email)
  • User profile page
  • Manage Users
  • Manage Profile Fields
  • Profile field widget for view, edit and save data (FieldWidget)
  • Date widget (jQueryUI datepicker)
  • File upload widget
  • Profile Relation Widget
  • API

1.Download YII-user from this link http://www.yiiframework.com/extension/yii-user/

2. then go your webapp folder & open protect make folder name modules  past user on folder

4. open config & click main.php in your protect folder

5. to creat data base , open data folder in YIIUSER modules & run schema.mysql
make sure remove cooment in

'db'=>array(
            'connectionString' => 'mysql:host=localhost;dbname=database name',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
                      'tablePrefix' => 'tbl_',


6. update main.php using this code



return array(
#...
        // autoloading model and component classes
        'import'=>array(
                'application.models.*',
                'application.components.*',
                'application.modules.user.models.*',
                'application.modules.user.components.*',
        ),
#...
        'modules'=>array(
                'user',
        ),
#...
        // application components
        'components'=>array(
#...
                'user'=>array(
                        // enable cookie-based authentication
                        'allowAutoLogin'=>true,
                        'loginUrl' => array('/user/login'),
                ),
#...
        ),
#...
);
 
 
 
then save & open your view main.php page (protect/view/layout/main.php
 
 
copy follow  code &  update your nav code
 
array('url'=>Yii::app()->getModule('user')->loginUrl, 
 'label'=>Yii::app()->getModule('user')->t("Login"), 
 'visible'=>Yii::app()->user->isGuest),
 
array('url'=>Yii::app()->getModule('user')->registrationUrl,
  'label'=>Yii::app()->getModule('user')->t("Register"), 
 'visible'=>Yii::app()->user->isGuest),
 
array('url'=>Yii::app()->getModule('user')->profileUrl, 
 'label'=>Yii::app()->getModule('user')->t("Profile"),  
'visible'=>!Yii::app()->user->isGuest),
 
array('url'=>Yii::app()->getModule('user')->logoutUrl,  
'label'=>Yii::app()->getModule('user')->t("Logout").
('.Yii::app()->user->name.')', 'visible'=>!Yii::app()->user->isGuest), 
 
 
then run local host you can see you new login form 
 
 
Login
Default users:
  • admin/admin
  • demo/demo

 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
    



Hi..... To day we going to install yii framework on your PC

1.frist download YII from www.yiiframework.com

2.copy yii framework & past wamp (E:/wamp/yii)















3. open console & Enter in to yii file (in my pc)












4. then enter the framework







5.then add this code  for make new YII appliction






yiic webapp  your www root
above code  you can easily understand how run code structure
the they ask allow create web app under your URL then Enter Y

6.after run local host & see your new web application




Tuesday, March 26, 2013

hi we suppose to start our new blog soon

Subscribe to RSS Feed Follow me on Twitter!