Wiki

Articles in category "tips", sorted by viewsX
Displaying 81-90 of 103 result(s).

PHPStorm & NetBeans autocomplete problem

Created 3 months ago by StagelineTips0 comments – viewed 3,393 times – ( +16 )
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

How to use a component before every action of a controller

Created 2 months ago by transistorTips1 comment – viewed 3,363 times – ( +1 )
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.

Access log output from unit tests

Created about a year ago by MikeTips2 comments – viewed 3,329 times – ( +2 )
Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

Adding a link to a CDataColumn

Created 3 months ago by le_topTips4 comments – viewed 3,071 times – ( +3 )
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Solution for session lose of Facebook iframe application in Internet Explorer .

Created 9 months ago by sirin kTips0 comments – viewed 3,034 times – ( +2 )
Facebook iframe app’s session is losing in Internet Explorer when doing a second redirection inside the facebook iframe app.The main reason is ,by default IE wont allow cookies in its priavacy settings If cookies not available means session is also not available for our Facebook iframe app in IE.

[pt-br] O guia de estudos do Yii para iniciantes

Created 8 months ago by Rodrigo CoelhoTips0 comments – viewed 3,026 times – ( +1 )
You can find the english version of this wiki here: The complete beginner's study guide for the Yii Framework.

Speedup unit tests by moving MySql data to memory (in Ubuntu)

Created 6 months ago by sebTips0 comments – viewed 3,022 times – ( +1 / -1 )
Speedup unit tests by moving MySql data to memory [Ubuntu]
tags: mysql, unit test

Setting static modules' properties in config

Created 8 months ago by Alexander PalamarchukTips0 comments – viewed 2,922 times – ( +2 / -2 )
You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.
tags: config, module

Get notified about the status of a Facebook user in your web app using periodic Ajax calls.

Created 9 months ago by sirin kTips0 comments – viewed 2,893 times – ( +4 )
hello, This article is helpful only if you have the following situation: A web app which uses facebook login to login its users and if a user is logged out from his/her facebook account through another browser tab, then your app dont know that he is logged out out or not from his facebook account and he/she will remain as logged in your web application.Its ok if you have no problem with this situation.But if you want to forcefully logout the user from your application if he is logged out from his facebook account means you can try this example.This example uses periodic ajax calls to facebook's graph api to check whether the user is logged in or not.
tags: facebook, user

Making friends' configs, DB credentials and paths with version control

Created 8 months ago by Alexander PalamarchukTips1 comment – viewed 2,867 times – ( +2 / -1 )
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config