Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.
Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.
This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen.
Note that currently selected language is always a part...
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language.
This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...
In this article I will show you how to implement a secure password hashing mechanism in your Yii projects using a bCrypt class.
Suppose to have two models: Users and Emails. You do not want to store email in a Users model. And User can have 0 or many emails. This is the form generated to create a new user (just username).
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).
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.
/*
Get class constants by token.
If you set constants with same prefix, like:
MY_STATUS_1
MY_STATUS_2
MY_STATUS_3
This wiki is a work in progress.
Please join the party by adding your own favorite Yii programming errors. Be sure to leave at least a hint at the correction.
Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.
When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.
This wiki has been replaced by Use crypt() for password storage.
Let's say, for example, that you are developing a blog or some kind of CMS and you want to track the number of times each post was viewed (maybe to show a list of the most viewed ones).
Lets say we have two models and relation between them:
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider
using CDbCriteria
to get data from parent and 1:n child table with a condition on the child table.
This is a simple demo how to use Zend_AMF with Yii.
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.