Wiki articles

Showing 161-180 of 651 items.

Manage application configuration in different modes

Created 14 years ago by qiang, updated 12 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: 67 650 times
Version: 1.1
Category: Tutorials

Yii Security-extended guide

Created 12 years ago by bingjie2680, updated 12 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: 30 537 times
Version: 1.1
Category: Tips

Using events with CAction classes

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

As you know, events are used by:

9 0
9 followers
Viewed: 23 366 times
Version: 1.1
Category: Tips

CPhpAuthManager - how it works, and when to use it

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

It is actually mentioned in the documentation

1 2
6 followers
Viewed: 32 003 times
Version: 1.1
Category: How-tos

How to use Flash, Zend AMF and Yii Framework

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

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

3 0
6 followers
Viewed: 15 775 times
Version: 1.1
Category: Tutorials

How to add a named scope to ActiveRecords with a behavior

Created 14 years ago by Mike, updated 12 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: 34 981 times
Version: 1.1
Category: Tutorials
Tags:

Rendering a view file in a console application

Created 12 years ago by Tompi, updated 12 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: 19 806 times
Version: 1.1
Category: How-tos

Managing constants easily

Created 12 years ago by briiC.lv, updated 12 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: 30 573 times
Version: 1.1
Category: Tips

How to ensure unicity to url

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

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

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

Use application on production/development environment without making changes

Created 12 years ago by ifdattic, updated 12 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: 76 700 times
Version: 1.1
Category: Tips

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

Created 12 years ago by c@cba, updated 12 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: 49 597 times
Version: 1.1
Category: Tutorials

Database driven Cmenu

Created 12 years ago by twisted1919, updated 12 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 025 times
Version: 1.1
Category: How-tos

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

Created 12 years ago by c@cba, updated 12 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: 75 760 times
Version: 1.1
Category: Tutorials

Troubleshooting Rights Extension

Created 12 years ago by junxiong, updated 12 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: 30 845 times
Version: 1.1
Category: Tips

Tarpit for bad bots

Created 12 years ago by mithereal, updated 12 years ago by mithereal.

I recently built a tarpit for bad bots.

1 0
9 followers
Viewed: 10 005 times
Version: 1.1
Category: How-tos
Tags: bots, tarpit

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 12 years ago by jpablo, updated 12 years ago by jpablo.

Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

2 0
10 followers
Viewed: 22 624 times
Version: 1.1
Category: How-tos
Tags:

Multiple file upload handler

Created 12 years ago by hasanavi, updated 12 years ago by hasanavi.

Hi,

5 0
7 followers
Viewed: 33 123 times
Version: 1.1
Category: Tutorials

X-Sendfile - serve large static files efficiently from web applications

Created 13 years ago by Maurizio Domba Cerin, updated 12 years ago by Maurizio Domba Cerin.

Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

29 0
20 followers
Viewed: 119 671 times
Version: 1.1
Category: How-tos

Setting application parameters dynamically in the back-end

Created 12 years ago by Pablovp, updated 12 years ago by Pablovp.

I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

12 0
16 followers
Viewed: 62 769 times
Version: 1.1
Category: Tutorials

How to obtain a grammatically correct translation of the model name in giix-generated view files

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

The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) .
But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

4 0
1 follower
Viewed: 19 129 times
Version: 1.1
Category: How-tos