Wiki articles in category How-tos

Showing 101-120 of 292 items.

How to use bizRules in standard accessControl filter

Created 12 years ago by Maciej Liżewski Maciej Liżewski, updated 11 years ago by Maciej Liżewski Maciej Liżewski.

I assume you are familiar with accessControl standard filter. It allows you to separate privileges to run some action from action code itself. There is however one problem with most common usage - you cannot use bizRules, at least based on some parameters passed to 'checkAccess' just because it is hard to pass them in accessRules() result.

3 0
8 followers
Viewed: 22 052 times
Version: 1.1
Category: How-tos

Generate a multi-lever array sub-category for a menu

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

Everyone have seen a multilayer menu in several CMS

7 0
8 followers
Viewed: 28 863 times
Version: 1.1
Category: How-tos

Yii User and Rights Implementation

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

implementing some features of yii user and rights.

4 0
8 followers
Viewed: 43 793 times
Version: 1.1
Category: How-tos

How to avoid rendering entire page on AJAX call for CGridView and CListView

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

CGridView and CListView are great widget to populate records and also provides features like ajax update, column sort, search, drop-down filter, ajax content load and many more...

3 0
12 followers
Viewed: 32 559 times
Version: 1.1
Category: How-tos

Popup AJAX DialogBox without any extension

Created 12 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 9 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

In this wiki I explain how to show a default popup dialogbox (like Gii does) using an existing module.

5 1
6 followers
Viewed: 32 010 times
Version: 1.1
Category: How-tos

multiple CActiveDataProviders in one CGridView

Created 12 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 10 years ago by Nashi Nashi.

There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

4 1
9 followers
Viewed: 33 963 times
Version: 1.1
Category: How-tos

Activate captcha after unsuccessful login attempts

Created 12 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 11 years ago by Rohit Suthar Rohit Suthar.

Like gmail, if you have tree or more unsuccessful login attemps a captcha appears

4 1
15 followers
Viewed: 40 393 times
Version: 1.1
Category: How-tos

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

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

How to provide a fallback or mapping for translation messages?

Created 12 years ago by schmunk schmunk, updated 10 years ago by schmunk schmunk.

Sometimes you want to use exisiting translations for locales, which do not directly match. An example would be a website targeting Germany (de_de), Austria (de_at) and Switzerland (de_ch, fr_ch, it_ch). Although you may have exisiting translations for German (de), French (fr) and Italian (it), there are problems using it directly.

3 0
6 followers
Viewed: 13 996 times
Version: 1.1
Category: How-tos

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created 12 years ago by Maug Lee Maug Lee, updated 11 years ago by yugene yugene.

Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

Implementation

<?php
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'user-grid',
	'dat...
7 0
4 followers
Viewed: 56 111 times
Version: 1.1
Category: How-tos

AngularJS Frontend:Connecting it with a Yii Backend REST API.Gallery Manager Demo Application.

Created 12 years ago by drumaddict drumaddict, updated 11 years ago by Castea Castea.

For best experience,use Chrome.Other browsers may complain here and there.Sorry,no patience to make happy every freaking browser out there!

17 0
37 followers
Viewed: 107 266 times
Version: 1.1
Category: How-tos

Cron Jobs in Yii

Created 12 years ago by aarondfrancis aarondfrancis, updated 9 years ago by Roman Solomatin Roman Solomatin.

I've gotten Yii running cron jobs, and wanted to explain briefly how I did it.

2 0
9 followers
Viewed: 36 417 times
Version: 1.1
Category: How-tos

Logging to Heroku's logs from Yii

Created 12 years ago by aarondfrancis aarondfrancis, updated 11 years ago by aarondfrancis 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: 11 409 times
Version: 1.1
Category: How-tos

Profiling using XDebug

Created 12 years ago by le_top le_top, updated 10 years ago by le_top 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: 23 969 times
Version: all
Category: How-tos

defaultScope

Created 12 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 11 years ago by Gerhard Liebenberg Gerhard Liebenberg.

This example includes a composite condition as well as an empty condition - as if you bypass or disable defaultScope without using resetScope().

3 0
5 followers
Viewed: 34 447 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

Created 12 years ago by Trejder Trejder, updated 12 years ago by Trejder 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: 22 340 times
Version: 1.1
Category: How-tos

Client-side form validation using Twitter Bootstrap's Popovers

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

This article explains how to easily turn standard text-line validation errors into beautifully and professionally looking Twitter Bootstrap's Popovers.

4 0
9 followers
Viewed: 46 330 times
Version: 1.1
Category: How-tos

How to implement an event and attach it in a behavior

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

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

2 0
9 followers
Viewed: 28 522 times
Version: 1.1
Category: How-tos

Yet another implementation of CPhpAuthManager.

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

In this wiki, I try to implement a simple authorization schema without putting much logic inside a file or into database table. We are constructing authorization hierarchy inside the controller. We are getting roles for the current user from database table and assigning only roles to user that are declared in the particular controller. We have brought down the work of loading of auth data at ma...

5 1
7 followers
Viewed: 20 421 times
Version: 1.1
Category: How-tos

Alternative folder structure for a standard Yii app

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

I found a standard Yii app's protected folder structure nearly perfect. With a few simple moves and a little bit change to the code, I managed to bring it to the level, which I found as fully perfect. I want to share my point of view, in case someone would like to use this structure as well.

3 0
9 followers
Viewed: 22 553 times
Version: 1.1
Category: How-tos