Wiki

Articles in category "tips", sorted by commentsX
Displaying 41-50 of 133 result(s).

using multiple radio button

Created 2 years ago by francis jaTips3 comments – viewed 26,425 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().

Directory independent extensions

Created 3 years ago by GOshaTips3 comments – viewed 8,245 times – ( +15 / -1 ) – version 1.1
Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

Using sub query for doubletts

Created about a year ago by mbTips3 comments – viewed 6,632 times – ( +1 ) – version 1.1
find doubletts by db fields. in this example i will check doublets for 3 tabelfields (col1,col2,col3). so i will get a subquery with the condition, select and grouping of the tablefields. the having with COUNT() > 1 means: find all records more then one result.

Auto TDD - How to auto-run PHPUnit

Created 3 years ago by imeheszTips3 comments – viewed 12,082 times – ( +3 / -1 ) – version 1.1
If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!
tags: PHPUnit, testing, TDD

Real Time Logging

Created 3 years ago by lucifuriousTips3 comments – viewed 18,135 times – ( +14 ) – version 1.1
I've seen a lot of people asking about the logging facilities in Yii and thought I'd share a nice little class I wrote that provides near real-time logging.

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 2 months ago by Kartik VTips3 comments – viewed 1,807 times – ( +24 / -4 ) – version 2.0
With Bootstrap 3 and its inbuilt support in Yii Framework 2.0, you would see quite some new ways of creating HTML markup and styling your site. However, with version 3 of Bootstrap, tooltips and popover are not activated by default on your elements. Assuming you have activated the Bootstrap 3 tooltip plugin - how do you easily enable display of tooltips/popovers across your site?

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created about a year ago by Xgamer99Tips3 comments – viewed 8,566 times – ( +1 ) – version 1.1
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

Fixing extensions without modifying their code

Created about a year ago by schmunkTips3 comments – viewed 5,381 times – ( +6 ) – version 1.1
If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

How to ensure unicity to url

Created 2 years ago by zaccariaTips3 comments – viewed 10,303 times – ( +14 ) – version 1.1
Many time for SEO porpouses is important that each page will have a unique address.
tags: SEO, unique, URL

Display a nice exception message on ajax requests

Created 2 years ago by Maurizio Domba CerinTips3 comments – viewed 24,455 times – ( +13 ) – version 1.1
When an exception is thrown in our code like
tags: error, exception