Assume that you have teachers and students model.
Assume that you have teachers and students model.
I am going to show you an effective way to validate the uniqueness of multiple columns.
In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.
The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.
How to check the online users or how to logout a specific user from your admin panel? This wiki shows how to do that
For one of my projects I needed an interactive console command in Yii 1, i.e. the one that is gathering all information from user in an interactive mode (a serie of questions and answers displayed directly in the console), ignoring command-line arguments at all.
I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module (securityManager). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does...
I did not invent this instructions, I read it somewhere and re-organized in my way as I was trying and it works for me;
In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...
The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) .
But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.
In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is call outlook as COM.
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.
First of all this is a very common problem, for more details see this post http://www.yiiframework.com/forum/index.php/topic/52052-upload-file-with-any-charset/
In application development we often have to choose how to mange recurrent values.
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.
PHPIDS is a well known project that can be found in php-ids.org.
Since version 5.4 PHP can work as a simple webserver so you can develop Yii applications without installing Apache. That's how to use it: