I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was
My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.
CSRF is the acronymn for Cross-site request forgery.
It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.
I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular [bootstrap extension](http://ww...
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.
Let's take the example of the above article to display an email button next to a delete button:
Suppose a hacker has an account of your website He could set the PHPSESSID to empty After of that He login in your system The PHPSESSID remains blank and user has already logged with this session
The Yii Framework is very powerful and it provides a lot of functionality right from the pre-built webapp. One of the nice things that is already established for you as a developer is the Login authentication. While the default configuration simply sets it up to run against an array of hard coded usernames and passwords, the [Yii Blog Tutorial](http://www.yiiframework.com/doc/blog/1.1/en/prototype...
This is the code in the View.
<?php echo CHtml::link('MyDialog', Yii::app()->createUrl('site/page'), array('class' => 'openDlg divDialog')); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'divDialog',
'options'=>array( 'title'=>Yii::t('Dialog Title', 'autoOpen'=>false, 'modal'=>true, 'width'=>600)));
?>
<div class="divForForm"></div>
<?php
$this->endWidget(...
If you are about to create a graph, the best option i would suggest is the jqbargraph.
If you have two datepicker in one form and you want that a date of from date shold be minimum date of todate then put following code in Cjuidatepicker widget options array:
'onSelect'=>'js:function(selected) {
$("#HostelRoomStatusMaster_room_status_master_end_date").datepicker("option","minDate",selected);
}',
This article shows a quick and easy way to implement flat user access control system. Flat means, that user access is controlled by level only, which is solution exactly opposite to complex RBAC access systems.
Hi Friends, This tutorial may be help us create the custom drop-down menu using CHtml::dropDownList
To accomplish the task of changing Migration table's name, by default tbl_migration, you need to add the following in your ./protected/config/console.php.
Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.
I guess this is a tip on how to execute some code before every action in a controller, because I will tell you how I did it and maybe you can use the idea in your project.
A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.