Wiki articles

Showing 181-200 of 650 items.

Log Activity in DataBase

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

In this article i will explain how to customize log activity in database, Imaging you need to save IP user, Url request and user_name in database,But table created by default with Yii only have id,level,category,logtime and message

4 0
17 followers
Viewed: 24 798 times
Version: 1.1
Category: Tutorials

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

Created 5 years ago by VINAY Kr. SHARMA, updated 3 years ago by 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: 28 078 times
Version: 1.1
Category: How-tos

Popup AJAX DialogBox without any extension

Created 5 years ago by Kostas Apazidis (KonApaz), updated 3 years ago by 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: 24 301 times
Version: 1.1
Category: How-tos

multiple CActiveDataProviders in one CGridView

Created 5 years ago by Kostas Apazidis (KonApaz), updated 4 years ago by 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: 26 818 times
Version: 1.1
Category: How-tos

Activate captcha after unsuccessful login attempts

Created 5 years ago by Kostas Apazidis (KonApaz), updated 4 years ago by Rohit Suthar.

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

4 1
16 followers
Viewed: 27 622 times
Version: 1.1
Category: How-tos

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

Created 6 years ago by le_top, updated 4 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: 27 408 times
Version: 1.1
Category: How-tos

How to provide a fallback or mapping for translation messages?

Created 6 years ago by schmunk, updated 4 years ago by 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: 8 107 times
Version: 1.1
Category: How-tos

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

Created 6 years ago by Maug Lee, updated 4 years ago by 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: 45 782 times
Version: 1.1
Category: How-tos

YII SaaS Multi Tenant application with single database

Created 6 years ago by Rajith R, updated 5 years ago by xJose.

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 followers
Viewed: 20 455 times
Version: 1.1
Category: Tutorials

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

Created 6 years ago by Luis Lobo Borobia, updated 2 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: 8 590 times
Version: all
Category: Tips

Simple Mail Queue

Created 6 years ago by waterloomatt, updated 4 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: 21 554 times
Version: 1.1
Category: Tutorials

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

Created 6 years ago by drumaddict, updated 5 years ago by 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: 93 379 times
Version: 1.1
Category: How-tos

Debugging CActiveRecord failed save() attempts

Created 6 years ago by Boaz, updated 5 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: 29 403 times
Version: 1.1
Category: Tips

Cron Jobs in Yii

Created 6 years ago by aarondfrancis, updated 3 years ago by Roman Solomatin.

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

2 0
9 followers
Viewed: 26 887 times
Version: 1.1
Category: How-tos

Logging to Heroku's logs from Yii

Created 6 years ago by aarondfrancis, updated 5 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: 7 262 times
Version: 1.1
Category: How-tos

Profiling using XDebug

Created 6 years ago by le_top, updated 4 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: 14 738 times
Version: all
Category: How-tos

defaultScope

Created 6 years ago by Gerhard Liebenberg, updated 5 years ago by 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: 26 969 times
Version: 1.1
Category: How-tos

Implementing menu items with progress (wait) dialog

Created 6 years ago by Trejder, updated 6 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: 9 235 times
Version: 1.1
Category: How-tos

Client-side form validation using Twitter Bootstrap's Popovers

Created 6 years ago by Trejder, updated 6 years ago by 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: 39 471 times
Version: 1.1
Category: How-tos

Yiinitializr: The Library

Created 6 years ago by Antonio Ramirez, updated 6 years ago by Antonio Ramirez.

Yiinitializr\Helpers\Initializer::create('./../', 'frontend', array(

// will override frontend configuration file
__DIR__ .'/../../common/config/main.php', // merged with
__DIR__ .'/../../common/config/env.php', // merged with
__DIR__ .'/../../common/config/local.php' // merged with

))->run(); `

Yiinitializr\Cli namespace

This namespace brings utilities to interact with...

14 0
23 followers
Viewed: 21 817 times
Version: 1.1
Category: Others