protected $_viewFile
protected $_viewFile
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.
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.
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...
In this wiki I will show how could logout from all other sessions or all other places.
I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.
In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.
Ok, it is a little bit difficult to full understanding the unsafe validator.
create a class file under protected\components named RActiveRecord.php
Do you want to make a listbox or dropdownlist to select one or more categories or sub categories ?
I recently built a tarpit for bad bots.
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options.
The main code was contributed by zaccaria in the forum (see [this post](...
You can find the reason why I wrote this article here.
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.
Its very common now-a-days to have Mobile app for web apps. For Mobile apps we need web APIs to fetch data or even post/update on web. We found a very simple method to make such interface. Mobile App can call plain get or post request and receive data back in JSON format. JSON is relatively easy for mobile app to handle while plain standard GET/POST request for easy for Web server to handle. This...
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch
having 0 or 1 values.
After that we want a user to see on
or off
instead 1 or 0.
So we do the usual thing:
<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
'name'=>'...
First things first,follow the instructions in fr0d0z's article to set up WordPress.Regarding the WpController,I did not use an index view.So the code for WpController is
class WpController extends Controller
{
public function init()
{
// note that we disable the layout
$this->layout = false;
parent::init();
}
In doing internet searches trying to learn how to incorporated ajax into web pages generated by the yii framework I noticed that there seems to be a lot of confusion. I worry that too-clever hacks will be broken in upgrades of the framework.