Wiki

Articles in category "how-tos", sorted by date (updated)X
Displaying 11-20 of 320 result(s).

How To : Create Forgot Password in Yii (Sending Email to Reset Password)

Updated 18 days ago by ruderbytesHow-tos2 comments – viewed 4,601 times – version 1.1
Assalamualaikum wr.wb Hello yii people i'm Muhammad Fahmi Azain this is tutorial about forgot password in yii framework, and i'm sorry if it does not comply with code standards yii. okay let's begin

Simple Share Widget for Facebook, twitter and google+

Updated 18 days ago by Rohit SutharHow-tos4 comments – viewed 15,472 times – ( +10 ) – version 1.1
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

How to implement form events

Updated 20 days ago by Antonio RamirezHow-tos4 comments – viewed 2,687 times – ( +5 ) – version 2.0
You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.
tags: yii2, forms, how to

Yii2: Configuring different sessions for backend and frontend in Yii Advanced Application Template

Updated 23 days ago by hrnairHow-tos2 comments – viewed 1,917 times – ( +2 ) – version 2.0
This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

Upload files in Yii2 with MongoDb and GridFs

Updated 23 days ago by skwordenHow-tos3 comments – viewed 7,593 times – ( +7 ) – version 2.0
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).

i18n All-in-one format and timezone conversions for date, time, timestamp and datetime.

Updated 25 days ago by Gerhard LiebenbergHow-tos3 comments – viewed 12,129 times – ( +7 / -1 ) – version 1.1
Countries sometimes change their laws pertaining to timezones and daylight saving times. This means that GMT+2 can be a different time this August compared to last August! However, by using php's DateTime class (instead of timestamps), we can do both "format" and "timezone" conversions on a single DateTime object (only 2 lines of code) for date, time, timestamp and datetime types - while php takes care of nightmares such as current and historical timezones and daylight saving times.

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Updated 26 days ago by Gerhard LiebenbergHow-tos4 comments – viewed 1,443 times – version 1.1
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

Yii configuration: Dynamic & User dependent

Updated about a month ago by le_topHow-tos0 comments – viewed 1,593 times – ( +1 ) – version 1.1
It is difficult to perform user dependent theming through a general configuration in 'main.php'. This article proposes a method to do so through a Factory that dynamically generates classes to allow delayed resolution of actual user values. This means that you can refer to values that are stored in the database through the CActiveRecord before Yii is actually loaded. The values will be fetched from the database when actually used for the first time, which is after Yii is loaded. Actually, you can use pretty much any method that relies on Yii with this method.

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

Updated about a month ago by Kartik VHow-tos10 comments – viewed 7,758 times – ( +28 ) – 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.

Yii 2.0: Write & use a custom Component in Yii2.0 (Advanced Template)

Updated about a month ago by Deepak PradhanHow-tos0 comments – viewed 1,978 times – version 2.0
This is an extension to Yii 2.0: Write & use a custom Component in Yii2.0 for Advanced Template