Showing 1-20 of 219 items.

DB Driven CMenu (Widget)

Created 12 years ago by Preacher Preacher, updated 12 years ago by Preacher Preacher. 0 comments

Awhile ago I was trying to find a database driven CMenu system to add to my web applications. This always seemed to me that it would be a lot easier to manage if it where in a database. So the following is the results of that effort:

1 0
1
Viewed: 9 027 times
Version: 1.1
Category: Tutorials

Named scope - Get orphan AR without losing primary key

Created 16 years ago by cma cma, updated 15 years ago by Steve Friedl Steve Friedl. 0 comments

Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :

public function scopeUnused( $useAnd = true )
    {
        $join = " left outer join composed_by j on t.ID = j.ID ";
        $condition = ' j.ID Is Null';

0 0
2
Viewed: 12 430 times
Version: 1.1
Category: Tutorials

    ePay Integration - Bulgarian Payment Provider

    Created 13 years ago by yasen yasen, updated 13 years ago by yasen yasen. 2 comments

    } ` 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
    Viewed: 15 018 times
    Version: 1.1
    Category: Tutorials

    XSS safe model content

    Created 16 years ago by phiras phiras, updated 16 years ago by phiras phiras. 2 comments

    In this post I am going to describe a solution to make your yii-based web application safe from illegal content injections.

    4 0
    1
    Viewed: 15 368 times
    Version: 1.1
    Category: Tutorials

      Saving CGridView filter

      Created 12 years ago by sefburhan sefburhan, updated 12 years ago by CeBe CeBe. 5 comments

      In this tutorial we will try to save cgridview filter(search) with title etc. basically we want to save two forms data i.e one represents filters and other data about filters like title, description etc. You can define your own structure for filter saving table here are some basic steps

      1 0
      31
      Viewed: 16 821 times
      Version: 1.1
      Category: Tutorials