Wiki articles in category How-tos

Showing 41-60 of 292 items.

CJuiDatePicker extended for more/better language support

Created 4 years ago by le_top, updated 4 years ago by le_top.

The number of languages supported by the standard CJuiDatePicker implementation is limited and the language code to use is different from the application's language code. This Wiki shows how to improve on that.

1 0
1 follower
Viewed: 8 232 times
Version: 1.1
Category: How-tos

MailGun Api Wrapper to send emails

Created 4 years ago by VINAY Kr. SHARMA, updated 4 years ago by VINAY Kr. SHARMA.

MailGun.php Class

1 0
1 follower
Viewed: 7 267 times
Version: 1.1
Category: How-tos
Tags: email, mailgun

Relation scope to test existence of related records ("EXISTS")

Created 4 years ago by le_top, updated 4 years ago by le_top.

When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.

1 0
2 followers
Viewed: 9 466 times
Version: 1.1
Category: How-tos

Tarpit for bad bots

Created 7 years ago by mithereal, updated 7 years ago by mithereal.

I recently built a tarpit for bad bots.

1 0
9 followers
Viewed: 8 523 times
Version: 1.1
Category: How-tos
Tags: bots, tarpit

How to install pdo_oci

Created 9 years ago by gallego123, updated 8 years ago by gallego123.

From: http://lacot.org/ and me.

1 0
3 followers
Viewed: 32 635 times
Version: 1.1
Category: How-tos

Update a part of content using AJAX when select a GridView row

Created 6 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by CeBe.

Suppose you want to refresh a form or any content when a single row of CGridView is selected

1 0
9 followers
Viewed: 27 189 times
Version: 1.1
Category: How-tos

Alternative wildcard characters CDbCriteria

Created 7 years ago by maigret, updated 7 years ago by maigret.

In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $...

1 0
2 followers
Viewed: 9 833 times
Version: 1.1
Category: How-tos

How to create Module based Login

Created 5 years ago by Ibrar Turi, updated 5 years ago by CeBe.

Lets say we have 3 modules (customer, user, admin) in an application and we need, separate logins for each module.

1 0
7 followers
Viewed: 16 976 times
Version: 1.1
Category: How-tos

How to apply a layout to an AJAX update

Created 5 years ago by trond, updated 5 years ago by CeBe.
  1. The Main template holds the header, main navigation and footer
  2. One or more layout files holds the column setup, sub navigation etc.
  3. The view files hold the actual page content.
1 0
4 followers
Viewed: 11 842 times
Version: 1.1
Category: How-tos
Tags: AJAX, views

Upload image and content using AJAX and Store it in different table

Created 5 years ago by Selvakumar Kaliyappan, updated 5 years ago by CeBe.

var formData = new FormData($("#post-form")[0]);
$.ajax({
    url: '<?php echo Yii::app()->createUrl("forumPost/uploadPost"); ?>',
    type: 'POST',
    data: formData,
    datatype:'json',
    // as...
1 0
5 followers
Viewed: 62 172 times
Version: 1.1
Category: How-tos

Configuring Yii to run on both Windows and OSX

Created 5 years ago by trond, updated 5 years ago by CeBe.

If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:

1 0
4 followers
Viewed: 8 825 times
Version: 1.1
Category: How-tos
Tags: config

Entire Messages into javascript object

Created 7 years ago by markux, updated 7 years ago by markux.

I needed all messages with their translation into javascript. This is my solution:

1 0
3 followers
Viewed: 8 054 times
Version: 1.1
Category: How-tos

Increasing AR performance in connections with Oracle

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

Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.

1 0
15 followers
Viewed: 33 960 times
Version: 1.1
Category: How-tos

Attaching multiple event handlers to onBeginRequest

Created 5 years ago by Boaz, updated 5 years ago by CeBe.

There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

1 0
2 followers
Viewed: 11 171 times
Version: 1.1
Category: How-tos

Simple example for language translation

Created 5 years ago by RKA, updated 5 years ago by CeBe.

Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.

1 0
5 followers
Viewed: 28 892 times
Version: 1.1
Category: How-tos
Tags: i18n, Yii

Safely checking if a model class exists (without exploding)

Created 5 years ago by Boaz, updated 5 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 11 644 times
Version: 1.1
Category: How-tos

How to avoid a database update if the ActiveRecord was not modified

Created 5 years ago by tomvdp, updated 5 years ago by tomvdp.

The classic Yii way for doing an update action is as follows:

1 0
3 followers
Viewed: 17 448 times
Version: 1.1
Category: How-tos

Advanced CGridview issues - custom button using php and html

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)

1 0
2 followers
Viewed: 10 334 times
Version: 1.1
Category: How-tos

Open bootstrap modal and load content via Ajax

Created 5 years ago by JbalTero, updated 5 years ago by JbalTero.

My goal here is to Open bootstrap modal and load ANY content using ajax response.

1 0
2 followers
Viewed: 53 792 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: 24 122 times
Version: 1.1
Category: How-tos