Wiki articles

Showing 141-160 of 651 items.

Customizing the CMenu Widget

Created 10 years ago by mistryb, updated 9 years ago by mistryb.

The CMenu class provides some useful features for generating menus in your web application.

1 0
4 followers
Viewed: 67 853 times
Version: 1.1
Category: Tips

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 852 times
Version: 1.1
Category: Tutorials

How to customize Yii core messages?

Created 15 years ago by qiang, updated 11 years ago by Yang He.

Yii core messages refer to static text strings in the core Yii framework code which are meant to be displayed to end-users (e.g. core exception messages, default validation error messages). Customization of these core messages is needed in two circumstances:

17 0
16 followers
Viewed: 67 801 times
Version: 1.1
Category: Tutorials

Create custom button button with AJAX function in CGridView

Created 11 years ago by nkd, updated 11 years ago by nkd.

This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.

5 0
15 followers
Viewed: 67 412 times
Version: 1.1
Category: How-tos

Use shortcut functions to reduce typing

Created 14 years ago by qiang, updated 11 years ago by Yang He.

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 followers
Viewed: 66 717 times
Version: 1.1
Category: Tutorials
Tags:

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 14 years ago by mindeh, updated 8 years ago by Boaz.

Original source code and idea are from: PHP, PDO & Nested Transactions.

41 0
26 followers
Viewed: 66 534 times
Version: 1.1
Category: How-tos

How to avoid multiple Ajax Request

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

CHtml::ajaxLink(), CHtml::ajaxSubmitButton() and similar methods are great, but if they are located inside a portion of the page that is already loaded via ajax something bad will happen, something you may even not notice if you are not using tools like firebugs...

17 0
27 followers
Viewed: 66 213 times
Version: 1.1
Category: How-tos

htmlOptions explained for various controls.

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

Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

15 0
14 followers
Viewed: 65 846 times
Version: 1.1
Category: Tips

Moving project code outside of webroot (plus multiple project support)

Created 13 years ago by Steve Friedl, updated 12 years ago by Steve Friedl.

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 64 943 times
Version: 1.1
Category: How-tos

Sort and filter a custom or composite CGridView column - that may even contain data from different tables.

Created 10 years ago by Gerhard Liebenberg, updated 7 years ago by Gerhard Liebenberg.

I have a table (account) which contains "General Ledger" accounts. Each account has its own account_description - such as 'inventory', 'sales', etc.

6 0
6 followers
Viewed: 64 874 times
Version: 1.1
Category: How-tos

Using CAutoComplete to display one value and submit another

Created 15 years ago by luoshiben, updated 11 years ago by mohammad sharif ahrari.

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 followers
Viewed: 64 415 times
Version: 1.1
Category: Tutorials
1 0
6 followers
Viewed: 64 411 times
Version: 1.1
Category: Tips

Single sign on across multiple subdomains

Created 13 years ago by ianaré, updated 13 years ago by ianaré.

This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

29 0
37 followers
Viewed: 64 325 times
Version: 1.1
Category: How-tos

Create sitemap.xml file dynamically on root folder with one hit

Created 11 years ago by kiran sharma, updated 11 years ago by kiran sharma.

I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.

2 1
9 followers
Viewed: 63 668 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML

Using CJuiDatePicker for CGridView filter

Created 12 years ago by softark, updated 10 years ago by Kostas Apazidis (KonApaz).

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 63 642 times
Version: 1.1
Category: How-tos

Real-time display of server push data using Server-Sent Events (SSE)

Created 11 years ago by bennouna, updated 10 years ago by bennouna.

Let's say you have an internal messaging system in your webapp, and you want to display messages dynamically and real-time to the relevant recipients.

9 0
17 followers
Viewed: 63 481 times
Version: 1.1
Category: How-tos

Adding Yii Search to Your Browser Search Box

Created 13 years ago by qiang, updated 6 years ago by CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 63 469 times
Version: all
Category: Tips

How to filter CGridView with From Date and To Date datepicker

Created 11 years ago by kiran sharma, updated 11 years ago by kiran sharma.

This artical is related to allow user to filter CGridView with date range using datepicker on submit button. Here I use Yii Cookie to preserve date in datepicker textbox after submitting the form.

9 0
26 followers
Viewed: 63 255 times
Version: 1.1
Category: Tips

Creating a database-driven hierarchical Structure combined with CMenu and superfish

Created 14 years ago by thyseus, updated 12 years ago by thyseus.

Note: Please also take a look at the newer EMenu extension. This works even better that the deprecated CDropDownMenu!

15 0
24 followers
Viewed: 62 978 times
Version: 1.1
Category: Tutorials
Tags: menu

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 871 times
Version: 1.1
Category: Tutorials