Wiki

Sorted by viewsX
Displaying 521-530 of 693 result(s).

Define general array and variable and call it to anywhere in application

Created about a year ago by bhavesh vaghelaTutorials2 comments – viewed 5,389 times – ( +2 / -4 ) – version 1.1
Create param.php file in protected/config

Profiling using XDebug

Created about a year ago by le_topHow-tos1 comment – viewed 5,376 times – ( +3 ) – version all
A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.

Remove Byte Order Mark (BOM) from files recursively

Created 11 months ago by KonApazHow-tos3 comments – viewed 5,280 times – ( +5 / -1 ) – version all
Ok, this wiki is not only for yii projects.

Setting static modules' properties in config

Created about a year ago by Alexander PalamarchukTips0 comments – viewed 5,277 times – ( +2 / -2 ) – version 1.1
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

two or more different collected data in one CGridView

Created 10 months ago by KonApazHow-tos2 comments – viewed 5,190 times – ( +3 / -1 ) – version 1.1
Assume that you have teachers and students model.

Access log output from unit tests

Created 2 years ago by MikeTips2 comments – viewed 5,173 times – ( +4 ) – version 1.1
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.

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

Created 2 years ago by sirin kTips0 comments – viewed 5,123 times – ( +4 ) – version 1.1
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

Instanciar clase hija basada en campo de modelo padre (CActiveRecord)

Created about a year ago by robregonmHow-tos0 comments – viewed 5,102 times – ( +2 ) – version 1.1
[EN] [ES]

Tarpit for bad bots

Created 2 years ago by mitherealHow-tos4 comments – viewed 5,094 times – ( +1 ) – version 1.1
I recently built a tarpit for bad bots.
tags: tarpit, bots

Alternative wildcard characters CDbCriteria

Created 2 years ago by maigretHow-tos0 comments – viewed 5,089 times – ( +3 ) – version 1.1
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $wildcard_chars to the method addSearchCondition to replace them if needed with standard SQL characters: