Wiki

Articles in category "tips", sorted by ratingX
Displaying 71-80 of 141 result(s).

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,412 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

Preventing CJuiTabs from hiding drop-down CMenu items

Created 3 years ago by Steve FriedlTips1 comment – viewed 8,752 times – ( +4 ) – 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.

Syntax check

Created 3 years ago by Russell EnglandTips2 comments – viewed 6,369 times – ( +4 ) – version 1.1
So I've been busy making lots of modifications to my views/models/controllers - came to test the app and got a blank screen. Nothing in the application.log file so must be a syntax error somewhere... But which file?
tags: php, syntax

Patching PHP code (used as a library) without changing the original code!

Created about a year ago by le_topTips0 comments – viewed 3,883 times – ( +4 ) – version 1.1
The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article Redefine PHP class methods or class giving me a head start to do what I wanted: patching third party code without touching the original to allow easy upgrades.
tags: patch, patching

adding class and links to Ctreeview node

Created 3 years ago by bingjie2680Tips2 comments – viewed 12,147 times – ( +4 ) – version 1.1
This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.
tags: ctreeview, link, class

Send asset folder path to a javascript of a widget

Created 3 years ago by sensorarioTips4 comments – viewed 17,180 times – ( +4 ) – version 1.1
When you develop a widget, you could need one image that is in the assets folder, you can use it simply within a css. You can load a css or javascript script doing this:

how to use github (un)official extension repo in your Yii project

Created 3 years ago by RusAlexTips4 comments – viewed 7,255 times – ( +4 ) – version 1.1
Using a git submodule command in your yii project

using multiple radio button

Created 2 years ago by francis jaTips4 comments – viewed 31,558 times – ( +6 / -1 ) – version 1.1
When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

Putting Function To Be Called In View

Created 3 years ago by junxiongTips2 comments – viewed 25,432 times – ( +6 / -1 ) – version 1.1
Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:
tags: view, render

Useful Multilanguage extensions collection and use.

Created about a year ago by cihappyTips2 comments – viewed 4,520 times – ( +3 ) – version 1.1
What I want to achieve: