Wiki articles in category How-tos

Showing 61-80 of 373 items.

How to nest DB transactions without actually nesting them.

Created 9 years ago by le_top, updated 9 years ago by le_top.

To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

1 0
1 follower
Viewed: 11 037 times
Version: 1.1
Category: How-tos

Pjax on ActiveForm and GridView - Yii2

Created 10 years ago by Sreenadh, updated 10 years ago by Sreenadh.

Here is a example on how to use Pjax with GridView (yii\grid\GridView) and ActiveForm (yii\widgets\ActiveForm) widgets in Yii2.

7 0
16 followers
Viewed: 166 650 times
Version: 2.0
Category: How-tos

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

Created 10 years ago by hrnair, updated 10 years ago by hrnair.

This is as an extension of this wiki by Kartik V which shows to make different enableAutoLogin cookies for frontend and backend.

3 0
7 followers
Viewed: 44 998 times
Version: 2.0
Category: How-tos

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

Created 10 years ago by Gerhard Liebenberg, updated 10 years ago by Gerhard Liebenberg.

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.

0 0
3 followers
Viewed: 25 111 times
Version: 1.1
Category: How-tos
0 0
5 followers
Viewed: 46 884 times
Version: 2.0
Category: How-tos

Yii configuration: Dynamic & User dependent

Created 10 years ago by le_top, updated 10 years ago by le_top.

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...

1 0
1 follower
Viewed: 13 246 times
Version: 1.1
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 10 years ago by raminious, updated 9 years ago by jim..

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

10 0
21 followers
Viewed: 127 942 times
Version: 2.0
Category: How-tos

MongoDB's RBAC support class extending BaseManager

Created 10 years ago by edoardo849, updated 10 years ago by edoardo849.

Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components and modify your params.php` file like this:

0 0
4 followers
Viewed: 13 879 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2

Behaviour for Time Zone and Format conversion for Date, Time, timestamp, and datetime

Created 10 years ago by Smithesh, updated 9 years ago by Smithesh.

This Behaviour helps to view time/date/timestamp/datetime from db to local Date / Time / Date Time format and in local Timezone. And save into db in with db timezone and db format. You only need to include this behaviour in models where need this facility.

2 0
3 followers
Viewed: 22 514 times
Version: 1.1
Category: How-tos

Check users online, user last activity, user last ip

Created 10 years ago by frazelli, updated 10 years ago by frazelli.

Stores session data in database and transfer data when session is destroy. Uses for check users online, user's last activity and last ip.

3 0
7 followers
Viewed: 22 633 times
Version: 1.1
Category: How-tos

How to implement form events

Created 10 years ago by Antonio Ramirez, updated 8 years ago by deacs.

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.

5 0
6 followers
Viewed: 39 434 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

Write & use a custom Component in Yii2.0

Created 10 years ago by sirin k, updated 7 years ago by Maurizio Domba Cerin.

This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

14 0
11 followers
Viewed: 124 425 times
Version: 2.0
Category: How-tos

Google style sign out of all other sessions

Created 10 years ago by Rohit Suthar, updated 9 years ago by Rohit Suthar.

In this wiki I will show how could logout from all other sessions or all other places.

0 0
5 followers
Viewed: 26 633 times
Version: 1.1
Category: How-tos

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

Created 10 years ago by ruderbytes, updated 8 years ago by ruderbytes.

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

0 0
2 followers
Viewed: 64 882 times
Version: 1.1
Category: How-tos

Role Management

Created 10 years ago by Dency G B, updated 10 years ago by Dency G B.

Implementing a role based access control is a very easy process and you can even load your roles from the database if you want.

0 0
5 followers
Viewed: 24 871 times
Version: 2.0
Category: How-tos
Tags: rbac, yii2

How to get & store Last Login DateTime in database?

Created 10 years ago by Rohit Suthar, updated 10 years ago by Rohit Suthar.

In this wiki I will show how could be store last login date & time in database. First we need a field LastLoginTime (Type must be datetime). this field store a user login detalis (like - Date & Time).

2 0
4 followers
Viewed: 25 721 times
Version: 1.1
Category: How-tos

Enhance security of cookie-based login

Created 10 years ago by darkheir, updated 10 years ago by darkheir.

When talking about cookie-base login the Yii guide indicates the following:

2 0
2 followers
Viewed: 18 231 times
Version: 1.1
Category: How-tos

How to show a Captcha in CForm?

Created 10 years ago by Rohit Suthar, updated 10 years ago by Rohit Suthar.

In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.

0 0
3 followers
Viewed: 18 984 times
Version: 1.1
Category: How-tos

How to show Image view after upload and delete view image using eajaxupload extension

Created 10 years ago by Ankit Modi, updated 5 years ago by samdark.

Hi Friends, In this tutorial you can use the eajaxupload-extension ,

0 1
3 followers
Viewed: 61 264 times
Version: 1.1
Category: How-tos

How to sum (Update) of all input button price value using jquery

Created 10 years ago by Ankit Modi, updated 10 years ago by Ankit Modi.

Hi Friends, In this tutorial, how to update the sum of all the button data-price value using jquery, Just Follow three step and it's work easily.I hope It may be some helpful to others. See Image

0 0
2 followers
Viewed: 21 167 times
Version: all
Category: How-tos