Create a folder where to place an Yii app under wordpress folder (mine is "yii')
Create a folder where to place an Yii app under wordpress folder (mine is "yii')
Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:
When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".
Hi, I was having problems each time I had to test the site or edit something on my local machine, like changing the db connection, change the debug mode to false, the trace level to 0, disable Gii, etc. So I created a class to resolve all my problems, hope to help you in your projects!
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest
class wraps various $_SERVER
variables to break down the URL into its constituent parts.
At first, create a class named SmartyRenderer under application/components or any directory you want.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataprovider,
'id'=>'recipient_table',
'selectionChanged'=>'updateEditForm',
'columns' => array(
'rec_id',
'org.nachname',
'org.vorname',
'org_id',
array(
'class'=>'CButtonColumn',
'template'=>'{...
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.
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
The two most commonly-used base classes in most Yii applications are CController
and CActiveRecord
, each extended to your own particular models and controllers.
Gii provides us normally with the following code on the 'actionCreate':
public function actionCreate()
{
$model=new ModelName;
I can see many questions regarding configuring the path using Windows OS. I could hardly get the right information about it. The cook book has defined for Linux. So I would like to share my idea on it. To configure the Yii path using Windows OS,
Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :
public function scopeUnused( $useAnd = true )
{
$join = " left outer join composed_by j on t.ID = j.ID ";
$condition = ' j.ID Is Null';
We often need to display a success page after the user has submitted a form without problem. We may show some welcome message after a user registers a new account. There are many ways to implement this workflow. In this article, I will explain a method that exploits flash messages.
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.
Um aspecto do design da interface de usuário tem a ver com a coerência do design e da utilização das cores entre os diferentes componentes da interface do usuário utilizada.
Un aspecto del diseño de interfaces de usuario tiene que ver con la coherencia del diseño y uso de colores entre los distintos componentes de interfaz de usuario utilizados.
One aspect of User Interface Design has to do with the coherence of the design and the use of the colors between the different User Interface Components used.