Wiki articles in category How-tos

Showing 121-140 of 292 items.

How to hide index.php on Microsoft Windows Server with IIS7

Created 6 years ago by Giuliano, updated 6 years ago by Giuliano.

I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.

6 0
6 followers
Viewed: 25 644 times
Version: 1.1
Category: How-tos

Create custom button button with AJAX function in CGridView

Created 6 years ago by nkd, updated 6 years ago by nkd.

This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.

5 0
15 followers
Viewed: 60 914 times
Version: 1.1
Category: How-tos

Localized version of CFormatter

Created 6 years ago by marcovtwout, updated 5 years ago by marcovtwout.

To replace the application component 'format', which is registered by CApplication by default, you can put this in your application 'components' config:

2 0
5 followers
Viewed: 6 879 times
Version: 1.1
Category: How-tos
3 0
4 followers
Viewed: 14 938 times
Version: 1.1
Category: How-tos

How to use Smarty renderer in Yii

Created 8 years ago by dongbeta, updated 8 years ago by dongbeta.

At first, create a class named SmartyRenderer under application/components or any directory you want.

3 0
7 followers
Viewed: 21 237 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 8 years ago by PinkBrainPlan, updated 8 years ago by PinkBrainPlan.

<?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'=>'{...
1 0
10 followers
Viewed: 23 667 times
Version: 1.1
Category: How-tos

Multilanguage Lorem Ipsum Text Generator

Created 6 years ago by yasen, updated 6 years ago by yasen.

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...

2 0
1 follower
Viewed: 8 974 times
Version: 1.1
Category: How-tos

Check online users / set specific user offline

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

How to check the online users or how to logout a specific user from your admin panel? This wiki shows how to do that

1 0
4 followers
Viewed: 12 977 times
Version: 1.1
Category: How-tos

Prevent asset publishing for CListView

Created 8 years ago by Mike, updated 8 years ago by Mike.

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:

2 0
6 followers
Viewed: 11 315 times
Version: 1.1
Category: How-tos

Using Pear Mail Mail_Mime and Mail_Queue

Created 8 years ago by Loren, updated 8 years ago by Loren.

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

7 0
11 followers
Viewed: 13 477 times
Version: 1.1
Category: How-tos

Using rights extension with different table and column name

Created 5 years ago by Ibrar Turi, updated 5 years ago by Ibrar Turi.

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.

0 0
2 followers
Viewed: 4 348 times
Version: 1.1
Category: How-tos

How to create a wrapper for a js library

Created 8 years ago by zaccaria, updated 8 years ago by Maurizio Domba Cerin.

This wiki will explain how to include a javascript library in a widget.

16 1
21 followers
Viewed: 17 519 times
Version: 1.1
Category: How-tos

ISA hierarchy of tables inside a database and how to implement a single form

Created 8 years ago by pligor, updated 7 years ago by pligor.

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...

1 0
3 followers
Viewed: 13 525 times
Version: 1.1
Category: How-tos

Using Google Maps in Yii Applications via Jquery

Created 6 years ago by bluyell, updated 6 years ago by bluyell.
2 0
6 followers
Viewed: 18 538 times
Version: 1.1
Category: How-tos

Using a CDbDataReader (sql query result) in a zii widget (such as CGridView or CListView)

Created 7 years ago by Revelis Luc Bonnin, updated 7 years ago by Revelis Luc Bonnin.

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

8 1
8 followers
Viewed: 30 455 times
Version: 1.1
Category: How-tos

How to get & store Last Login DateTime in database?

Created 4 years ago by Rohit Suthar, updated 4 years ago by Rohit Suthar.

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).

2 0
4 followers
Viewed: 18 351 times
Version: 1.1
Category: How-tos

How To : Create Forgot Password in Yii (Sending Email to Reset Password)

Created 4 years ago by ruderbytes, updated 3 years ago by ruderbytes.

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

0 0
2 followers
Viewed: 42 640 times
Version: 1.1
Category: How-tos

Google style sign out of all other sessions

Created 4 years ago by Rohit Suthar, updated 4 years ago by Rohit Suthar.

In this wiki I will show how could logout from all other sessions or all other places.

0 0
5 followers
Viewed: 12 934 times
Version: 1.1
Category: How-tos

Yii registry, how to use it, does it exist at all?

Created 7 years ago by dckurushin, updated 6 years ago by resurtm.

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');
6 0
9 followers
Viewed: 28 977 times
Version: 1.1
Category: How-tos

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created 6 years ago by Maug Lee, updated 5 years ago by yugene.

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.

Implementation

<?php
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'user-grid',
	'dat...
7 0
4 followers
Viewed: 45 922 times
Version: 1.1
Category: How-tos