Wiki

Articles in category "tutorials"X
Displaying 221-230 of 235 result(s).

How to hide index.php on nginx

Created 5 years ago by milesTutorials3 comments – viewed 41,259 times – ( +4 ) – version 1.1
For a complete sample Nginx+PHP-FPM config, view this how-to: Nginx & PHP-FPM
tags: URL

AutoTimestampBehavior

Created 5 years ago by jonahTutorials1 comment – viewed 10,827 times – ( +2 / -2 ) – version 1.1
Note: currently a variant of this class CTimestampBehavior is included into Yii distribution package.

Eclipse PDT - code-hints, references and other goodies

Created 5 years ago by mindehTutorials2 comments – viewed 26,133 times – ( +14 ) – version 1.1
Since PHP is dynamically typed language, the way IDE may help you is limited.
tags: IDE

How to use Highslide for image popups

Created 5 years ago by mocapapaTutorials0 comments – viewed 15,399 times – ( +1 ) – version 1.1
You can download the highslide javascript from http://highslide.com/. And here is an explanation on that URL;
tags: image, popups

How to filter data using a dropdown list?

Created 5 years ago by qiangTutorials0 comments – viewed 24,049 times – ( +7 ) – version 1.1
A dropdown list can be used to select a value, based on which we can filter the data to be displayed. For example, the extension page has a dropdown list to filter the displayed extensions according to the selected category.

How to automate timestamps in ActiveRecord models

Created 5 years ago by dalipTutorials8 comments – viewed 106,639 times – ( +30 ) – version 1.1
There are many ways to automate the setting of timestamps in yii ActiveRecord models. Three are presented here:

How to log changes of ActiveRecords?

Created 5 years ago by pfthTutorials7 comments – viewed 34,098 times – ( +37 / -2 ) – version 1.1
A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a CActiveRecord Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecords very easily.
tags: Logging

Advanced CTabView using CClipWidget

Created 5 years ago by krillzipTutorials1 comment – viewed 10,406 times – ( +2 ) – version 1.1
Here is a way to dynamically extend tabs based on clips. Probably even more complex things could be done.

Q: My yiic tool cannot run model and crud commands. Why?

Created 5 years ago by qiangTutorials1 comment – viewed 7,271 times – version 1.1
Some PHP installations may use a different php.ini file for CLI PHP (command line PHP parser). As a result, when running the model or crud command in yiic shell, you may encounter errors like "YiiBase::include(PDO.php): failed to open stream..." or "...could not find driver", even though the requirement checker confirms you have PDO and the corresponding database driver.

How to add more information to Yii::app()->user

Created 5 years ago by qiangTutorials2 comments – viewed 122,528 times – ( +28 ) – version 1.1
By default, the expression Yii::app()->user returns a CWebUser application component which represents the information that are closely related with the current user. Some information can be persistent throughout the current user session. For example, CWebUser already comes with a name property that stores the username of the current user.