Wiki

Sorted by ratingX
Displaying 81-90 of 685 result(s).

Use crypt() for password storage

Created about a year ago by fsbTutorials16 comments – viewed 54,486 times – ( +24 ) – version 1.1
Update: This wiki has been rewritten to be in line with Yii 1.1.14. Since many of the detailed complexities are now handled by Yii, the article focuses on how the crypt() built-in function works and why it's important to use it correctly.

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

Created 3 months ago by Kartik VHow-tos4 comments – viewed 2,934 times – ( +24 ) – 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.

Managing different Bootstrap form layouts with yii2-field-range extension.

Created 2 months ago by Kartik VHow-tos0 comments – viewed 2,070 times – ( +24 ) – version 2.0
This wiki will explain how you can use the Field range extension with multiple Bootstrap form layouts (vertical or horizontal). You maybe aware, that the yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

How to upload a file using a model

Created 5 years ago by qiangTutorials26 comments – viewed 303,523 times – ( +83 / -6 ) – version 1.1
First declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension name.
tags: File upload

Setting and maintaining the language in Application (i18n)

Created 5 years ago by olafureTutorials11 comments – viewed 74,943 times – ( +23 ) – version 1.1
As seen in this post, Yii doesn't enforce how language is set and maintained within the session.
tags: i18n, translation

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos16 comments – viewed 32,057 times – ( +23 ) – version 1.1
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

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

Created about a year ago by shulmeHow-tos10 comments – viewed 29,771 times – ( +23 ) – 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:

Impersonate Users within Yii Framework

Created 3 years ago by WoilTutorials5 comments – viewed 12,286 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

PHPStorm & NetBeans autocomplete problem

Created about a year ago by StagelineTips1 comment – viewed 7,521 times – ( +22 ) – version 1.1
The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

Creating a parameterized LIKE query

Created 3 years ago by Steve FriedlFAQs6 comments – viewed 48,586 times – ( +22 ) – version 1.1
It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column