Wiki articles

Showing 221-240 of 651 items.

Adding a date range search for CGridView the easy way

Created 11 years ago by mikewalen, updated 10 years ago by mikewalen.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11 followers
Viewed: 42 068 times
Version: 1.1
Category: Tips

Adding a link to a CDataColumn

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

Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

2 0
8 followers
Viewed: 26 548 times
Version: 1.1
Category: Tips

Integrating HybridAuth directly into Yii without an extension

Created 11 years ago by biz dev, updated 10 years ago by biz dev.

This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

10 0
15 followers
Viewed: 51 140 times
Version: 1.1
Category: How-tos

Patching PHP code (used as a library) without changing the original code!

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

The article Fixing extensions without modifying their code reminded me of another patching technique that I used. My conviction and a hard look on the web had led me to an article [Redefine PHP class methods or class](http://stackoverflow.com/questions/137006/ph...

4 0
5 followers
Viewed: 13 090 times
Version: 1.1
Category: Tips

Fixing extensions without modifying their code

Created 11 years ago by schmunk, updated 11 years ago by schmunk.

If you're working a lot with extensions you often stumble upon problems, when you want to include them into your custom web application, like hardcoded or absolute path aliases or classes extended from core application components, which implement addiditonal features.

6 0
10 followers
Viewed: 17 308 times
Version: 1.1
Category: Tips

Limit a CGridView field to some preset length.

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

Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

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

PHPStorm & NetBeans autocomplete problem

Created 11 years ago by Stageline, updated 11 years ago by Stageline.

The problem: If you type Yii::app()->user<ctrl+space> code completion didn't work. This solve it.

12 0
14 followers
Viewed: 21 782 times
Version: 1.1
Category: Tips

Extending an ActiveRecord model

Created 11 years ago by Bogsey, updated 11 years ago by Bogsey.

protected $_viewFile

2 3
7 followers
Viewed: 28 707 times
Version: 1.1
Category: How-tos

Upload Files to Rackspace Cloud Files CDN

Created 11 years ago by StephenMiracle, updated 11 years ago by StephenMiracle.

** I actually made this into an extension for easier use. You can view the extension: http://www.yiiframework.com/extension/rackspaceconnect/

2 0
3 followers
Viewed: 17 369 times
Version: 1.1
Category: Tutorials

Twitter Bootstrap style Breadcrumbs

Created 11 years ago by junaidatari, updated 11 years ago by junaidatari.

will generate twitter bootstrap styled breadcrumb code:

3 1
4 followers
Viewed: 53 917 times
Version: 1.1
Category: How-tos

Assigning dynamic roles to a user Using yii Rights module at the time of user creation and using some special advanced features of yii rights

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

After Installing Yii Users and Rights to Newly Created Yii app we have to assign dynamic roles to a user at the time of user creation .

7 0
13 followers
Viewed: 59 814 times
Version: 1.1
Category: Tips

Using Bootstrap with LESS

Created 11 years ago by Chris83, updated 11 years ago by Chris83.

I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular [bootstrap extension](http://ww...

11 0
14 followers
Viewed: 55 655 times
Version: 1.1
Category: How-tos

Kickstart development with Yii-App

Created 11 years ago by Chris83, updated 11 years ago by Chris83.

I recently created a project called Yii-App on GitHub to kickstart my development of smaller Yii applications. The main goal of the project is to provide a ready-to-use application template that includes my bootstrap extension and many other useful extensions. After reading this article you will be able to use...

14 0
40 followers
Viewed: 40 869 times
Version: 1.1
Category: How-tos

Turn Web HTML Into Newsletter

Created 11 years ago by yasen, updated 10 years ago by yasen.

These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.

6 0
9 followers
Viewed: 16 518 times
Version: 1.1
Category: How-tos

Handling Bootstrap active tabs in Yii via URL

Created 11 years ago by JamesBarnsley, updated 8 years ago by JamesBarnsley.

I (www.jamesbarnsley.com) found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to...

3 0
7 followers
Viewed: 39 603 times
Version: 1.1
Category: How-tos

Define general array and variable and call it to anywhere in application

Created 11 years ago by bhavesh vaghela, updated 11 years ago by Maurizio Domba Cerin.

Create param.php file in protected/config

Yii::app()->params['TEXT_ACTIVE'] = 'Active'; //1 for active

1 4
3 followers
Viewed: 14 127 times
Version: 1.1
Category: Tutorials
Tags:

Upload CSV File

Created 11 years ago by bhavesh vaghela, updated 9 years ago by bhavesh vaghela.

View file

3 0
10 followers
Viewed: 32 046 times
Version: 1.1
Category: Tutorials
Tags:

Creating HTML code using Jamboree Panels

Created 11 years ago by bluyell, updated 11 years ago by bluyell.
2 0
2 followers
Viewed: 16 806 times
Version: 1.1
Category: Tutorials

ePay Integration - Bulgarian Payment Provider

Created 11 years ago by yasen, updated 11 years ago by yasen.

} ` V. The Order model would start with:

class Order extends CActiveRecord
{
	const STATUS_INITIATED = 1;
	const STATUS_CANCELED = 2;
	const STATUS_EXPIRED = 3;
	const STATUS_PAID = 4;
	public $statuses = array(
		self::STATUS_INITIATED => 'Initiated',
		self::STATUS_CANCELED => 'Canceled',
		self::STATUS_EXPIRED => 'Expired',
		self::STATUS_PAID => 'Paid',
	);
// more cod...
6 0
5 followers
Viewed: 11 503 times
Version: 1.1
Category: Tutorials