Wiki articles

Showing 161-180 of 822 items.

an easy way to required multi columns(At least one cannot be blank)

Created 12 years ago by 1065227709, updated 12 years ago by 1065227709.

in model add the following code:

3 0
3 followers
Viewed: 11 562 times
Version: 1.1
Category: Tips
Tags: rules

How to implement an event and attach it in a behavior

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

This page explains how to implement an event and catch that event in a behavior.

2 0
9 followers
Viewed: 27 395 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

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

This article shows one of possible ways to implement menu items (as well as links), which displays a progress / wait dialog and are redirecting browser to destination URL in the same time. This is especially useful, for links or routes that are know to be loaded for a prolonged period of time (i.e. getting a lot of data from database).

1 0
1 follower
Viewed: 21 411 times
Version: 1.1
Category: How-tos

Enhance security of cookie-based login

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

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

2 0
2 followers
Viewed: 17 714 times
Version: 1.1
Category: How-tos

Customizing Yii's formatting rules (extending CFormatter)

Created 12 years ago by Haensel, updated 12 years ago by Haensel.

CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model)...

12 0
6 followers
Viewed: 22 832 times
Version: 1.1
Category: Tips

Role Management

Created 9 years ago by Dency G B, updated 9 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 114 times
Version: 2.0
Category: How-tos
Tags: rbac, yii2

Logging to Heroku's logs from Yii

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

In order to get your Yii logs into Heroku's logs, you have to work a little bit of magic. You'll need to modify the boot.sh script and add the following two lines: ~~~ touch /app/apache/logs/app_log tail -F /app/apache/logs/app_log & ~~~ This will set up the log and tail it so that when you request "heroku logs", this log is included.

1 0
1 follower
Viewed: 10 232 times
Version: 1.1
Category: How-tos

What SQL-Statement creates yii?

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

The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.

0 0
1 follower
Viewed: 12 169 times
Version: 1.1
Category: Tips

Getting information from the current locale

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

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 20 549 times
Version: 2.0
Category: How-tos

Debugging CActiveRecord failed save() attempts

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

When you're filling up a form of a CActiveRecord (using CActiveForm for example), usually you'll construct your code so that in case of validation error you'll get back the form with the error displayed back to you, typically when CActiveForm.errorSummary() is used. This is how its done by Gii.

4 0
2 followers
Viewed: 38 895 times
Version: 1.1
Category: Tips

embedded javascript block in your view with IDE checking or intellisense

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

this is my way for embed js code block in view file:

2 0
3 followers
Viewed: 13 024 times
Version: 2.0
Category: Tips

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 10 years ago by Luis Lobo Borobia, updated 6 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 14 392 times
Version: all
Category: Tips

free PHP IDE CodeLobster supports Yii framework

Created 12 years ago by clod, updated 12 years ago by clod.

This page is created to supply short directions and general tips for managing a Yii application in Codelobster PHP Edition.

5 0
1 follower
Viewed: 20 017 times
Version: 1.1
Category: Tutorials

How to display images in CJuiAutoComplete without extenstions

Created 9 years ago by Asmaa, updated 5 years ago by samdark.

I wanted to customize the CJuiAutoComplete, so that it displays a thumb image before the label like the one shown in the following image:

0 0
2 followers
Viewed: 12 754 times
Version: 1.1
Category: Tutorials

Events registration examples

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

Register an event handler at Object-Level

2 0
2 followers
Viewed: 60 451 times
Version: 2.0
Category: How-tos
Tags: events, yii2

Inline views, write less

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

Sometimes writing views like

3 0
3 followers
Viewed: 11 520 times
Version: Unknown (update)
Category: Tips

Yii configuration: Dynamic & User dependent

Created 9 years ago by le_top, updated 9 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: 12 663 times
Version: 1.1
Category: How-tos

Move sources to src

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

Yii 3 and many Yii 2 package sources are contained within src directory which is convenient since you have less directories to check.

11 0
6 followers
Viewed: 14 382 times
Version: 2.0
Category: How-tos

Change default date format in Oracle

Created 4 years ago by lenovo, updated 4 years ago by samdark.

Default date format in Oracle is DD-MON-RR (25-JAN-18). With that output, we can't using date formatting.

0 0
2 followers
Viewed: 34 488 times
Version: 2.0
Category: How-tos
Tags: database

Simple Way to Upload and Save File

Created 9 years ago by Misbahul D Munir, updated 9 years ago by Misbahul D Munir.

This tutorial need extension mdmsoft/yii2-upload-file. Follow the intruction to install. After installation done, create controller and action

0 0
4 followers
Viewed: 38 722 times
Version: 2.0
Category: Tutorials