Wiki articles in category How-tos

Showing 1-20 of 292 items.

Using the jamselect widget with min and max values

Created 8 years ago by got 2 doodle, updated 8 years ago by wei.

The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.

2 0
1 follower
Viewed: 13 551 times
Version: 1.1
Category: How-tos

Implementing cron jobs with Yii

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

There are two ways to run a cron job:

27 2
27 followers
Viewed: 94 933 times
Version: 1.1
Category: How-tos
Tags: cli, cron

Using recaptchlib in your projects

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

It is good when someone writes extensions for us but trust, sometimes we forget about other approaches that, if we know the library, we shouldn't forget.

5 0
4 followers
Viewed: 12 511 times
Version: 1.1
Category: How-tos

Using the jqueryslidemenu plugin with CMenu

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

Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.

18 1
8 followers
Viewed: 36 407 times
Version: 1.1
Category: How-tos

Using setFlash for displaying various kind of messages

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

In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.

4 4
6 followers
Viewed: 73 964 times
Version: 1.1
Category: How-tos

How to customize error handling in console-mode applications

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

One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor th...

3 0
4 followers
Viewed: 16 038 times
Version: 1.1
Category: How-tos

How to log and debug variables using CWebLogRoute

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

Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...

13 0
20 followers
Viewed: 70 317 times
Version: 1.1
Category: How-tos
Tags: Logging

Using standard filters in CGridView custom fields

Created 8 years ago by GOsha, updated 8 years ago by jwerner.

In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0.
So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 68 127 times
Version: 1.1
Category: How-tos

Setting and getting systemwide static parameters

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

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

10 0
12 followers
Viewed: 126 980 times
Version: 1.1
Category: How-tos
Tags: config

Mais segurança em suas aplicações com Yii e PHPIDS

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

PHPIDS é conhecido projeto que pode ser visto em php-ids.org.

2 1
3 followers
Viewed: 9 940 times
Version: 1.1
Category: How-tos

Enforcing "You must agree" requirements in forms

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

Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:

25 0
17 followers
Viewed: 28 134 times
Version: 1.1
Category: How-tos

More security in your applications with Yii and PHPIDS

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

PHPIDS is a well known project that can be found in php-ids.org.

6 0
14 followers
Viewed: 16 475 times
Version: 1.1
Category: How-tos

Single sign on across multiple subdomains

Created 8 years ago by ianaré, updated 8 years ago by ianaré.

This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

29 0
37 followers
Viewed: 53 801 times
Version: 1.1
Category: How-tos

Include Yii framework in a Joomla module

Created 8 years ago by zaccaria, updated 8 years ago by Anupam.

Delploying anything using joomla's framework is quite difficult. The framework don't provide a good MVC structure and the documentation is very poor.

8 2
17 followers
Viewed: 30 352 times
Version: 1.1
Category: How-tos

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 071 times
Version: 1.1
Category: How-tos

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 223 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 610 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 113 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 824 times
Version: 1.1
Category: How-tos

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 692 times
Version: 1.1
Category: How-tos