Showing 621-640 of 652 items.

Manage application configuration in different modes

Created 17 years ago by qiang qiang, updated 14 years ago by 张 迪 张 迪. 5 comments

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
Viewed: 75 958 times
Version: 1.1
Category: Tutorials

Use shortcut functions to reduce typing

Created 17 years ago by qiang qiang, updated 14 years ago by Yang He Yang He. 8 comments

Because Yii intends to be integrated nicely with third-party libraries, it does not define any global functions. Everything in Yii needs to be addressed with full class name or object scopes. For example, to access the current user, we need to use Yii::app()->user; to access application parameters, we need Yii::app()->params['name']; and so on. While editors like textmate can help alleviate...

46 0
45
Viewed: 76 089 times
Version: 1.1
Category: Tutorials

    Using CAutoComplete to display one value and submit another

    Created 17 years ago by luoshiben luoshiben, updated 14 years ago by mohammad sharif ahrari mohammad sharif ahrari. 5 comments

    Have you ever wanted to use an auto-complete field to look up a user or some other data, but want the database ID of that user or data returned as well so that you can more easily perform some function when the form is submitted? Thanks to Yii's CAutoComplete widget and [jQuery's Autocomplete plugin](http://plugins.jquery.com/project/jq-autocomp...

    7 3
    11
    Viewed: 74 445 times
    Version: 1.1
    Category: Tutorials

    How to create a breadcrumb widget

    Created 17 years ago by knut knut, updated 14 years ago by Yang He Yang He. 4 comments

    Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

    10 0
    11
    Viewed: 90 196 times
    Version: 1.1
    Category: Tutorials

      How to set up Unicode

      Created 17 years ago by Mike Mike, updated 13 years ago by Roman Solomatin Roman Solomatin. 10 comments

      To fix issues with display of special language characters once and for all there's a solution: use Unicode UTF-8 everywhere. If everything is set up to use Unicode, you can use mostly every language in your application.

      19 0
      14
      Viewed: 152 239 times
      Version: 1.1
      Category: How-tos