Wiki

Articles in category "tips", sorted by ratingX
Displaying 71-80 of 135 result(s).

Syntax check

Created 3 years ago by Russell EnglandTips2 comments – viewed 6,182 times – ( +4 ) – version 1.1
So I've been busy making lots of modifications to my views/models/controllers - came to test the app and got a blank screen. Nothing in the application.log file so must be a syntax error somewhere... But which file?
tags: php, syntax

Patching PHP code (used as a library) without changing the original code!

Created about a year ago by le_topTips0 comments – viewed 3,668 times – ( +4 ) – version 1.1
The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article Redefine PHP class methods or class giving me a head start to do what I wanted: patching third party code without touching the original to allow easy upgrades.
tags: patch, patching

adding class and links to Ctreeview node

Created 3 years ago by bingjie2680Tips2 comments – viewed 11,846 times – ( +4 ) – version 1.1
This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.
tags: ctreeview, link, class

Debugging CActiveRecord failed save() attempts

Created about a year ago by BoazTips0 comments – viewed 10,089 times – ( +4 ) – version 1.1
When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

Send asset folder path to a javascript of a widget

Created 3 years ago by sensorarioTips4 comments – viewed 16,630 times – ( +4 ) – version 1.1
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:

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

Created 3 years ago by RusAlexTips4 comments – viewed 7,096 times – ( +4 ) – version 1.1
Using a git submodule command in your yii project

using multiple radio button

Created 2 years ago by francis jaTips4 comments – viewed 29,845 times – ( +6 / -1 ) – version 1.1
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

Putting Function To Be Called In View

Created 3 years ago by junxiongTips2 comments – viewed 24,596 times – ( +6 / -1 ) – version 1.1
Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:
tags: view, render

Useful Multilanguage extensions collection and use.

Created about a year ago by cihappyTips2 comments – viewed 4,337 times – ( +3 )
What I want to achieve:

How to change the confirmation message on admingridview button and call a ajax..Dynamic

Created about a year ago by Ankit ModiTips0 comments – viewed 8,022 times – ( +3 ) – version 1.1
Hi Friends,