Wiki

Articles in category "tutorials"X
Displaying 161-170 of 175 result(s).

How to hide index.php on nginx

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

AutoTimestampBehavior

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

Eclipse PDT - code-hints, references and other goodies

Created 4 years ago by mindehTutorials3 comments – viewed 21,240 times – ( +13 )
Since PHP is dynamically typed language, the way IDE may help you is limited.
tags: IDE

How to use Highslide for image popups

Created 4 years ago by mocapapaTutorials0 comments – viewed 11,356 times – ( +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 4 years ago by qiangTutorials0 comments – viewed 17,841 times – ( +6 )
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 4 years ago by dalipTutorials7 comments – viewed 60,267 times – ( +25 )
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 4 years ago by pfthTutorials5 comments – viewed 19,528 times – ( +27 / -2 )
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 4 years ago by krillzipTutorials1 comment – viewed 8,158 times – ( +2 )
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 4 years ago by qiangTutorials1 comment – viewed 5,237 times
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 4 years ago by qiangTutorials1 comment – viewed 70,467 times – ( +19 )
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.