Articles in category "how-tos", sorted by viewsX
Displaying 211-220 of 355 result(s).

How to "masquerade" a non-required form element as 'required' one (in the view only)

Created 5 years ago by BoazHow-tos2 comments – viewed 16,677 times – ( +7 / -2 ) – version 1.1
In a nutshell, the task at hand is to mark (or render) a model attribute in the typical "_form.php" view file with the 'required' red asterisk while this attribute is not marked as required in the model's rule() method. If you're interested only in the solution, jump ahead to the 'solution' section below.

Book Has Author - Many to Many relations using Kartik\Select2

Created 3 years ago by thiagoc7How-tos2 comments – viewed 16,643 times – ( +4 / -1 ) – version 2.0
I could make this work following same useful tips from this post.

Using Google Maps in Yii Applications via Jquery

Created 4 years ago by bluyellHow-tos2 comments – viewed 16,598 times – ( +3 / -2 ) – version 1.1

YouTube API v2.0 – Browser-based Uploading

Created 5 years ago by VaibhavHow-tos1 comment – viewed 16,580 times – ( +6 / -1 ) – version 1.1
Through the YouTube API you can upload files directly to the Youtube server. Youtube currently offers two services 1. Direct Link 2. Browser Based Uploading. In this wiki I will demonstrate how you can quickly set Browser Based Uploading for your Yii application. This is the protocol request that takes place.

How to use yii2-authclient to communicate with Twitter using Single Access Token

Created 3 years ago by Antonio RamirezHow-tos2 comments – viewed 16,571 times – ( +4 / -1 ) – version 2.0
This tutorial is not about allowing users to sign into your application by using any of the OAuth providers available with the official yii2-authclient extension, it is about how to interact with your Twitter account, the one you set for your Yii2 app to promote your site, using the Single Access Token technique.

Use minified version of JqueryAsset, BootstrapAsset (and all default assets)

Created 3 years ago by robregonmHow-tos2 comments – viewed 16,540 times – ( +11 / -2 ) – version 2.0
By default, Yii 2.0 chooses to use the non-minified version of Jquery and Bootstrap files (CSS and JS). However, there's a simple way to indicate Yii to use the minified version.

How to create yii2 extension and push to github and register into packagist to allow end user install from composer

Created 2 years ago by Scott_HuangHow-tos1 comment – viewed 16,420 times – ( +5 / -1 ) – version 2.0
1. Create Extension in yii2.

Update related models of a model using listBox and checkBoxList in the form

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 16,222 times – ( +2 / -1 ) – version 1.1
Suppose you want to have a list in Category with its related products and you want to updates the list (removing or insert product items) This wiki show us how to do that

Using SQLite and CDbMessageSource as a module

Created 5 years ago by pheadeauxHow-tos5 comments – viewed 16,059 times – ( +5 / -1 ) – version 1.1
There are scenarios when you work with DVCS (like Mercurial or Git) and CDbMessageSource. To my experience keeping the development database and production database in sync can be very time consuming. Plus, when working in a team, you never know when the database was updated.

How to use bizRules in standard accessControl filter

Created 4 years ago by Maciej LiżewskiHow-tos8 comments – viewed 15,863 times – ( +3 / -1 ) – version 1.1
I assume you are familiar with accessControl standard filter. It allows you to separate privileges to run some action from action code itself. There is however one problem with most common usage - you cannot use bizRules, at least based on some parameters passed to 'checkAccess' just because it is hard to pass them in accessRules() result.