Wiki articles in category How-tos

Showing 21-40 of 72 items.

Managing a star rating with the StarRating widget in Yii 2

Created 6 years ago by Kartik V, updated 6 years ago by Kartik V.

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 17 659 times
Version: 2.0
Category: How-tos

Displaying uploaded file from DB for update with FileInput widget

Created 6 years ago by Kartik V, updated 6 years ago by Kartik V.

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

1 3
42 followers
Viewed: 49 352 times
Version: 2.0
Category: How-tos

`forceCopy` per Asset Bundle

Created 5 years ago by schmunk, updated 5 years ago by schmunk.

During development and depending on your setup you may need to use the options forceCopy or linkAssets of the asset manager to work around possible file-system and permission issues.

1 0
1 follower
Viewed: 8 783 times
Version: 2.0
Category: How-tos

Load data from internal/external source to fill form fields

Created 5 years ago by skworden, updated 5 years ago by skworden.

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 24 791 times
Version: 2.0
Category: How-tos

How to make UrlManager createAbsoluteUrl work with sub-domains

Created 3 years ago by Wade Shuler, updated 2 years ago by CeBe.

Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.

1 0
3 followers
Viewed: 24 306 times
Version: 2.0
Category: How-tos

Using the yii2-datecontrol extension along with yii2-detail-view widget

Created 6 years ago by Kartik V, updated 6 years ago by Kartik V.

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 15 846 times
Version: 2.0
Category: How-tos

An alternative way to ElasticSearch

Created a year ago by Necip, updated a year ago by Necip.

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 9 893 times
Version: all
Category: How-tos

Events registration examples

Created a year ago by minitia, updated a year ago by minitia.

Register an event handler at Object-Level

1 0
2 followers
Viewed: 38 142 times
Version: 2.0
Category: How-tos
Tags: events, yii2

Remove Byte Order Mark (BOM) from files recursively

Created 6 years ago by Kostas Apazidis (KonApaz), updated a year ago by samdark.

The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.

2 1
7 followers
Viewed: 26 125 times
Version: all
Category: How-tos

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 6 years ago by Kartik V, updated 2 years ago by CeBe.

An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.

4 2
39 followers
Viewed: 45 367 times
Version: 2.0
Category: How-tos
2 0
3 followers
Viewed: 24 506 times
Version: 2.0
Category: How-tos

A Single Page with a List and a Detail

Created 3 years ago by softark, updated 3 years ago by Patrick Jones.

The CRUD generator of Gii has done a wonderful job for you, and you already have a list of items in the "index" page and a detailed view of a specified item in the "view" page.

2 0
3 followers
Viewed: 21 876 times
Version: 2.0
Category: How-tos

How to get SEO friendly URL using Model and new getUrl() function

Created 2 years ago by shiv, updated 2 years ago by shiv.

We all need SEO friendly URLs for our projects. its not always good to call route with params so we can generalise it for all models using a common function.

2 0
1 follower
Viewed: 18 791 times
Version: 2.0
Category: How-tos

How to use BootstrapInterface

Created 6 years ago by Antonio Ramirez, updated 6 years ago by Antonio Ramirez.

Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...

2 0
3 followers
Viewed: 14 630 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

Created 6 years ago by robregonm, updated 6 years ago by robregonm.
2 0
2 followers
Viewed: 19 395 times
Version: 2.0
Category: How-tos

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

Created 5 years ago by Antonio Ramirez, updated 5 years ago by Antonio Ramirez.

It is quite simple, but I am sure this small tutorial will help more than one of you out there :)

2 0
4 followers
Viewed: 20 446 times
Version: 2.0
Category: How-tos

Escape from Default's Yii2 Delete Confirm Box

Created 6 years ago by Antonio Ramirez, updated 4 years ago by Cozumel.

If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

4 1
16 followers
Viewed: 36 554 times
Version: 2.0
Category: How-tos

Creating a Dependent Dropdown From Scratch in Yii2

Created 5 years ago by ThePr0f3550r, updated 2 years ago by alrazi.

I have read http://www.yiiframework.com/wiki/24/creating-a-dependent-dropdown/ (Dependen Dropdown Yii1), but I can't implement it in Yii2 because Yii2 does not have built-in AJAX functionality hem.. I searched about it and came across this post

4 1
11 followers
Viewed: 112 729 times
Version: 2.0
Category: How-tos

[Guide] How to actually separate Frontend (User) and Backend (Admin) on Yii2 Advanced

Created 5 years ago by Wade Shuler, updated 5 years ago by samdark.

I am writing this guide because I struggled to find a resource that included ALL of the necessary steps to completely separate the frontend from the backend. After reading guides like Configuring different sessions for backend and frontend in yii-advanced-app and [yii2 configuring d...

5 1
17 followers
Viewed: 89 785 times
Version: 2.0
Category: How-tos

Simple revealing and hiding the password in the password field

Created 4 years ago by Bizley, updated 4 years ago by Bizley.

There are numerous usability problems:

3 0
4 followers
Viewed: 17 321 times
Version: 2.0
Category: How-tos