Wiki articles in category Tips

Showing 41-60 of 119 items.

Shrink Yii, help your IDE and speed up copying

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

yii-1.1.8.r3324 framework directory is 10.4 mb size.

9 8
16 followers
Viewed: 14 073 times
Version: 1.1
Category: Tips

Send asset folder path to a javascript of a widget

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

When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this:

Yii::app()->getClientScript()->registerCssFile($filename);
4 0
9 followers
Viewed: 34 141 times
Version: 1.1
Category: Tips

how to use github (un)official extension repo in your Yii project

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

I'm developing a web project for a company using Yii framework. We are using a git vcs in our development process. We like to use Yii extensions. But only if they are good.

4 0
8 followers
Viewed: 12 132 times
Version: 1.1
Category: Tips

Special $variables in CGridView and CListView

Created 12 years ago by Steve Friedl, updated 12 years ago by Steve Friedl.

The popular [CListView] and [CGridView] widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

23 1
33 followers
Viewed: 77 249 times
Version: 1.1
Category: Tips

Como trasponer una lista creada con CHtml::checkBoxList

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

En ciertas ocasiones tenemos que lidiar con el tema de colocar una lista de checkboxes para hacer una seleccion especifica como es el caso de los dias de la semana para un calendario, para esta labor tenemos el comando CHtml::checkBoxList(), revisando un poco el funcionamiento de este temos los siguientes parametros:

2 0
4 followers
Viewed: 17 927 times
Version: 1.1
Category: Tips

Understanding series articles

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

Here are all wiki articles from "Understanding" series by Yii wiki contributors:

16 0
12 followers
Viewed: 14 106 times
Version: 1.1
Category: Tips

Yii Security-extended guide

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

This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in you...

6 6
12 followers
Viewed: 30 619 times
Version: 1.1
Category: Tips

Using events with CAction classes

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

As you know, events are used by:

9 0
9 followers
Viewed: 23 412 times
Version: 1.1
Category: Tips

Managing constants easily

Created 12 years ago by briiC.lv, updated 12 years ago by briiC.lv.

/*

    Get class constants by token.
    If you set constants with same prefix, like:
	MY_STATUS_1
	MY_STATUS_2
	MY_STATUS_3
4 0
7 followers
Viewed: 30 656 times
Version: 1.1
Category: Tips

How to ensure unicity to url

Created 12 years ago by zaccaria, updated 12 years ago by marcovtwout.

Many time for SEO porpouses is important that each page will have a unique address.

13 0
16 followers
Viewed: 23 664 times
Version: 1.1
Category: Tips
Tags: SEO, unique, URL

Use application on production/development environment without making changes

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

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 76 744 times
Version: 1.1
Category: Tips

Troubleshooting Rights Extension

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

Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

5 0
14 followers
Viewed: 30 892 times
Version: 1.1
Category: Tips

How to catch and log MySQL deadlock errors

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

This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.

4 0
7 followers
Viewed: 20 610 times
Version: 1.1
Category: Tips
Tags: database

关于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 238 times
Version: 1.1
Category: Tips

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 846 times
Version: 1.1
Category: Tips

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 434 times
Version: 1.1
Category: Tips

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 325 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 530 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 77 218 times
Version: 1.1
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 11 years ago by kiran sharma, updated 11 years ago by kiran sharma.

This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

9 0
26 followers
Viewed: 63 251 times
Version: 1.1
Category: Tips