Wiki articles

Showing 61-80 of 650 items.

Run an Yii Application inside an Wordpress page

Created 8 years ago by Paul Apostol, updated 8 years ago by Paul Apostol.

Create a folder where to place an Yii app under wordpress folder (mine is "yii')

12 0
14 followers
Viewed: 32 161 times
Version: 1.1
Category: How-tos

Preventing CJuiTabs from hiding drop-down CMenu items

Created 8 years ago by Steve Friedl, updated 8 years ago by RusAlex.

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.

4 0
3 followers
Viewed: 12 363 times
Version: 1.1
Category: Tips

Functional tests independing from your urlManager settings

Created 8 years ago by RusAlex, updated 8 years ago by RusAlex.

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:

0 0
4 followers
Viewed: 10 669 times
Version: 1.1
Category: Tips

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 8 years ago by a110y, updated 8 years ago by samdark.

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:

2 0
2 followers
Viewed: 19 907 times
Version: 1.1
Category: Tips

Impersonate Users within Yii Framework

Created 8 years ago by Woil, updated 8 years ago by Woil.

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".

20 0
21 followers
Viewed: 20 417 times
Version: 1.1
Category: Tutorials

Use different environments (development, production, etc) in your app with EASY Environment Class

Created 9 years ago by nancoder, updated 8 years ago by marcovtwout.

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!

7 0
7 followers
Viewed: 50 813 times
Version: 1.1
Category: Tutorials
Tags:

URL component access functions

Created 8 years ago by Steve Friedl, updated 8 years ago by Steve Friedl.

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.

28 0
16 followers
Viewed: 15 590 times
Version: 1.1
Category: Tips
Tags: request, URL

How to use Smarty renderer in Yii

Created 8 years ago by dongbeta, updated 8 years ago by dongbeta.

At first, create a class named SmartyRenderer under application/components or any directory you want.

3 0
7 followers
Viewed: 21 240 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 8 years ago by PinkBrainPlan, updated 8 years ago by PinkBrainPlan.

<?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'=>'{...
1 0
10 followers
Viewed: 23 678 times
Version: 1.1
Category: How-tos

Updating fields on a form with Ajax and Json

Created 8 years ago by Russell England, updated 8 years ago by Russell England.

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.

10 0
22 followers
Viewed: 62 216 times
Version: 1.1
Category: How-tos

caching controllers with filters()

Created 8 years ago by RusAlex, updated 8 years ago by Maurizio Domba Cerin.

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

2 0
8 followers
Viewed: 14 884 times
Version: 1.1
Category: How-tos

Extending common classes to allow better customization

Created 8 years ago by Steve Friedl, updated 8 years ago by Steve Friedl.

The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

36 0
19 followers
Viewed: 33 872 times
Version: 1.1
Category: Tips
Tags:

Actions code reuse with CAction

Created 8 years ago by Antonio Ramirez, updated 8 years ago by Antonio Ramirez.

Gii provides us normally with the following code on the 'actionCreate':

public function actionCreate()
{
   $model=new ModelName;

33 0
19 followers
Viewed: 47 783 times
Version: 1.1
Category: How-tos

To configure Yii path in Windows platform

Created 8 years ago by Coda, updated 8 years ago by Coda.

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,

0 6
4 followers
Viewed: 44 202 times
Version: 1.1
Category: Tutorials

Named scope - Get orphan AR without losing primary key

Created 8 years ago by cma, updated 8 years ago by Steve Friedl.

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';

0 0
2 followers
Viewed: 7 292 times
Version: 1.1
Category: Tutorials
Tags:

An easy way to display a success page using flash messages

Created 8 years ago by qiang, updated 8 years ago by qiang.

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.

21 0
29 followers
Viewed: 46 872 times
Version: 1.1
Category: Tips

An easy way to use escopes and CActiveDataProvider

Created 8 years ago by Rafael Garcia, updated 8 years ago by Rafael Garcia.

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.

1 1
10 followers
Viewed: 32 972 times
Version: 1.1
Category: Tips

Ativando temas no Zii Widgets

Created 8 years ago by Ivan Wilhelm, updated 8 years ago by Ivan Wilhelm.

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.

4 2
4 followers
Viewed: 10 660 times
Version: 1.1
Category: Tutorials

Cambiando el diseño de JuiWidgets

Created 8 years ago by Luis Lobo Borobia, updated 8 years ago by Ivan Wilhelm.

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.

0 0
4 followers
Viewed: 13 003 times
Version: 1.1
Category: Tutorials
Tags:

Theming your Zii Widgets

Created 8 years ago by Luis Lobo Borobia, updated 8 years ago by Ivan Wilhelm.

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.

17 0
32 followers
Viewed: 56 642 times
Version: 1.1
Category: Tutorials