Wiki articles in category How-tos

Showing 41-60 of 292 items.

Integrating Wordpress and Yii: yet another approach

Created 14 years ago by goncin, updated 14 years ago by goncin.
6 2
11 followers
Viewed: 77 405 times
Version: 1.1
Category: How-tos

How to write a simple application component

Created 14 years ago by zaccaria, updated 14 years ago by zaccaria.

An application component is a confortable way for share information among all component of the application

15 7
14 followers
Viewed: 76 854 times
Version: 1.1
Category: How-tos

Displaying image in a CGridView column.

Created 13 years ago by sirin k, updated 8 years ago by Maurizio Domba Cerin.

This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.

9 1
14 followers
Viewed: 76 291 times
Version: 1.1
Category: How-tos

Using standard filters in CGridView custom fields

Created 14 years ago by GOsha, updated 14 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: 75 499 times
Version: 1.1
Category: How-tos

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

Created 11 years ago by Selvakumar Kaliyappan, updated 11 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: 74 629 times
Version: 1.1
Category: How-tos

How to use single form to collect data for two or more models (CActiveForm and Ajax Validation edition)

Created 13 years ago by RusAlex, updated 13 years ago by Darwin Wen.

With Yii you can use one CActiveForm for collecting data for two or more models with ajax validation and client validation.

16 0
33 followers
Viewed: 74 587 times
Version: 1.1
Category: How-tos

CKEditor Integration (includes steps for file uploads) - Step by Step

Created 12 years ago by shulme, updated 12 years ago by shulme.

Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:

10 0
22 followers
Viewed: 73 712 times
Version: 1.1
Category: How-tos

How to hide index.php on Microsoft Windows Server with IIS7

Created 12 years ago by Giuliano, updated 12 years ago by Giuliano.

I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.

6 0
6 followers
Viewed: 71 523 times
Version: 1.1
Category: How-tos

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 16 years ago by mindeh, updated 9 years ago by Boaz.

Original source code and idea are from: PHP, PDO & Nested Transactions.

41 0
26 followers
Viewed: 69 793 times
Version: 1.1
Category: How-tos

Create custom button button with AJAX function in CGridView

Created 12 years ago by nkd, updated 12 years ago by nkd.

This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.

5 0
15 followers
Viewed: 68 833 times
Version: 1.1
Category: How-tos

How To : Create Forgot Password in Yii (Sending Email to Reset Password)

Created 10 years ago by ruderbytes, updated 9 years ago by ruderbytes.

Assalamualaikum wr.wb Hello yii people i'm Muhammad Fahmi Azain this is tutorial about forgot password in yii framework, and i'm sorry if it does not comply with code standards yii. okay let's begin

0 0
2 followers
Viewed: 68 469 times
Version: 1.1
Category: How-tos

How to avoid multiple Ajax Request

Created 14 years ago by nickcv, updated 14 years ago by nickcv.

CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs...

17 0
27 followers
Viewed: 67 754 times
Version: 1.1
Category: How-tos

Moving project code outside of webroot (plus multiple project support)

Created 14 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 67 005 times
Version: 1.1
Category: How-tos

Single sign on across multiple subdomains

Created 14 years ago by ianaré, updated 14 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: 66 400 times
Version: 1.1
Category: How-tos

Sort and filter a custom or composite CGridView column - that may even contain data from different tables.

Created 11 years ago by Gerhard Liebenberg, updated 9 years ago by Gerhard Liebenberg.

I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.

6 0
6 followers
Viewed: 66 057 times
Version: 1.1
Category: How-tos

Real-time display of server push data using Server-Sent Events (SSE)

Created 13 years ago by bennouna, updated 11 years ago by bennouna.

Let's say you have an internal messaging system in your webapp, and you want to display messages dynamically and real-time to the relevant recipients.

9 0
17 followers
Viewed: 65 477 times
Version: 1.1
Category: How-tos

Using CJuiDatePicker for CGridView filter

Created 13 years ago by softark, updated 11 years ago by Kostas Apazidis (KonApaz).

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 65 353 times
Version: 1.1
Category: How-tos

Create sitemap.xml file dynamically on root folder with one hit

Created 12 years ago by kiran sharma, updated 12 years ago by kiran sharma.

I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.

2 1
9 followers
Viewed: 65 226 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML

Open bootstrap modal and load content via Ajax

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

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

1 0
2 followers
Viewed: 63 588 times
Version: 1.1
Category: How-tos

How to use a Widget as an Action Provider

Created 14 years ago by Antonio Ramirez, updated 9 years ago by stinkytofu.

All done, now we can call all the actionProvider actions as controllerID/actionPrefix.actionID. Here is the example:

24 0
41 followers
Viewed: 62 803 times
Version: 1.1
Category: How-tos