Wiki

Sorted by viewsX
Displaying 121-130 of 786 result(s).

How to use GridView with AJAX

Created 3 years ago by Antonio RamirezHow-tos6 comments – viewed 60,855 times – ( +14 / -1 ) – version 2.0
With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.
tags: yii2, pjax, widget

How to implement cron in Yii 2

Created 3 years ago by hemcHow-tos10 comments – viewed 60,152 times – ( +11 / -1 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console

Saving files to a blob field in the database

Created 7 years ago by zaccariaTips8 comments – viewed 59,690 times – ( +9 / -3 ) – version 1.1
As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.
tags: File upload

How to validate CSRF token with session

Created 6 years ago by yangmlsHow-tos3 comments – viewed 59,684 times – ( +23 / -1 ) – version 1.1
First of all, You must change component config to enable the default Yii CSRF validation.
tags: CSRF, session

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

Created 5 years ago by shulmeHow-tos12 comments – viewed 59,538 times – ( +26 / -1 ) – version 1.1
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:

How to write a simple application component

Created 6 years ago by zaccariaHow-tos5 comments – viewed 59,485 times – ( +20 / -8 ) – version 1.1
An application component is a confortable way for share information among all component of the application

Working with radiobutton list

Created 5 years ago by vibhaJadwaniTutorials3 comments – viewed 59,264 times – ( +10 / -1 ) – version 1.1
This is a tutorial to work with radioButtonList which will handle enum datatype. Form design and validation both are detailed here.

Custom Number Formatting or Decimal Separators and i18n

Created 5 years ago by c@cbaTutorials8 comments – viewed 59,233 times – ( +7 / -1 ) – version 1.1
By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

Module based login

Created 7 years ago by suriyansureshTutorials6 comments – viewed 59,126 times – ( +14 / -1 ) – version 1.1
If you want to add module based login to a site without using RBAC, please follow these guidelines.

Display an AJAX tree from your DB using CTreeView

Created 7 years ago by François GannazTutorials10 comments – viewed 58,964 times – ( +21 / -1 ) – version 1.1
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).
tags: AJAX, CTreeView