Many time for SEO porpouses is important that each page will have a unique address.
Many time for SEO porpouses is important that each page will have a unique address.
How many of us wonder how we can upgrade the website without hurting the operation of our WebApp?
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 forcing login for all pages and users must be logged in to access almost all of the site’s content.
in Yii versions previous to 1.1.9 exceptions was handled differently during ajax request and displayed by CApplication::displayException(). This way the exception message displayed on ajax requests could not be customized.
The message for the CGridView delete request with YII_DEBUG set to true l...
In this wiki I will show how could logout from all other sessions or all other places.
Sometimes you need to force a user to change their password after x number of days. This article describes how to implement this using a filter, ChangePasswordFilter.
The basic idea is to create a complete mail message and store it a Db table along with all info necessary for sending valid emails (to_email, from_email, from_name, subject etc.)
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.
En ciertas ocasiones tenemos que lidiar con el tema de colocar una lista de checkboxes para hacer una seleccion especifica como es el caso de los dias de la semana para un calendario, para esta labor tenemos el comando CHtml::checkBoxList(), revisando un poco el funcionamiento de este temos los siguientes parametros:
Validators extending from [CValidator] all have a property named [message|CValidator::message]. You can set this property in the corresponding validation rule to customize the error message. For example, the following validation rule uses an error message that is different from the default one:
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.
Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.
The Yii documentation states:
/*
Get class constants by token.
If you set constants with same prefix, like:
MY_STATUS_1
MY_STATUS_2
MY_STATUS_3
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 ?
When you need to integrate with other frameworks (e.g. Zend Framework), you have to follow these steps:
I recently built a tarpit for bad bots.