Wiki

Articles in category "tips", sorted by viewsX
Displaying 91-100 of 154 result(s).

Getting nulls from database instead of empty strings

Created 6 years ago by samdarkTips2 comments – viewed 12,506 times – ( +13 / -1 ) – 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

Yii code completion and calltips in Komodo Edit

Created 6 years ago by viterTips1 comment – viewed 12,050 times – ( +6 / -1 ) – version 1.1
My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:
tags: Komodo Edit

Directory independent extensions

Created 6 years ago by GOshaTips3 comments – viewed 11,880 times – ( +16 / -2 ) – 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:

关于Yii CHttpSession性能优化篇之源码流程分析

Created 6 years ago by Darwin WenTips0 comments – viewed 11,681 times – ( +1 / -2 ) – version 1.1
当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。

View a related field in CGridView

Created 3 years ago by rafaelt88Tips1 comment – viewed 11,590 times – ( +6 / -1 ) – version 1.1
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

Preventing CJuiTabs from hiding drop-down CMenu items

Created 6 years ago by Steve FriedlTips1 comment – viewed 11,064 times – ( +4 / -1 ) – version 1.1
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

Shrink Yii, help your IDE and speed up copying

Created 6 years ago by dckurushinTips4 comments – viewed 10,757 times – ( +10 / -10 ) – version 1.1
In this little tip, I will help you to cut Yii size for about half

Boost composer-asset-plugin update speed

Created about a year ago by schmunkTips5 comments – viewed 10,639 times – ( +5 / -1 ) – version 2.0
If you're using a lot of bower and npm assets with Yii 2.0 you might encounter long running composer update tasks.

Fixing extensions without modifying their code

Created 4 years ago by schmunkTips3 comments – viewed 10,484 times – ( +6 / -1 ) – 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.

Update Gridview with Dropdown Selection

Created 3 years ago by lgastmansTips1 comment – viewed 10,403 times – ( +3 / -1 ) – version 1.1
I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...