Download this mail extension here http://www.yiiframework.com/extension/mail. Extract the files. Move the vendors folder to protected/components/vendors/ Move YiiMail.php and YiiMailMessage.php to protected/components/ Add on protected/config/main.php [php] ‘components’=>array( … ‘mail’ => array( ‘class’ => ‘YiiMail’, ‘transportType’ => ‘php’, ‘transportType’ => ‘smtp’, ‘transportOptions’=>array( ‘host’=>’ghazalitajuddin.com’, //’encryption’=>’tls’, ‘username’=>’***@ghazalitajuddin.com’, ‘password’=>’******’, ‘port’=>25, ), ‘logging’ => true, ‘dryRun’ => false ), … ), [/php]…
Widget
-
-
Sample using CActiveDataProvider Sample 1: [php] $dataProvider=new CActiveDataProvider(‘User’,array( ‘criteria’=>array( ‘condition’=>’activationstatus = 1’), )); [/php] Sample 2: [php] $dataProvider=new CActiveDataProvider(‘Event’, array( ‘criteria’=>array( ‘condition’=>’date >= "’.date(‘Y-m-d’, strtotime(‘-2 years’)).’"’, ), )); [/php] Sample 3: [php] $dataProvider=new CActiveDataProvider(‘Post’, array( ‘pagination’=>array( ‘pageSize’=>5, ), ‘criteria’=>$criteria, )); [/php] Sample 4: [php] $dataProvider=new CActiveDataProvider(‘User’) [/php]
-
CGridView is one of Zii Components There is other than CGridView, CDetailView, CListView. Look here. CGridView use DataProvider which define in controller CGridView display data in tables. Supports paginating, sorting, searching. Also support view, update, delete method Define our data provider in controller like this [php] /** * Lists all models. */ public function actionIndex()…
-
In this tutorial we will discuss about setting up our Yii application Our Web Apps will have user registration page Our Web Apps will varified user registration trough emails activation The first thing is we need to look into our User table or our User model. Im setting up my tbl_user as below. Im also…