For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.
For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.
Installing WAMP on XP was pretty easy; W7 is not so trivial. It's not difficult once you know, but it took me best part of a day to figure out and required gleaning various bits of information from around the web; this tutorial brings it all together in one place to (hopefully) make other peoples lives that bit easier. It does assume that you are reasonably happy configuring Apache, PHP, and MySQL...
This guide is for more or less advanced users. If you just started with Yii or didn't worked with any web-framework before, you may should come back later :-)
This is a bried guide about displaying of custom sql query results.
This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.
How to create a simple (non-RBAC) authorization system
I would like to share my little experience with Yii to the community in the form of the below small wiki:
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).
create a class file under protected\components named RActiveRecord.php
After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.
Inspired by it I extended the CButtonColumn class like this:
Here's a simple way to create a Recent comments showing widget to be used in your templates. The idea is just to highlighting your blog's new comments.
The issue is covered in "The Definite Guide to Yii" (Error Handling - Handling Errors Using an Action).
This tutorial shows how to use a model to save and validate related (MANY_MANY) models.
There are good reasons to use Google's Content Delivery Network (CDN) to serve jQuery and jQuery UI on your site:
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.
To extend further static pages as shown by Qiang http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/ here're the steps to take:
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.
Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.