Once you are completed with the "Creating First Yii Application", the following can be done.
Once you are completed with the "Creating First Yii Application", the following can be done.
Example settings when using Gettext for i18n.
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.
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.
I have a calls which help me display json directly in html table.
The Yii Framework provides a sweet functionality that allows you to easily create page specific menus. What does this mean? This allows you to create one layout or CSS styling for your menu, and when each page is loaded, a new set of menu items is loaded in. This is useful for context specific sidebars within your application.
Sometimes we need to create our custom exception and show it to the end user through a friendly way . In this article, I'm showing how to do it using CJuidialog.
How to display status image on admin gridview.
Finding good looking, working and not abandoned gallery manager for Yii 1.x application is a tough task. Out of all I found, only yii-gallery-manager extension looked promising. But, after downloading it, it turned out, that there are certain unusual things to do, to include it in your application. So, I decided to write this article...
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:
1) include the fancybox extesion otherwise fancybox js
This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.
Yii's ActiveRecord classes are powerful, but they fall short when you want to have a configurable table prefix for your application.
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:
How to add additional information to a user when using BUM extension?
This article discusses how one can run a long task in background in yiiframework 1.1 using Ajax technique.
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 :
public function scopeUnused( $useAnd = true )
{
$join = " left outer join composed_by j on t.ID = j.ID ";
$condition = ' j.ID Is Null';
The export to excel function will affected by the final resorted columns in case you use my export grid to excel extends hzlexportgrid too, Since that export extention just depends on the grid columns configs, and that columns been customized by user themselves just now.