Wiki articles

Showing 161-180 of 823 items.

How to insert a Simple Dialog Box

Created 13 years ago by bluyell, updated 13 years ago by bluyell.

I build this simple PHP class (DialogBox.php at the bottom of this wiki) to help you in the dialog box usage on Yii applications. The goal is run any Yii actions into this dialog box and return the resulting value to the calling instance.

5 0
9 followers
Viewed: 40 865 times
Version: 1.1
Category: How-tos

Application-driven database with CDbMigration and an extended CActiveRecord

Created 13 years ago by Tudor Ilisoi, updated 13 years ago by Tudor Ilisoi.

This is an incipient implementation of application-driven database with Yii.

8 0
10 followers
Viewed: 17 245 times
Version: 1.1
Category: Others

How to re enable logging during unit testing

Created 13 years ago by Asgaroth, updated 13 years ago by Asgaroth.

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10 followers
Viewed: 26 763 times
Version: 1.1
Category: How-tos

Creating a parameterized LIKE query

Created 14 years ago by Steve Friedl, updated 13 years ago by Asgaroth.

It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

13 0
21 followers
Viewed: 146 885 times
Version: 1.1
Category: FAQs

Increasing AR performance in connections with Oracle

Created 14 years ago by Trejder, updated 13 years ago by igorsantos07.

Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.

1 0
15 followers
Viewed: 56 782 times
Version: 1.1
Category: How-tos

How to validate CSRF token with session

Created 13 years ago by yangmls, updated 13 years ago by yangmls.

First of all, You must change component config to enable the default Yii CSRF validation.

21 0
27 followers
Viewed: 104 255 times
Version: 1.1
Category: How-tos
Tags: CSRF, session

Manage application configuration in different modes

Created 16 years ago by qiang, updated 13 years ago by 张 迪.

Application configuration determines how an Yii application should behave, because it is the only parameter passed in the entry script. An application, on the other hand, needs to behave differently under different circumstances. For example, an application may need different configurations when running in production mode, development mode and testing mode; In a team development environment, each...

15 0
15 followers
Viewed: 70 750 times
Version: 1.1
Category: Tutorials

Yii Security-extended guide

Created 13 years ago by bingjie2680, updated 13 years ago by bingjie2680.

This article is called extended guide is because there is already a security guide in the Yii tutorial security section. but that guide is not complete in the sense that it does not rise the developers' attention to some other commonly happening attacks: SQL injection and magic URL, which can be major vulnerabilities in you...

6 6
12 followers
Viewed: 32 941 times
Version: 1.1
Category: Tips

Using events with CAction classes

Created 13 years ago by Antonio Ramirez, updated 13 years ago by 张 迪.

As you know, events are used by:

9 0
9 followers
Viewed: 24 634 times
Version: 1.1
Category: Tips

CPhpAuthManager - how it works, and when to use it

Created 13 years ago by dckurushin, updated 13 years ago by François Gannaz.

It is actually mentioned in the documentation

1 2
6 followers
Viewed: 33 890 times
Version: 1.1
Category: How-tos

How to use Flash, Zend AMF and Yii Framework

Created 13 years ago by janisto, updated 13 years ago by janisto.

This is a simple demo how to use Zend_AMF with Yii.

3 0
6 followers
Viewed: 16 713 times
Version: 1.1
Category: Tutorials

How to add a named scope to ActiveRecords with a behavior

Created 16 years ago by Mike, updated 13 years ago by yiqing95.

Since Yii 1.0.5 you can use named scopes with ActiveRecords. They are a great help in simplifying your query calls.

2 0
10 followers
Viewed: 37 227 times
Version: 1.1
Category: Tutorials
Tags:

Rendering a view file in a console application

Created 13 years ago by Tompi, updated 13 years ago by Tompi.

When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

2 1
7 followers
Viewed: 20 706 times
Version: 1.1
Category: How-tos

Managing constants easily

Created 13 years ago by briiC.lv, updated 13 years ago by briiC.lv.

/*

    Get class constants by token.
    If you set constants with same prefix, like:
	MY_STATUS_1
	MY_STATUS_2
	MY_STATUS_3
4 0
7 followers
Viewed: 32 631 times
Version: 1.1
Category: Tips

How to ensure unicity to url

Created 13 years ago by zaccaria, updated 13 years ago by marcovtwout.

Many time for SEO porpouses is important that each page will have a unique address.

13 0
16 followers
Viewed: 25 280 times
Version: 1.1
Category: Tips
Tags: SEO, unique, URL

Use application on production/development environment without making changes

Created 13 years ago by ifdattic, updated 13 years ago by ifdattic.

I like programing on my localhost, however it really bugged me to make changes to index.php & config files on my production server. After combining all available wiki articles on this topic and some trial and error this is what I use for my applications so I could just upload it to production server and it will work without any changes.

8 1
11 followers
Viewed: 78 399 times
Version: 1.1
Category: Tips

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Created 13 years ago by c@cba, updated 13 years ago by c@cba.

In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this.
We implement an event handler for the onBeginRequest event; as the nam...

9 0
19 followers
Viewed: 51 534 times
Version: 1.1
Category: Tutorials

Database driven Cmenu

Created 13 years ago by twisted1919, updated 13 years ago by twisted1919.

This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.

12 0
17 followers
Viewed: 37 785 times
Version: 1.1
Category: How-tos

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Created 13 years ago by c@cba, updated 13 years ago by c@cba.

You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen.
Note that currently selected language is always a part...

28 0
42 followers
Viewed: 79 743 times
Version: 1.1
Category: Tutorials

Troubleshooting Rights Extension

Created 13 years ago by junxiong, updated 13 years ago by junxiong.

Rights is one of user interface for Yii's Role Base Access Control extension. It is one of most downloaded extensions in Yii's Web.

5 0
14 followers
Viewed: 32 294 times
Version: 1.1
Category: Tips