Wiki articles

Showing 241-260 of 651 items.

How to log context information to logger (session id, user, ...)

Created 16 years ago by olafure, updated 13 years ago by ajsharma.

Logging context information (session, user, ...) to the logfile can be of great help tracking down problems with specific users.

2 0
5 followers
Viewed: 26 319 times
Version: 1.1
Category: Tutorials
Tags: Logging

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

Created 13 years ago by pckabeer, updated 13 years ago by pckabeer.

Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a Radio Button List, which has the enum values as options.
This is a rewrite of c@cba in the wiki article of [enumDropdownList](http://www...

6 0
3 followers
Viewed: 26 373 times
Version: 1.1
Category: How-tos

How to get & store Last Login DateTime in database?

Created 10 years ago by Rohit Suthar, updated 10 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: 26 489 times
Version: 1.1
Category: How-tos

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 12 years ago by Boaz, updated 8 years ago by mrun.

Consider the following use case:

5 1
6 followers
Viewed: 26 623 times
Version: 1.1
Category: How-tos

How to re enable logging during unit testing

Created 13 years ago by Asgaroth, updated 13 years ago by Asgaroth.

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10 followers
Viewed: 26 763 times
Version: 1.1
Category: How-tos

Sub-domains with different databases in Yii!

Created 14 years ago by jwerd, updated 14 years ago by jwerd.

I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...

2 0
12 followers
Viewed: 26 894 times
Version: 1.1
Category: How-tos

Yii 1.1: How To add id or class to CMenu items ?

Created 10 years ago by Louis Gac, updated 10 years ago by Louis Gac.

CMenu comes with a lot of great customization options built in. One of the most used is the class 'active' being added to menu item. But, what if you want to add your own class or id to a menu item ?

1 0
1 follower
Viewed: 27 098 times
Version: 1.1
Category: How-tos

Google style sign out of all other sessions

Created 10 years ago by Rohit Suthar, updated 10 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: 27 350 times
Version: 1.1
Category: How-tos

Background task with Ajax

Created 9 years ago by Alexandre Rodichevski, updated 9 years ago by Alexandre Rodichevski.

This article discusses how one can run a long task in background in yiiframework 1.1 using Ajax technique.

0 0
1 follower
Viewed: 27 372 times
Version: 1.1
Category: Tutorials

embed a view file of the class which implement the CAction.

Created 14 years ago by Davidhhuan, updated 14 years ago by Davidhhuan.

In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/ControllerNAME, then when we use the same actions class in different controllers, we have to copy it...

1 1
2 followers
Viewed: 27 452 times
Version: 1.1
Category: Tutorials

Yiinitializr: The Library

Created 12 years ago by Antonio Ramirez, updated 12 years ago by Antonio Ramirez.

Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(

// will override frontend configuration file
__DIR__ .'/../../common/config/main.php', // merged with
__DIR__ .'/../../common/config/env.php', // merged with
__DIR__ .'/../../common/config/local.php' // merged with

))->run(); `

Yiinitializr\Cli namespace

This namespace brings utilities to interact with...

14 0
23 followers
Viewed: 27 510 times
Version: 1.1
Category: Others

Adding a link to a CDataColumn

Created 12 years ago by le_top, updated 12 years ago by le_top.

Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

2 0
8 followers
Viewed: 27 857 times
Version: 1.1
Category: Tips

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 13 years ago by Antonio Ramirez, updated 13 years ago by Maurizio Domba Cerin.

The only thing required is simple, we just need to create a view that will be partially rendered by a call to a controller (using renderPartial) and make sure that we process output -setting to true the parameter on the function. Everything will work as expected but...

11 1
9 followers
Viewed: 27 901 times
Version: 1.1
Category: Tutorials

Changing Controllers Name

Created 14 years ago by Trejder, updated 12 years ago by Trejder.

This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

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

Impersonate Users within Yii Framework

Created 14 years ago by Woil, updated 14 years ago by Woil.

For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

20 0
21 followers
Viewed: 28 024 times
Version: 1.1
Category: Tutorials

Extension Development (beginner)

Created 11 years ago by sefburhan, updated 11 years ago by CeBe.

To extend the functionality of you web application relative to your requirements you are supposed to use existing yii core libraries or use external libraries. There are some steps to ensure security, uniqueness, modularity, performance and to avoid rework in future.

Step 01: Have a Strategy

  • Is my extension just for fun/demonstration purposes or for everyday use in the real world? -...

get summary of related model via STAT relation

Created 11 years ago by rootbear, updated 11 years ago by YiiJeka.

typical scenario: invoice, invoice items.

4 1
8 followers
Viewed: 28 407 times
Version: 1.1
Category: How-tos

How to implement an event and attach it in a behavior

Created 12 years ago by seb7, updated 12 years ago by seb7.

This page explains how to implement an event and catch that event in a behavior.

2 0
9 followers
Viewed: 28 420 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 14 years ago by PinkBrainPlan, updated 14 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: 28 526 times
Version: 1.1
Category: How-tos

How to avoid a database update if the ActiveRecord was not modified

Created 11 years ago by tomvdp, updated 11 years ago by tomvdp.

The classic Yii way for doing an update action is as follows:

1 0
3 followers
Viewed: 28 611 times
Version: 1.1
Category: How-tos