yii

  • Korang ada plan nak buat website tak? Kalau ada, sekarang aku ada buat promosi murah. Tapi aku takde la ambil banyak sangat order ya. Aku buat sikit2 as freelancer. Sibuk dengan Takaful PruBSN punya kerja. Pakej ini hanya untuk: Laman web peribadi Syarikat IKS, Perniagaan atau syarikat kecil yang mempunyai bajet terhad Persatuan / Organisasi…

    Baca catatan

  • 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]…

    Baca catatan

  • 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]

    Baca catatan

  • Some function is created to make code easy to read and manageable. The Lookup function is so powerfull to simplified data storage. Usually we store Approve, Not Approved, Qualified, Not Qualified in words for each records, but with Lookup class, we can make it short to an integer for each properties. Table scheme “tbl_lookup” [php]…

    Baca catatan

  • 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()…

    Baca catatan