Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 31-40 of 353 result(s).

Save and Display Date/Time Fields in different formats in Yii2

Created 2 years ago by Kartik VHow-tos12 comments – viewed 77,204 times – ( +39 ) – version 2.0
You would find having such a need in most Yii Projects. Your database needs a specific format to store date fields, while you may want to display it in different formats to the users on forms and other views.

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

Created 3 years ago by shulmeHow-tos12 comments – viewed 53,132 times – ( +26 ) – 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 show ajax delete status in CGridView like flash messages

Created 5 years ago by hasanaviHow-tos12 comments – viewed 43,679 times – ( +25 ) – version 1.1
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())

Creating and updating model and its related models in one form, inc. image

Created 3 years ago by BoazHow-tos11 comments – viewed 81,821 times – ( +6 / -3 ) – version 1.1
We start slowly and simple...

Displaying, Sorting and Filtering Model Relations on a GridView

Created 2 years ago by Antonio RamirezHow-tos11 comments – viewed 92,807 times – ( +40 / -1 ) – version 2.0
One of the things you will find tricky to implement is the the sorting and filtering of a GridView's column that displays related model data.

jQuery UI Datepicker

Created 3 years ago by softarkHow-tos11 comments – viewed 72,021 times – ( +13 ) – version 1.1
We all love the convenient gadget, namely jQuery UI Datepicker as an input element for date. Yii supports it as CJuiDatePicker. Let's see how to use it.

How to set up Unicode

Created 7 years ago by MikeHow-tos10 comments – viewed 87,858 times – ( +19 ) – version 1.1
To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.
tags: i18n, unicode

Model password confirmation field.

Created 4 years ago by twisted1919How-tos10 comments – viewed 67,587 times – ( +11 / -1 ) – version 1.1
I had some troubles with the password confirmation field for when adding updating user records, so i thought that i should share the way i got it working.

Getting the Most out of APC for Yii

Created 4 years ago by Da:SourcererHow-tos10 comments – viewed 35,906 times – ( +17 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

How to implement cron in Yii 2

Created 2 years ago by hemcHow-tos10 comments – viewed 38,343 times – ( +10 ) – 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