This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.
This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.
To replace the application component 'format', which is registered by CApplication by default, you can put this in your application 'components' config:
At first, create a class named SmartyRenderer under application/components or any directory you want.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataprovider,
'id'=>'recipient_table',
'selectionChanged'=>'updateEditForm',
'columns' => array(
'rec_id',
'org.nachname',
'org.vorname',
'org_id',
array(
'class'=>'CButtonColumn',
'template'=>'{...
Taking futher the idea from Piotr Masełkowski - http://www.yiiframework.com/extension/elipsum/ here's how to generate multilanguage Lorem Ipsum text. This example uses English and Bulgarian sample paragraphs. Create a class in /protected/components/LoremIpsum.php. Wall of text incoming wohoo...
How to check the online users or how to logout a specific user from your admin panel? This wiki shows how to do that
If you don't want to use any of the AJAX features of CListView and thus want to prevent that it publishes any of its asset files, you can extend it and create a sub class like this:
require_once 'Mail.php'; // PEAR Mail require_once 'Mail/mime.php'; // PEAR Mail_mime require_once 'Mail/Queue.php'; // PEAR Mail_queue require_once 'Mail/Queue/Container/mdb2.php'; // PEAR Mail_queue mdb2
Once you have installed and configured the rights extension in your application, you can change the table name from 'User' to any table name you want and similarly for 'username' column to any other column name.
This wiki will explain how to include a javascript library in a widget.
Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench: ![MySQL workbench screenshot](http://s4.postimage.org/4tuwkm43d/Screenshot.pn...
If in your application you have to proceed to a complex SQL query that is not associated to a model, you will use CDbDataReader like it is described in the Yii documentation. An example could be
In this wiki I will show how could be store last login date & time in database. First we need a field LastLoginTime (Type must be datetime). this field store a user login detalis (like - Date & Time).
Assalamualaikum wr.wb Hello yii people i'm Muhammad Fahmi Azain this is tutorial about forgot password in yii framework, and i'm sorry if it does not comply with code standards yii. okay let's begin
If you coming to Yii with experience with Zend Framework for example, most likely you get used to
Zend_Registry::get('paramName');
Zend_Registry::set('paramName');
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'user-grid',
'dat...
In this How-To I'll show you:
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.