Wiki

Articles in category "tips", sorted by ratingX
Displaying 21-30 of 146 result(s).

Styling Radio Buttons

Created 4 years ago by Steve FriedlTips4 comments – viewed 40,214 times – ( +15 ) – version 1.1
The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):

CGridView: Update/create records in a CJuiDialog

Created 3 years ago by JobloTips11 comments – viewed 40,810 times – ( +14 ) – version 1.1
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

Real Time Logging

Created 4 years ago by lucifuriousTips3 comments – viewed 20,680 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.

How to ensure unicity to url

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

Customizing Yii's formatting rules (extending CFormatter)

Created 3 years ago by HaenselTips0 comments – viewed 13,973 times – ( +14 ) – version 1.1
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.

FORM with GET method causes repeated stacking of URL Parameters

Created 10 months ago by Kartik VTips2 comments – viewed 5,977 times – ( +38 / -4 ) – version all
You are using an ActiveForm in yii (both v1.x or 2), with a GET method like below:

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 10 months ago by Kartik VTips5 comments – viewed 14,287 times – ( +37 / -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?

Getting nulls from database instead of empty strings

Created 3 years ago by samdarkTips2 comments – viewed 9,777 times – ( +13 ) – version 1.1
To get null from database instead of empty strings you need to set up your DB connection as follows:
tags: database, null

Display a nice exception message on ajax requests

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

Locking your Yii 2 project package versions with composer.lock

Created 10 months ago by Kartik VTips0 comments – viewed 2,064 times – ( +36 / -4 ) – version 2.0
Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.