Archives For framework

In my series Learning the Yii Framework, I discuss the individual parts of the MVC (Model, View, Controller) architecture in some detail, from a Yii perspective. In the post on [intlink id=”659″ type=”post”]Controllers[/intlink], I introduce Access Control Lists (ACLs), Yii’s default way of restricting who can take what actions. This is a key part of the security of any Web application. For example, a site’s content can often be read by anyone at all, registered or non-registered users alike (like the text you’re reading now). Some content may only be viewable by registered users and some by registered users of a certain type (e.g., paid members). Finally, some content may only be viewable by administrators. In this post, I detail how to completely control access to your Web application using Yii’s Access Control Lists. Continue Reading…

In a [intlink id=”826″ type=”post”]previous post[/intlink], I walk through the Yii framework’s built-in authentication system for adding login functionality to a Web site. There are a number of files and components involved, but simple authentication works fine out of the box, or with just a little tweaking. That’s the focus of that previous post. In this post, I explain how you can customize the authentication process further. Continue Reading…

I wanted to write up a strong post on Access Control Lists in Yii, for controlling who can do what in an application. I still will, of course, but since authorization depends upon authentication, I thought it necessary to discuss Yii’s authentication system first. And, as happens with me, in writing about that, and how you would [intlink id=”849″ type=”post”]customize the authentication process[/intlink], I had to break the subject down into two posts. So here’s the first of an informal three-part series on authentication and authorization in Yii. In this post, I discuss how the parts of Yii’s authentication system work together; much of what I say in this first post is also available in the Yii documentation, just not presented in this way. I also show a couple of quick ways to modify its behavior to suit your situation. Continue Reading…

I’m just not a big fan of using the Zend Framework as my Web development tool, but one of the framework’s nicest features is that you can use only the parts of it you need. I am, however, a big fan of the Yii framework and one of its many plusses is that you can easily integrate other frameworks and tools into it. Like, for example, the Zend Framework. Yii does not have its own search engine functionality, and Apache’s Lucene is arguably the gold standard (although clearly not the only choice), so tapping into Zend’s Lucene module for a Yii-driven site makes a lot of sense. In this post, I’ll walk you through the steps for integrating  Zend_Lucene into Yii. This post does assume familiarity with PHP, MVC, and Yii. Continue Reading…

I’ve created three Yii-driven PHP sites in the past few months, each of which required an administrative area to dynamically manage the site’s content. Much of the content can contain some HTML, including media (images, videos, etc.), typography, lists, and so forth. So that non-technical people can create nice-looking HTML, I use a Web-based WYSIWYG editor like FCKEditor or TinyMCE. Getting either to work within the Yii environment isn’t too hard, once you know what to do. But because assembling the disparate parts can be tricky, I outline the specific steps and requirements in this post. Note that the post does assume familiarity with Yii. Continue Reading…