Wiki

Articles in category "how-tos", sorted by ratingX
Displaying 21-30 of 314 result(s).

How to use a Widget as an Action Provider

Created 3 years ago by Antonio RamirezHow-tos14 comments – viewed 31,635 times – ( +27 ) – version 1.1
As written on the API docs: An Action Provider Widget is a widget that has declared several actions by using its 'public static function actions()'. After, a Controller can easily import all its declared actions on its 'public function actions()'.
tags: Widgets, CAction

URL management for Websites with secure and nonsecure pages

Created 2 years ago by qiangHow-tos11 comments – viewed 20,093 times – ( +27 ) – version 1.1
In this article, I will describe how to manage URLs for a Website that has both secure and nonsecure content.
tags: URL

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

Created 5 months ago by Kartik VHow-tos10 comments – viewed 5,893 times – ( +27 ) – 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 4 months ago by Kartik VHow-tos0 comments – viewed 3,183 times – ( +27 ) – 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 use an application behavior to maintain runtime configuration

Created 3 years ago by zaccariaHow-tos3 comments – viewed 24,412 times – ( +27 ) – version 1.1
In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

Filter / Search with CListView

Created 3 years ago by JohnPollardHow-tos7 comments – viewed 31,517 times – ( +27 ) – version 1.1
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

X-Sendfile - serve large static files efficiently from web applications

Created 3 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 40,868 times – ( +26 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

Authenticating against phpass hashes with Yii

Created 3 years ago by Da:SourcererHow-tos18 comments – viewed 23,093 times – ( +26 ) – version 1.1
Note: This guide is outdated as of Yii v1.1.14 which introduced the CPasswordHelper class. Please use that instead.

Keeping a running total in a CGridView

Created 3 years ago by Steve FriedlHow-tos4 comments – viewed 22,735 times – ( +24 ) – version 1.1
This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!
tags: CGridView

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

Created about a year ago by shulmeHow-tos11 comments – viewed 32,538 times – ( +24 ) – 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: