This tutorial is explained following "basic" application structure.
This tutorial is explained following "basic" application structure.
This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
Please join the party by adding your own favorite Yii programming errors. Be sure to leave at least a hint at the correction.
This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).
I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.
As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
Countries sometimes change their laws pertaining to time zones and daylight saving times. This means that GMT+2 can be a different local time this August compared to last August! It could even be a different date!
During development, it's often very handy to have SQL logging and profiling.
For each column of the CGridView, we can specify name
, value
, htmlOptions
, cssClassExpression
etc. In the declarations of the attributes value
and cssClassExpression
we can use the "special" variable $data
, for example like this: 'value'=>'$data->author->username',
.
Now we might want to use $data
in the declaration of the `...
The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.
This solution requires Yii 1.1.9 or above
In this article you will find Yii framework extensions enabling you to add various charts/print out buttons etc. to your webapp.
To use this "how-to", you need to install phing in your machine.
Using a version control system, like Git, is nice. However, when building an extension from scratch and loading it via Composer, it adds a lot of pain in the butt steps. You have to commit your changes, update composer to pull them over, then notice there is an error, fix, commit, update. repeat.. I don't want all my baby steps under Git. Sure, I could edit my commit history, but c'mon. Just let m...
It is a common case coders often come accross. For example the purpose of these checkbox is to mark records to be deleted
Working with scenarios, with models that can receive many modifications in their rules or structures as development evolves, can create disruptions in the rescue process.