Wiki

Sorted by commentsX
Displaying 81-90 of 693 result(s).

Organize directories for applications with front-end and back-end

Created 5 years ago by qiangTutorials10 comments – viewed 60,788 times – ( +28 ) – version 1.1
Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing directories of the code for both ends.

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

Created 2 years ago by c@cbaTutorials10 comments – viewed 26,631 times – ( +15 ) – version 1.1
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 name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.

Behaviors & events

Created 5 years ago by pestaaTutorials10 comments – viewed 87,759 times – ( +50 ) – version 1.1
These features provide endless possibilities and unbelievable flexibility, but as current documentation does not give more than a few examples, it might be difficult to fully understand their internals and requirements.

Getting the Most out of APC for Yii

Created 2 years ago by Da:SourcererHow-tos10 comments – viewed 25,764 times – ( +16 ) – version 1.1
The Advanced PHP Cache is a PHP extension which primarily serves as an opcode cache for PHP. The basic idea is to save PHP from re-evaluating the PHP code to intermediate bytecode on each request. Installing and enabling APC already yields a significant performance benefit. However, APC is not a black box that will magically change all for the better. More over it is important to understand that APC needs memory to operate.
tags: caching, apc

Display an AJAX tree from your DB using CTreeView

Created 4 years ago by Fran├žois GannazTutorials10 comments – viewed 46,000 times – ( +21 ) – version 1.1
This example uses a MySQL DB with a table named tree with the fields id, name, and parent_id. The parent_id will be NULL for root elements. The SQL is kept simple (no autoinc, no FK, etc).
tags: AJAX, CTreeView

Increasing AR performance in connections with Oracle

Created 3 years ago by TrejderHow-tos10 comments – viewed 16,697 times – ( +1 ) – version 1.1
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.

Creating and updating model and its related models in one form, inc. image

Created 2 years ago by BoazHow-tos10 comments – viewed 49,078 times – ( +5 / -3 ) – version 1.1
We start slowly and simple...

Using Yii with Nginx and PHP-FPM

Created 3 years ago by LericHow-tos10 comments – viewed 41,292 times – ( +17 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

Understanding "Safe" Validation Rules

Created 3 years ago by Steve FriedlFAQs10 comments – viewed 72,616 times – ( +90 / -1 ) – version 1.1
A common source of confusion among new Yii users is how the 'safe' validator works, how it works with other validators, and why it's necessary in the first place. This article means to clear up this confusion, as well as explain the notion of Massive Assignment.

An Easy Solution for Dependent dropDownList Using AJAX

Created about a year ago by mrsTips10 comments – viewed 48,905 times – ( +11 / -1 ) – version 1.1
Sometimes new Yii guys face problem to manage dependent dropDownList using AJAX. I am going to discuss an easy solution about this issue.