Wiki articles

Showing 201-220 of 826 items.

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

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

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

0 1
2 followers
Viewed: 19 866 times
Version: 1.1
Category: Tips

CGridView keep state of page and sort.

Created 14 years ago by Daniel Daniel, updated 14 years ago by Daniel 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: 38 426 times
Version: 1.1
Category: How-tos

Change buttons on our CGridView extending yii

Created 14 years ago by sensorario sensorario, updated 14 years ago by sensorario 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: 38 905 times
Version: 1.1
Category: Tips

How to use an application behavior to maintain runtime configuration

Created 15 years ago by zaccaria zaccaria, updated 14 years ago by Pablovp 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: 47 457 times
Version: 1.1
Category: How-tos

Update two models with one view

Created 14 years ago by sensorario sensorario, updated 14 years ago by SebK 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: 60 484 times
Version: 1.1
Category: Tips

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

Created 17 years ago by olafure olafure, updated 14 years ago by ajsharma 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: 29 282 times
Version: 1.1
Category: Tutorials
Tags: Logging

Use phing to make Yii application "installable"

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

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

7 0
10 followers
Viewed: 18 122 times
Version: 1.1
Category: How-tos
Tags: phing

Display an AJAX tree from your DB using CTreeView

Created 16 years ago by François Gannaz François Gannaz, updated 14 years ago by François Gannaz 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: 80 275 times
Version: 1.1
Category: Tutorials

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

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

Deploy yii on pagoda box

Created 14 years ago by francis ja francis ja, updated 14 years ago by francis ja 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: 14 963 times
Version: 1.1
Category: Tutorials

Adding Bash Command Completion for Yii Commands

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

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

3 0
5 followers
Viewed: 16 772 times
Version: 1.1
Category: How-tos

Custom Autocomplete Display and Value Submission

Created 15 years ago by Antonio Ramirez Antonio Ramirez, updated 14 years ago by SebK 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: 65 781 times
Version: 1.1
Category: How-tos

Show captcha after <N> unsuccessfull attempts

Created 14 years ago by zitter zitter, updated 14 years ago by zitter 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: 39 216 times
Version: 1.1
Category: How-tos

CSV Export

Created 14 years ago by JohnPollard JohnPollard, updated 14 years ago by JohnPollard 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: 33 595 times
Version: 1.1
Category: How-tos
Tags: csv, export

Access log output from unit tests

Created 14 years ago by Mike Mike, updated 14 years ago by Mike 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: 18 667 times
Version: 1.1
Category: Tips

CGridView: Update/create records in a CJuiDialog

Created 14 years ago by Joblo Joblo, updated 14 years ago by Joblo 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: 61 557 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 81 197 times
Version: 1.1
Category: Tips

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 15 years ago by xrx xrx, updated 14 years ago by xrx 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: 56 431 times
Version: 1.1
Category: How-tos

Simple access control

Created 14 years ago by szfjozsef szfjozsef, updated 14 years ago by szfjozsef 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: 50 064 times
Version: 1.1
Category: Tutorials

How to hide `index` action from URL

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

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

3 1
9 followers
Viewed: 27 863 times
Version: 1.1
Category: How-tos
Tags: index