Wiki articles in category How-tos

Showing 1-20 of 68 items.

Profiling using XDebug

Created 6 years ago by le_top, updated 4 years ago by le_top.

A short explication on how to extract profile information for PHP on your server using XDebug and KCacheGrind or WinCacheGrind.

3 0
3 followers
Viewed: 14 843 times
Version: all
Category: How-tos

Integrating ZF2 into Yii - use case demonstrated

Created 6 years ago by Boaz, updated 5 years ago by Boaz.

I needed to use a class from ZF2 in my Yii project. I've read probably all there is about this subject and still I needed lots of trial & errors to get it working, probably due to my lack of experience working with namepsaces and ZF2 in general. Also, the resources on the web are all partial, at best. Most simply refer to ZF1 where things are technically different. When I got it all working I de...

4 0
6 followers
Viewed: 10 122 times
Version: 2.0
Category: How-tos

Remove Byte Order Mark (BOM) from files recursively

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 months 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: 23 932 times
Version: all
Category: How-tos

Automatic Parameter Binding to POST vars in Yii2

Created 5 years ago by aarondfrancis, updated 5 years ago by YiiJeka.

I wrote about this on my blog, but wanted to post it here too.

0 0
4 followers
Viewed: 18 387 times
Version: 2.0
Category: How-tos

Upload files in Yii2 with MongoDb and GridFs

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

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
5 followers
Viewed: 23 291 times
Version: 2.0
Category: How-tos

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 5 years ago by Kartik V, updated a year 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: 41 927 times
Version: 2.0
Category: How-tos

MongoDb's embedded documents mapping for ActiveRecord in Yii2

Created 5 years ago by edoardo849, updated 5 years ago by CeBe.

suppose to have in Mongo a collection "user" like:

3 0
6 followers
Viewed: 19 025 times
Version: 2.0
Category: How-tos

How to implement cron in Yii 2

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

In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.

3 0
13 followers
Viewed: 73 014 times
Version: 2.0
Category: How-tos
Tags: console, cron, yii2

How to use BootstrapInterface

Created 5 years ago by Antonio Ramirez, updated 5 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: 13 344 times
Version: 2.0
Category: How-tos

Displaying, Sorting and Filtering Model Relations on a GridView

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

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.

28 0
30 followers
Viewed: 244 530 times
Version: 2.0
Category: How-tos

Escape from Default's Yii2 Delete Confirm Box

Created 5 years ago by Antonio Ramirez, updated 3 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: 33 961 times
Version: 2.0
Category: How-tos

How to use GridView with AJAX

Created 5 years ago by Antonio Ramirez, updated a year ago by CeBe.

With the adoption of PJax on Yii2 things  have change quite a bit with GridView when it comes to work with them in AJAX mode. It will probably be confusing at the beginning, but then you will soon realize how powerful the new approach is.

9 0
15 followers
Viewed: 70 372 times
Version: 2.0
Category: How-tos
Tags: pjax, widget, yii2

How to send emails using SMTP

Created 5 years ago by robregonm, updated 3 months ago by Wade Shuler.
5 0
10 followers
Viewed: 90 749 times
Version: 2.0
Category: How-tos

Cómo enviar emails usando SMTP

Created 5 years ago by robregonm, updated 5 years ago by robregonm.
2 0
2 followers
Viewed: 16 230 times
Version: 2.0
Category: How-tos

How to read HTML5 Multiple File Input from controller?

Created 5 years ago by Kartik V, updated 5 months ago by samdark.
0 2
40 followers
Viewed: 13 428 times
Version: 2.0
Category: How-tos

Managing a star rating with the StarRating widget in Yii 2

Created 5 years ago by Kartik V, updated 5 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: 16 235 times
Version: 2.0
Category: How-tos

Displaying uploaded file from DB for update with FileInput widget

Created 5 years ago by Kartik V, updated 5 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: 46 470 times
Version: 2.0
Category: How-tos

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

Created 5 years ago by Kartik V, updated 4 years ago by Kartik V.

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.

0 0
51 followers
Viewed: 142 242 times
Version: 2.0
Category: How-tos

Configuring different sessions for backend and frontend in Yii advanced app

Created 5 years ago by Kartik V, updated 3 years ago by Kartik V.

Your need: You require that for shared machines, the user is authenticated again for a backend access again, if someone is logged in from frontend and vice versa.

3 0
46 followers
Viewed: 36 000 times
Version: 2.0
Category: How-tos

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

Created 5 years ago by Kartik V, updated 5 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: 14 804 times
Version: 2.0
Category: How-tos