Wiki

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

How to catch and log MySQL deadlock errors

Created 4 years ago by sebTips1 comment – viewed 11,564 times – ( +4 ) – version 1.1
This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.
tags: database

Boost composer-asset-plugin update speed

Created 23 days ago by schmunkTips0 comments – viewed 2,828 times – ( +4 ) – 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.

Access log output from unit tests

Created 4 years ago by MikeTips2 comments – viewed 7,079 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 3 years ago by sirin kTips0 comments – viewed 6,872 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 5 years ago by Steve FriedlTips1 comment – viewed 10,116 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 5 years ago by Russell EnglandTips2 comments – viewed 7,988 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

adding class and links to Ctreeview node

Created 5 years ago by bingjie2680Tips2 comments – viewed 14,043 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 4 years ago by sensorarioTips4 comments – viewed 21,556 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 4 years ago by RusAlexTips4 comments – viewed 8,343 times – ( +4 ) – version 1.1
Using a git submodule command in your yii project

Putting Function To Be Called In View

Created 5 years ago by junxiongTips2 comments – viewed 33,351 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