Wiki articles in category Tips

Showing 1-20 of 162 items.

Things to Consider when application hosting on AppFog

Created 9 years ago by VINAY Kr. SHARMA, updated 9 years ago by VINAY Kr. SHARMA.

I faced many issues when hosted our company website on AppFog.

1 0
1 follower
Viewed: 7 947 times
Version: 1.1
Category: Tips

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Created 9 years ago by Deepak Pradhan, updated 9 years ago by Deepak Pradhan.

Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini

0 0
0 follower
Viewed: 9 119 times
Version: 2.0
Category: Tips

More on SSE and Yii

Created 10 years ago by Firebreaker, updated 10 years ago by Firebreaker.

This is not actually Yii involved.

1 0
1 follower
Viewed: 9 546 times
Version: Unknown (update)
Category: Tips

Useful Multilanguage extensions collection and use.

Created 10 years ago by cihappy, updated 9 years ago by Rohit Suthar.

What I want to achieve:

2 0
3 followers
Viewed: 9 919 times
Version: 1.1
Category: Tips

Provide SVG when the browser supports it, else PNG (using CHtml::image overload)

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

Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.

1 0
1 follower
Viewed: 9 971 times
Version: 1.1
Category: Tips

Custom Archive in Blog system

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

Hi I had made simple archive system for blog system that can handle tbl_post. I had used simple CDbCriteria not more than that. I know there is more and many better way to this but I think this will give some idea to users to generate new idea or customized or modified this version of code.

1 0
2 followers
Viewed: 10 259 times
Version: 1.1
Category: Tips

Cgridview counter column

Created 10 years ago by Nisanth thulasi, updated 10 years ago by trond.

some times we want to show the serialNo on cgridview .

4 0
8 followers
Viewed: 10 752 times
Version: Unknown (update)
Category: Tips

Create URL to language switcher anchor with langhandler

Created 9 years ago by Anas AbuDayah, updated 9 years ago by Anas AbuDayah.

This topic is related with langhandler extension

1 1
2 followers
Viewed: 10 936 times
Version: 1.1
Category: Tips

Search scenario (CGridView, etc.): avoid default values from database as search condition.

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

Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

1 0
2 followers
Viewed: 11 012 times
Version: 1.1
Category: Tips

Set a menu - reusable code

Created 10 years ago by Kostas Apazidis (KonApaz), updated 10 years ago by Kostas Apazidis (KonApaz).

As we know Using crud generator creates menu items in view files (for each view file have a varius menu items)

1 0
3 followers
Viewed: 11 420 times
Version: Unknown (update)
Category: Tips

using jqbargraph to create beautiful graphs

Created 11 years ago by MAHESH.E.U, updated 11 years ago by MAHESH.E.U.

If you are about to create a graph, the best option i would suggest is the jqbargraph.

5 0
9 followers
Viewed: 11 451 times
Version: 1.1
Category: Tips

CjuiDatepicker

Created 11 years ago by hiral darji, updated 11 years ago by hiral darji.

If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:

'onSelect'=>'js:function(selected) {
$("#HostelRoomStatusMaster_room_status_master_end_date").datepicker("option","minDate",selected);
				}',
1 0
5 followers
Viewed: 11 460 times
Version: 1.1
Category: Tips

Inline views, write less

Created 10 years ago by Firebreaker, updated 10 years ago by Firebreaker.

Sometimes writing views like

3 0
3 followers
Viewed: 11 552 times
Version: Unknown (update)
Category: Tips

an easy way to required multi columns(At least one cannot be blank)

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

in model add the following code:

3 0
3 followers
Viewed: 11 591 times
Version: 1.1
Category: Tips
Tags: rules

Search a file size range in CGridView

Created 10 years ago by CrazyCat, updated 10 years ago by CrazyCat.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
2 0
2 followers
Viewed: 11 692 times
Version: Unknown (update)
Category: Tips

How to preload dropdowns in CForm

Created 10 years ago by transistor, updated 10 years ago by transistor.

So you want to use CForm (form builder), but need to preload dropdowns in a form? It's simpler than it seems.
You got your CFormModel, CForm and the actual Form, right?
Let's say you have the typical State -> City dependent dropdowns, so you would want to load the from with the State and City selected.

1 0
2 followers
Viewed: 11 885 times
Version: Unknown (update)
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 134 times
Version: 1.1
Category: Tips

What SQL-Statement creates yii?

Created 5 years ago by Necip, updated 5 years ago by Necip.

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1 follower
Viewed: 12 229 times
Version: 1.1
Category: Tips

Functional tests independing from your urlManager settings

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

If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

0 0
4 followers
Viewed: 12 392 times
Version: 1.1
Category: Tips

Reading the doc

Created 13 years ago by zaccaria, updated 13 years ago by Orteko.

Almost all the information you need whilst working with yii is written in the Class Reference.

21 0
3 followers
Viewed: 12 427 times
Version: 1.1
Category: Tips
Tags: doc