Wiki articles

Showing 181-200 of 822 items.

How To Customize CMenu Output

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

CMenu comes with a lot of great customization options built in but sometimes you need it to do more.

7 0
15 followers
Viewed: 68 598 times
Version: 1.1
Category: Tutorials
Tags: menu

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 845 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 835 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 794 times
Version: 1.1
Category: Tutorials

Yii2 RESTful API with OAuth 2.0

Created 6 years ago by sirin k, updated 5 years ago by sirin k.

https://cdn.pbrd.co/images/GMN5ROs.jpg

3 0
3 followers
Viewed: 67 747 times
Version: 2.0
Category: Tutorials

Aadhar Number Validator

Created a year ago by shiv.

In India have Aadhar number an we may need to valid it a input. So I created a validator for yii2

1 1
1 follower
Viewed: 67 513 times
Version: 2.0
Category: Tips
Tags: validator

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 403 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 701 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 527 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 205 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 838 times
Version: 1.1
Category: Tips

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 9 years ago by Kartik V, updated 6 years ago by alrazi.

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

3 3
48 followers
Viewed: 65 559 times
Version: 2.0
Category: Tips

Book Has Author - Many to Many relations using Kartik\Select2

Created 9 years ago by thiagoc7, updated 9 years ago by thiagoc7.

I could make this work following same useful tips from this post.

0 0
6 followers
Viewed: 64 976 times
Version: 2.0
Category: How-tos

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 937 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 870 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 402 times
Version: 1.1
Category: Tutorials
1 0
6 followers
Viewed: 64 402 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 304 times
Version: 1.1
Category: How-tos

YII2: Create console commands inside a module or extension

Created 8 years ago by MetaCrawler, updated 5 years ago by Luis Armando.

Here is a small guide how to get console commands running inside modules & extensions. For this guide I used a fresh yii2 basic application template.

8 0
6 followers
Viewed: 63 987 times
Version: 2.0
Category: Tutorials

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 657 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML