Wiki articles

Showing 401-420 of 651 items.

Getting the Most out of APC for Yii

Created 13 years ago by Da:Sourcerer, updated 11 years ago by Da:Sourcerer.

In addition to the opcode cache, APC can also serve as a user cache for Yii via [CApcCache]. It should be noted that this will make APC's memory needs less predictable.

15 0
19 followers
Viewed: 52 617 times
Version: 1.1
Category: How-tos
Tags: apc, caching

1:n relations sometimes require CDbCriteria.together

Created 13 years ago by fsb, updated 11 years ago by fsb.

There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

15 0
12 followers
Viewed: 52 869 times
Version: 1.1
Category: Tips

Configuring controller access rules to default-deny

Created 14 years ago by Steve Friedl, updated 11 years ago by nsanden.

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12 followers
Viewed: 141 210 times
Version: 1.1
Category: How-tos

Implementing a User Level Access System

Created 14 years ago by Antonio Ramirez, updated 11 years ago by Phil Loaiza.

Please note that this article is a simple example and good security should be taken into account when we play with authentication systems.

27 0
37 followers
Viewed: 73 336 times
Version: 1.1
Category: Tutorials

Add information to Yii::app()->user by extending CWebUser (better version)

Created 14 years ago by emix, updated 11 years ago by Anas AbuDayah.

I found a better solution.

5 0
10 followers
Viewed: 51 307 times
Version: 1.1
Category: Tutorials
Tags: rbac, user, Yii

Syncing sessions between Yii and KCFinder

Created 12 years ago by Thanasis Fotis, updated 11 years ago by Boaz.

>Info: As KCFinder's documentation mentions, if your application (Yii in our case) session handling is using the PHP environment configuration - meaning no change in session handling at all, then no change is needed also on KCFinder side to be able to use this session and thus have this simple interface between your Yii webapp and KCFinder. If t...

1 0
6 followers
Viewed: 17 489 times
Version: 1.1
Category: How-tos

Installing Yii Users and Rights to Newly Created Yii app

Created 12 years ago by Rajith R, updated 11 years ago by Rajith R.

After creating an yii app . we need to implement permission, Authentication and Authorization .so the best way is to use the Yii users and Rights modules.

11 1
40 followers
Viewed: 110 359 times
Version: 1.1
Category: Tutorials

Using CJuiDatePicker for CGridView filter

Created 13 years ago by softark, updated 11 years ago by Kostas Apazidis (KonApaz).

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 65 358 times
Version: 1.1
Category: How-tos

Localized version of CFormatter

Created 12 years ago by marcovtwout, updated 11 years ago by marcovtwout.

To replace the application component 'format', which is registered by CApplication by default, you can put this in your application 'components' config:

2 0
5 followers
Viewed: 11 050 times
Version: 1.1
Category: How-tos

Select2 Infinite Scroll With Remote Data in Yii

Created 11 years ago by IsraelAma, updated 11 years ago by CeBe.

I was able to set up the infinite scroll of select2 in Yii. I am glad to share it with you. The demo and source code can be found here. However, select2 for Yii can be found here which uses a widget.

3 0
5 followers
Viewed: 23 251 times
Version: 1.1
Category: How-tos

How to Enhance a CGridView

Created 11 years ago by bluyell, updated 11 years ago by CeBe.

by: Christian Salazar (bluyell, @salazachris74, christiansalazarh@gmail.com)

2 0
5 followers
Viewed: 12 737 times
Version: 1.1
Category: How-tos

Safely checking if a model class exists (without exploding)

Created 11 years ago by Boaz, updated 11 years ago by CeBe.

While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.

1 0
2 followers
Viewed: 20 077 times
Version: 1.1
Category: How-tos

Making a CGridView to keep the selection between page changes

Created 11 years ago by bluyell, updated 11 years ago by CeBe.

You may find this usefull when you discover your CGridView lost the selection after an update or after a page change, nicely i have build a new extension to cover this problem in a very easy way.

2 0
3 followers
Viewed: 13 768 times
Version: 1.1
Category: Tutorials

CSqlDataProvider in CGridView

Created 11 years ago by Kostas Apazidis (KonApaz), updated 11 years ago by CeBe.

In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

3 0
9 followers
Viewed: 37 219 times
Version: 1.1
Category: Tutorials

Simple example for language translation

Created 11 years ago by RKA, updated 11 years ago by CeBe.

Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.

1 0
5 followers
Viewed: 39 221 times
Version: 1.1
Category: How-tos
Tags: i18n, Yii

Attaching multiple event handlers to onBeginRequest

Created 11 years ago by Boaz, updated 11 years ago by CeBe.

There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

1 0
2 followers
Viewed: 16 632 times
Version: 1.1
Category: How-tos

How to limit number of guest page views

Created 11 years ago by PeRoChAk, updated 11 years ago by CeBe.

In some cases, we have to limit the number of page views for the guests users. Yii provide an efficient method to get this.

2 0
5 followers
Viewed: 9 741 times
Version: 1.1
Category: How-tos

How to create a simple logout link in the view?

Created 11 years ago by mi.sarah, updated 11 years ago by CeBe.

Here you learn to create and set a simple ahref-link to logout the current user.

0 2
1 follower
Viewed: 49 911 times
Version: 1.1
Category: How-tos

Image Puzzle Game

Created 11 years ago by nachi, updated 11 years ago by CeBe.

I have developed a extension for a image puzzle game. You can use your own images and you can also customize how many rows and columns for the image. It can be used in commercial sites. I just needed your thoughts on the game.

2 0
4 followers
Viewed: 10 832 times
Version: 1.1
Category: Others
Tags: game, image, puzzle

Email by YiiMailer, Call Outlook, IMAP

Created 11 years ago by Scott_Huang, updated 11 years ago by CeBe.

In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is call outlook as COM.

0 0
6 followers
Viewed: 21 650 times
Version: 1.1
Category: How-tos