Showing 181-200 of 652 items.

How to provide a fallback or mapping for translation messages?

Created 13 years ago by schmunk schmunk, updated 11 years ago by schmunk schmunk. 1 comment

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
Viewed: 16 271 times
Version: 1.1
Category: How-tos

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

Created 13 years ago by Maug Lee Maug Lee, updated 12 years ago by yugene yugene. 2 comments

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
Viewed: 59 425 times
Version: 1.1
Category: How-tos

YII SaaS Multi Tenant application with single database

Created 13 years ago by Rajith R Rajith R, updated 12 years ago by xJose xJose. 5 comments

Lots of people are asking how to solve it with YII,We think its difficult with YII. But its easy to solve . There is no database triggers needed . we can simply sove it by extending a class(say "RActiveRecord") from CActiveRecord .Then extend all our model classes from that class.

6 1
14
Viewed: 33 447 times
Version: 1.1
Category: Tutorials

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

Created 13 years ago by Luis Lobo Borobia Luis Lobo Borobia, updated 9 years ago by Luis Lobo Borobia Luis Lobo Borobia. 0 comments

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
Viewed: 18 672 times
Version: all
Category: Tips

Debugging CActiveRecord failed save() attempts

Created 13 years ago by Boaz Boaz, updated 12 years ago by Boaz Boaz. 0 comments

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
Viewed: 43 831 times
Version: 1.1
Category: Tips

Logging to Heroku's logs from Yii

Created 13 years ago by aarondfrancis aarondfrancis, updated 12 years ago by aarondfrancis aarondfrancis. 0 comments

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
Viewed: 13 478 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

Created 13 years ago by Trejder Trejder, updated 13 years ago by Trejder Trejder. 0 comments

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
Viewed: 23 959 times
Version: 1.1
Category: How-tos