Wiki articles

Showing 201-220 of 822 items.

关于Yii CHttpSession性能优化篇之源码流程分析

Created 12 years ago by Darwin Wen, updated 12 years ago by Maurizio Domba Cerin.

当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。

0 1
2 followers
Viewed: 17 247 times
Version: 1.1
Category: Tips

CGridView keep state of page and sort.

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

Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.

5 0
13 followers
Viewed: 35 895 times
Version: 1.1
Category: How-tos

Change buttons on our CGridView extending yii

Created 12 years ago by sensorario, updated 11 years ago by sensorario.

In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

9 0
9 followers
Viewed: 35 861 times
Version: 1.1
Category: Tips

How to use an application behavior to maintain runtime configuration

Created 12 years ago by zaccaria, updated 11 years ago by Pablovp.

In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

26 0
25 followers
Viewed: 42 368 times
Version: 1.1
Category: How-tos

Update two models with one view

Created 12 years ago by sensorario, updated 11 years ago by SebK.

Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).

9 3
13 followers
Viewed: 55 456 times
Version: 1.1
Category: Tips

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

Created 14 years ago by olafure, updated 11 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: 24 290 times
Version: 1.1
Category: Tutorials
Tags: Logging

Use phing to make Yii application "installable"

Created 11 years ago by sensorario, updated 11 years ago by Maurizio Domba Cerin.

To use this "how-to", you need to install phing in your machine.

7 0
10 followers
Viewed: 14 668 times
Version: 1.1
Category: How-tos
Tags: phing

Display an AJAX tree from your DB using CTreeView

Created 14 years ago by François Gannaz, updated 11 years ago by François Gannaz.

This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).

19 0
21 followers
Viewed: 72 039 times
Version: 1.1
Category: Tutorials

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

Created 11 years ago by pckabeer, updated 11 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: 25 076 times
Version: 1.1
Category: How-tos

Deploy yii on pagoda box

Created 12 years ago by francis ja, updated 11 years ago by francis ja.

pagoda box is very useful tool for a programmer to test their php app online so its very useful one. For deploying code pagodabox use git command

4 0
5 followers
Viewed: 11 927 times
Version: 1.1
Category: Tutorials

Adding Bash Command Completion for Yii Commands

Created 11 years ago by Dustin Oprea, updated 11 years ago by Dustin Oprea.

This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

3 0
5 followers
Viewed: 14 620 times
Version: 1.1
Category: How-tos

Custom Autocomplete Display and Value Submission

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

I was looking around wiki and found that was no approach as the one I did so I guessed this is worth to write.

12 0
18 followers
Viewed: 60 891 times
Version: 1.1
Category: How-tos

Show captcha after <N> unsuccessfull attempts

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

In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

13 4
15 followers
Viewed: 34 583 times
Version: 1.1
Category: How-tos

CSV Export

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

I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.

4 0
5 followers
Viewed: 29 436 times
Version: 1.1
Category: How-tos
Tags: csv, export

Access log output from unit tests

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

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
2 followers
Viewed: 15 341 times
Version: 1.1
Category: Tips

CGridView: Update/create records in a CJuiDialog

Created 12 years ago by Joblo, updated 11 years ago by Joblo.

My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

12 0
26 followers
Viewed: 57 537 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 77 227 times
Version: 1.1
Category: Tips

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 13 years ago by xrx, updated 11 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: 51 630 times
Version: 1.1
Category: How-tos

Simple access control

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

For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

3 7
10 followers
Viewed: 46 101 times
Version: 1.1
Category: Tutorials

How to hide `index` action from URL

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

Here is my experiment inspired by my own question and others from the forum.

3 1
9 followers
Viewed: 24 682 times
Version: 1.1
Category: How-tos
Tags: index