Wiki

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

Setting static modules' properties in config

Created about a year ago by Alexander PalamarchukTips0 comments – viewed 4,892 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

Open bootstrap modal and load content via Ajax

Created 2 months ago by JbalTeroHow-tos1 comment – viewed 4,862 times – ( +1 ) – version 1.1
My goal here is to Open bootstrap modal and load ANY content using ajax response.

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

Created about a year ago by sirin kTips0 comments – viewed 4,855 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

Make theme and layout option in your site

Created 11 months ago by Narender NegiHow-tos0 comments – viewed 4,851 times – ( +1 )
Here i am writing code how to add option of theme change and layout change in your website.
tags: theme, layouts

Profiling using XDebug

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

Named scope - Get orphan AR without losing primary key

Created 3 years ago by cmaTutorials0 comments – viewed 4,808 times – version 1.1
Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :

WordPress Role Based Authentication in Yii

Created 7 months ago by Bob GTutorials0 comments – viewed 4,795 times – ( +4 / -1 ) – version 1.1
This tutorial is for people that are integrating Yii into WordPress. Meaning that WordPress is the host platform, and that Yii will be handling AR, CRUD, etc.

Alternative wildcard characters CDbCriteria

Created about a year ago by maigretHow-tos0 comments – viewed 4,778 times – ( +2 ) – 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:

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

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

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

Created about a year ago by Alexander PalamarchukTips1 comment – viewed 4,723 times – ( +2 / -1 ) – version 1.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