Wiki articles in category How-tos

Showing 201-220 of 292 items.

Getting the Most out of APC for Yii

Created 13 years ago by Da:Sourcerer, updated 11 years ago by Da:Sourcerer.

In addition to the opcode cache, APC can also serve as a user cache for Yii via [CApcCache]. It should be noted that this will make APC's memory needs less predictable.

15 0
19 followers
Viewed: 52 611 times
Version: 1.1
Category: How-tos
Tags: apc, caching

pass variables or content block from view file to layout file

Created 12 years ago by yiqing95, updated 12 years ago by Maurizio Domba Cerin.

If you use yiic to generate webApplication there will be a layout folder under the protected/views/, and the Controller class under protected/components which will use by default these layouts files.

2 0
6 followers
Viewed: 52 650 times
Version: 1.1
Category: How-tos

Setting up PHPUnit and Selenium with IntelliJ IDEA/PhpStorm

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

This article intends to summarize the steps taken to set up PHPUnit and Selenium for a Yii project, with IntelliJ IDEA Ultimate (the IDE). It was done on Mac OS X 10.6.

7 0
10 followers
Viewed: 52 661 times
Version: 1.1
Category: How-tos

Integrating HybridAuth directly into Yii without an extension

Created 12 years ago by biz dev, updated 12 years ago by biz dev.

This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

10 0
15 followers
Viewed: 52 716 times
Version: 1.1
Category: How-tos

simple CSV export

Created 12 years ago by bluyell, updated 12 years ago by bluyell.
2 0
13 followers
Viewed: 52 990 times
Version: 1.1
Category: How-tos
Tags: csv, excel, export

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 14 years ago by xrx, updated 13 years ago by xrx.

Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

23 0
29 followers
Viewed: 53 126 times
Version: 1.1
Category: How-tos

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 13 years ago by c@cba, updated 11 years ago by nsanden.

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 drop down list, which has the enum values as options.
The main code was contributed by zaccaria in the forum (see [this post](...

10 0
11 followers
Viewed: 53 402 times
Version: 1.1
Category: How-tos

File uploads in CForm (Form builder)

Created 13 years ago by Luke Jurgs, updated 13 years ago by Luke Jurgs.

While there is a reasonable amount of documentation regarding CForm (form builder) and file uploads seperately, there really is not any coverage of both in combination.

9 0
10 followers
Viewed: 53 778 times
Version: 1.1
Category: How-tos

Creating a jQueryUI Sortable CGridView

Created 13 years ago by blindMoe, updated 12 years ago by rAWTAZ.

I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

36 0
54 followers
Viewed: 53 880 times
Version: 1.1
Category: How-tos

Single table inheritance

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

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
35 followers
Viewed: 54 624 times
Version: 1.1
Category: How-tos

Twitter Bootstrap style Breadcrumbs

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

will generate twitter bootstrap styled breadcrumb code:

3 1
4 followers
Viewed: 54 713 times
Version: 1.1
Category: How-tos

How to use YiiBooster TbFileUpload widget

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

I normally create a files folder and I allocate it within my www one, that is where I keep my css, js, images files. So, even though you can place it where ever you wish and for the sake of the example, I will use the files folder name.

7 0
19 followers
Viewed: 55 022 times
Version: 1.1
Category: How-tos

Dynamic Sidebar using CClipWidget

Created 14 years ago by Sheldmandu, updated 11 years ago by Cozumel.

There are a couple of ways to achieve this, but the first is preferred.

18 0
18 followers
Viewed: 55 225 times
Version: 1.1
Category: How-tos

How to use the official Yii installer for Composer (**DEPRECATED**)

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

This wiki shall be considered deprecated since the Yii installer for composer has been discontinued.

3 0
10 followers
Viewed: 55 884 times
Version: 1.1
Category: How-tos

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

Created 12 years ago by Maug Lee, updated 11 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: 55 894 times
Version: 1.1
Category: How-tos

Elementary introduction to using jQuery ajax and the yii framework

Created 12 years ago by dhimes, updated 12 years ago by François Gannaz.

In doing internet searches trying to learn how to incorporated ajax into web pages generated by the yii framework I noticed that there seems to be a lot of confusion. I worry that too-clever hacks will be broken in upgrades of the framework.

2 0
15 followers
Viewed: 56 116 times
Version: 1.1
Category: How-tos
Tags: AJAX

Actions code reuse with CAction

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

Gii provides us normally with the following code on the 'actionCreate':

public function actionCreate()
{
   $model=new ModelName;

33 0
19 followers
Viewed: 56 176 times
Version: 1.1
Category: How-tos

How to create a criteria condition for a multiple value text search i.e a "LIKE IN"

Created 11 years ago by toph, updated 8 years ago by toph.

This is a shortcut for adding a text search for multiple values i.e.

0 0
5 followers
Viewed: 56 222 times
Version: 1.1
Category: How-tos

Filter / Search with CListView

Created 13 years ago by JohnPollard, updated 12 years ago by JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 56 737 times
Version: 1.1
Category: How-tos

Increasing AR performance in connections with Oracle

Created 14 years ago by Trejder, updated 13 years ago by igorsantos07.

Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.

1 0
15 followers
Viewed: 56 774 times
Version: 1.1
Category: How-tos