CMenu comes with a lot of great customization options built in but sometimes you need it to do more.
CMenu comes with a lot of great customization options built in but sometimes you need it to do more.
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();
}
This article intends to summarize the steps taken to set up PHPUnit and Selenium for a Yii project, with IntelliJ IDEA Ultimate (the IDE). It was done on Mac OS X 10.6.
In this article you'll learn how to send additional form data when uploading files using XUpload widget
I normally create a files
folder and I allocate it within my www
one, that is where I keep my css, js, images files. So, even though you can place it where ever you wish and for the sake of the example, I will use the files
folder name.
A big problem I've hit with the Yii-Bootstrap extension is that all AJAX requests are initializing Bootstrap because of preload. This is a huge waste of resources, especially when using AJAX-based file uploaders that split the file into chunks. Large file uploads using that method could be initializing bootstrap hundreds of times.
After Installing Yii Users and Rights to Newly Created Yii app we have to assign dynamic roles to a user at the time of user creation .
require_once 'Mail.php'; // PEAR Mail require_once 'Mail/mime.php'; // PEAR Mail_mime require_once 'Mail/Queue.php'; // PEAR Mail_queue require_once 'Mail/Queue/Container/mdb2.php'; // PEAR Mail_queue mdb2
Step1: Download the extension from path 'http://code.google.com/p/yii-mail/downloads/list' .
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'user-grid',
'dat...
The nested set behaviour is an approach to store hierarchical data in relational databases. For example, if we have many categories for our product or items. One category can be a "parent" for other categories, means that one category consists of more than one category. The model can be drawn using a "tree" model. There are other approaches available but what we will learn in this article is speci...
Let's see what exactly are the events in Yii!
Welcome, all of you !
Add these lines in /config/main.php
'components'=>array(
.........
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database1',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'itsasecret',
'charset' => 'utf8',
),
'db2'=>array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=databa...
The sql 'set time_zone' ensures that all dates retrieved are in UTC time. If your MySql server has the time zone names installed then use 'UTC' instead of '+00:00'.
Copy the code at the end of this wiki for LocalTime.php and DefaultDateTimeParser.php int...
Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.
We will use Symfony 2 components for writing tests for Yii project, it's gonna be fun :).
\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all
emails sent trough this mailer will be saved (by default) on @runtime/mail
instead of being sent, allowing the devs to inspect thre result.