Wiki articles

Showing 161-180 of 823 items.

Special $variables in CGridView and CListView

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

The popular [CListView] and [CGridView] widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

23 1
33 followers
Viewed: 78 789 times
Version: 1.1
Category: Tips

Update/delete model with CJuiDialog (works in CGridView)

Created 13 years ago by ifdattic, updated 13 years ago by ifdattic.

This tutorial will show you how to create Ajax dialog which allows to create new model, update or delete existing model. It works with simple links, CGridView button column links, adds a minimal amount of code and degrades gracefully with JavaScript turned off.

15 0
25 followers
Viewed: 78 563 times
Version: 1.1
Category: Tutorials
14 0
20 followers
Viewed: 78 534 times
Version: 1.1
Category: Tips

How to email error logs to developer on Yii2 apps

Created 4 years ago by Gabriel A. López López.

Logging is a very important feature of the application. It let's you know what is happening in every moment. By default, Yii2 basic and advanced application have just a \yii\log\FileTarget target configured.

2 0
4 followers
Viewed: 78 424 times
Version: 2.0
Category: How-tos
Tags: email, log

Use application on production/development environment without making changes

Created 13 years ago by ifdattic, updated 13 years ago by ifdattic.

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 78 408 times
Version: 1.1
Category: Tips

How to create nice modal login widget with a CJuiDialog

Created 14 years ago by Igor Ivanovic, updated 14 years ago by Maurizio Domba Cerin.

You have to extend the widget class and configure it for user login widget

6 0
30 followers
Viewed: 77 966 times
Version: 1.1
Category: Tutorials

Secure password hash storage and a Yii helper extension

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

This wiki has been replaced by Use crypt() for password storage.

13 0
13 followers
Viewed: 77 963 times
Version: 1.1
Category: Tutorials

Step by step for how to full export Yii2 grid to excel

Created 10 years ago by Scott_Huang, updated 10 years ago by Scott_Huang.

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

1 0
5 followers
Viewed: 77 676 times
Version: 2.0
Category: Tips

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

Change default date format in Oracle

Created 5 years ago by lenovo, updated 5 years ago by samdark.

Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.

0 0
2 followers
Viewed: 77 075 times
Version: 2.0
Category: How-tos
Tags: database

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

How to log changes of ActiveRecords?

Created 16 years ago by pfth, updated 13 years ago by Yang He.

A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a [CActiveRecord] Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecor...

31 1
47 followers
Viewed: 76 509 times
Version: 1.1
Category: Tutorials
Tags: Logging

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

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

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

This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Intro

17 0
41 followers
Viewed: 76 288 times
Version: 1.1
Category: Tutorials

Introducción al control de acceso basado en roles (RBAC)

Created 14 years ago by Juan Calvo, updated 14 years ago by Juan Calvo.

Todos los que hemos empezado a utilizar Yii para crear aplicaciones Web, nos hemos dado de bruces cuando hemos intentado poner a funcionar el RBAC (acceso de control basado en roles).

15 1
9 followers
Viewed: 75 958 times
Version: 1.1
Category: Tutorials

Integrating Yii with Wordpress

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

Well I finally had some time and tinkered a bit with the notion of integrating wordpress and Yii. Now for me I wanted to use Yii as a framework to develop wordpress plugins. Using some tips from imasia Article I was able to do a simple integration of yii as a wordpress plugin. The integratio...

9 1
13 followers
Viewed: 75 810 times
Version: 1.1
Category: Tips

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

using multiple radio button

Created 13 years ago by francis ja, updated 10 years ago by Rohit Suthar.

When we use multiple radio buttons with same name in Yii many people have the problem on getting the value of the selected radiobutton. The radioButtonList can be used for that, but if we need to use radioButton itself to place the button any where in a view, we need to include one more parameter in htmloption array().

6 0
13 followers
Viewed: 75 492 times
Version: 1.1
Category: Tips

Display an AJAX tree from your DB using CTreeView

Created 15 years ago by François Gannaz, updated 13 years ago by François Gannaz.

This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).

19 0
21 followers
Viewed: 75 230 times
Version: 1.1
Category: Tutorials

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