Wiki

Sorted by date (updated)X
Displaying 431-440 of 683 result(s).

CSS, JS and image URL shortcut methods

Updated 2 years ago by jonahTutorials2 comments – viewed 19,748 times – ( +2 / -1 ) – version 1.1
Below I have created an Html helper with methods to help me locate directories of my assets dynamically. Such assets may include CSS, JavaScript and images.
tags: URL

Add information to Yii::app()->user by extending CWebUser

Updated 2 years ago by Yang HeTutorials10 comments – viewed 91,624 times – ( +30 ) – version 1.1
This little tutorial explains a way how you can retrieve more parameters from Yii::app()->user by adding a component that extends CWebUser and retrieves the user information from database table named User.

Using the configuration file, explain what can be configured.

Updated 2 years ago by Yang HeTutorials0 comments – viewed 45,595 times – ( +20 ) – version 1.1
The purpose of this post is to let anyone quickly find how to accomplish a configuration task, and list here all the posibilities of the config.php file and also link to pages that explain how is each thing implemented.

Using search engine and user friendly URLs

Updated 2 years ago by Yang HeTutorials6 comments – viewed 57,677 times – ( +22 / -1 ) – version 1.1
The Definitive Guide introduces the fundamentals of managing URLs in a Yii application. In this tutorial, we introduce a practical technique that can quickly turn your application into using search-engine-friendly URLs.
tags: SEO, URL

Encapsulate db and module configurations

Updated 2 years ago by Yang HeTutorials3 comments – viewed 9,135 times – ( +7 ) – version 1.1
This method was inspirated on the excellent text about different environments available at http://www.yiiframework.com/doc/cookbook/32/
tags: module

How to use default layout for error pages instead of errorXXX views

Updated 2 years ago by Yang HeTutorials1 comment – viewed 17,144 times – ( +4 ) – version 1.1
The issue is covered in "The Definite Guide to Yii" (Error Handling - Handling Errors Using an Action).

How to add ajax-loading indicators

Updated 2 years ago by Yang HeTutorials5 comments – viewed 40,314 times – ( +27 ) – version 1.1
With yii you're able to create ajax requests and updates easily. But most times you always want to show a loading indicatior to your user.
tags: AJAX

Adding login form to each page

Updated 2 years ago by Yang HeTutorials5 comments – viewed 31,027 times – ( +3 / -2 ) – version 1.1
After adding proper form to the main layout, like:

Enabling Gzip

Updated 2 years ago by Yang HeTutorials5 comments – viewed 16,873 times – ( +5 / -1 ) – version 1.1
Adding HTTP compression to your application could never have been easier!

Use shortcut functions to reduce typing

Updated 2 years ago by Yang HeTutorials8 comments – viewed 38,806 times – ( +54 ) – version 1.1
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 the problem of these lengthy typings, it is worthwhile to define global shortcut functions to some commonly used method calls. They will make the application code look cleaner.