Wiki articles

Showing 61-80 of 651 items.

How to register scripts and css

Created 9 years ago by oligalma, updated 8 years ago by oligalma.

Then, we write this in the config > main.php:

2 0
3 followers
Viewed: 93 723 times
Version: 1.1
Category: How-tos

How to validate the uniqueness of multiple columns

Created 9 years ago by oligalma, updated 8 years ago by oligalma.

I am going to show you an effective way to validate the uniqueness of multiple columns.

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

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

Created 9 years ago by Smithesh, updated 8 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: 21 707 times
Version: 1.1
Category: How-tos

View a related field in CGridView

Created 9 years ago by rafaelt88, updated 8 years ago by rafaelt88.

Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

2 0
3 followers
Viewed: 18 664 times
Version: 1.1
Category: Tips

How to upload a file using a model

Created 15 years ago by qiang, updated 8 years ago by samdark.

First declare an attribute to store the file name in the model class (either a form model or an active record model). Also declare a file validation rule for this attribute to ensure a file is uploaded with specific extension name.

66 4
64 followers
Viewed: 516 948 times
Version: 1.1
Category: Tutorials

Date Picker by examples

Created 10 years ago by Interboy, updated 8 years ago by Alfa Adhitya.

CJuiDatePicker displays a datepicker. CJuiDatePicker encapsulates the JUI datepicker plugin.

6 0
7 followers
Viewed: 139 512 times
Version: 1.1
Category: How-tos

Simple Mail Queue

Created 10 years ago by waterloomatt, updated 8 years ago by Bizley.

The basic idea is to create a complete mail message and store it a Db table along with all info necessary for sending valid emails (to_email, from_email, from_name, subject etc.)

8 0
14 followers
Viewed: 28 498 times
Version: 1.1
Category: Tutorials

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created 9 years ago by Gerhard Liebenberg, updated 8 years ago by Gerhard Liebenberg.

We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

0 0
4 followers
Viewed: 13 246 times
Version: 1.1
Category: How-tos

Single PHP entry point with Nginx

Created 8 years ago by MadAnd, updated 8 years ago by MadAnd.

In this article I will show you how to slightly increase application security, by exploiting the fact that Yii implements the Front Controller Pattern.

4 0
3 followers
Viewed: 17 598 times
Version: all
Category: How-tos

Relation scope to test existence of related records ("EXISTS")

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

When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.

1 0
2 followers
Viewed: 13 803 times
Version: 1.1
Category: How-tos

Console Based CAuthManager Helper

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

This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.

0 0
1 follower
Viewed: 12 349 times
Version: 1.1
Category: How-tos

Checking for "expired" sessions/logins on the client side

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

Getting "Expired token" errors ? Here is a solution to avoid invalid CSRF on POST or ajax requests, or user identity changes.

4 0
12 followers
Viewed: 35 343 times
Version: 1.1
Category: How-tos

Profiling using XDebug

Created 10 years ago by le_top, updated 9 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: 21 375 times
Version: all
Category: How-tos

CGridView Date Range Without Cookies or Session (External Filtering)

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

Here's a tutorial on how to create a CGridView with external date filters the trick is to create hidden columns within the CGridView Filters something like in the example below: grid

3 0
8 followers
Viewed: 21 147 times
Version: 1.1
Category: How-tos

Using Yii Gallery Manager in your Yii 1.x application

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

Finding good looking, working and not abandoned gallery manager for Yii 1.x application is a tough task. Out of all I found, only yii-gallery-manager extension looked promising. But, after downloading it, it turned out, that there are certain unusual things to do, to include it in your application. So, I decided to write this article...

0 0
1 follower
Viewed: 15 351 times
Version: 1.1
Category: How-tos

Things to Consider when application hosting on AppFog

Created 9 years ago by VINAY Kr. SHARMA, updated 9 years ago by VINAY Kr. SHARMA.

I faced many issues when hosted our company website on AppFog.

1 0
1 follower
Viewed: 7 947 times
Version: 1.1
Category: Tips

NetBeans IDE and Yii projects

Created 13 years ago by marcovtwout, updated 9 years ago by marcovtwout.

This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.

65 0
66 followers
Viewed: 248 708 times
Version: 1.1
Category: Tutorials

Active Record snapshotting (Model data base history)

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

One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.

1 0
5 followers
Viewed: 16 521 times
Version: 1.1
Category: Tutorials

Searching and Sorting by Count of Related Items in CGridView

Created 12 years ago by softark, updated 9 years ago by softark.

class Post extends CActiveRecord {

...

} ` When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.

21 0
40 followers
Viewed: 58 416 times
Version: 1.1
Category: How-tos

Selecting best language based on Browser language and available languages.

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

Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.

2 0
1 follower
Viewed: 15 456 times
Version: 1.1
Category: Tips