Wiki articles

Showing 161-180 of 823 items.

Custom Autocomplete Display and Value Submission

Created 13 years ago by Antonio Ramirez, updated 13 years ago by SebK.

I was looking around wiki and found that was no approach as the one I did so I guessed this is worth to write.

12 0
18 followers
Viewed: 62 575 times
Version: 1.1
Category: How-tos

Display a nice exception message on ajax requests

Created 13 years ago by Maurizio Domba Cerin, updated 13 years ago by Maurizio Domba Cerin.

in Yii versions previous to 1.1.9 exceptions was handled differently during ajax request and displayed by CApplication::displayException(). This way the exception message displayed on ajax requests could not be customized.
The message for the CGridView delete request with YII_DEBUG set to true l...

12 0
19 followers
Viewed: 50 341 times
Version: 1.1
Category: Tips

Customizing Yii's formatting rules (extending CFormatter)

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

CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model)...

12 0
6 followers
Viewed: 23 757 times
Version: 1.1
Category: Tips

Yii2 - Upgrading to Bootstrap 4

Created 5 years ago by Richard Pillay, updated 5 years ago by Richard Pillay.

Yii2 - Converting from Bootstrap3 to Bootstrap4

12 0
6 followers
Viewed: 112 083 times
Version: 2.0
Category: How-tos

Using the jqueryslidemenu plugin with CMenu

Created 14 years ago by Antonio Ramirez, updated 14 years ago by pc131.

Yii makes it really easy for all to use their already made objects that automate everything we do. It provides also great power of flexibility and styling but hey, we programmers tend to complicate our lives and push a little more the power of our tools.

18 1
8 followers
Viewed: 43 327 times
Version: 1.1
Category: How-tos

How to re enable logging during unit testing

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

Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

11 0
10 followers
Viewed: 26 732 times
Version: 1.1
Category: How-tos

How to create/save more Model inputs and make them repeatable with jQuery

Created 16 years ago by qiang, updated 13 years ago by Yang He.

This is the first real problem that I encountered using Yii, trying to make a Model input repeatable in the form, validate and save them.

11 0
16 followers
Viewed: 53 553 times
Version: 1.1
Category: Tutorials
Tags:

How to use ldap in UserIdentity for authentication

Created 15 years ago by BeerSerc, updated 11 years ago by Navarr.

Yii does not have an LDAP class itself, but its very easy to implement LDAP in the stock UserIdentity class.

11 0
18 followers
Viewed: 98 865 times
Version: 1.1
Category: Tutorials

Relational Query - Lazy Loading and Eager Loading in Yii 2.0

Created 9 years ago by softark, updated 6 years ago by samdark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's very important to know how the Eager Loading approach works in Yii 2. It has changed drastically from that of Yii 1.1, and there are common misunderstandings about it in the community.

11 0
6 followers
Viewed: 61 187 times
Version: 2.0
Category: Tutorials

Setting and getting systemwide static parameters

Created 14 years ago by Steve Friedl, updated 14 years ago by Steve Friedl.

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12 followers
Viewed: 149 417 times
Version: 1.1
Category: How-tos
Tags: config

Configuring controller access rules to default-deny

Created 14 years ago by Steve Friedl, updated 11 years ago by nsanden.

Starting with the blog tutorial, Yii developers are familiar with the notion of access rules defined in the controller, where the actions are allowed or denied depending on the user's name or role.

class CommentController extends CController {
    public function filters()
    {
        return array( 'accessControl' ); // perform access control for CRUD operations
    }

11 0
12 followers
Viewed: 141 147 times
Version: 1.1
Category: How-tos

Using Bootstrap with LESS

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

I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular [bootstrap extension](http://ww...

11 0
14 followers
Viewed: 57 389 times
Version: 1.1
Category: How-tos
11 0
20 followers
Viewed: 34 234 times
Version: 1.1
Category: How-tos

How to hide /frontend/web in url addresses on apache

Created 10 years ago by raminious, updated 10 years ago by jim..

There is an issue on Yii2 to redirecting / urls to /frontend/web.
In other words we need a way to hidden /frontend/web from addresses.
We will do this without changing Apache configuration and creating virtual host or setting document root (It's good for share hostings that we have not access to apache.conf)

11 0
22 followers
Viewed: 130 257 times
Version: 2.0
Category: How-tos

Move sources to src

Created 5 years ago by samdark, updated 5 years ago by samdark.

Yii 3 and many Yii 2 package sources are contained within src directory which is convenient since you have less directories to check.

11 0
5 followers
Viewed: 15 887 times
Version: 2.0
Category: How-tos

Accessing data in a join table with the related models

Created 13 years ago by fsb, updated 12 years ago by krowe.

Sometimes the right place to store application data is in a join table. For example, movie viewers either like or don’t like the movies they watched.

16 1
30 followers
Viewed: 149 104 times
Version: 1.1
Category: How-tos

Directory independent extensions

Created 14 years ago by GOsha, updated 14 years ago by GOsha.

Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

// take the curr...
16 1
7 followers
Viewed: 17 932 times
Version: 1.1
Category: Tips

How to create a wrapper for a js library

Created 14 years ago by zaccaria, updated 14 years ago by Maurizio Domba Cerin.

This wiki will explain how to include a javascript library in a widget.

16 1
20 followers
Viewed: 24 144 times
Version: 1.1
Category: How-tos

How to create a breadcrumb widget

Created 16 years ago by knut, updated 13 years ago by Yang He.

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

Front-end developer's guide

Created 13 years ago by jonah, updated 13 years ago by waitekk.

This wiki is a work in progress.

10 0
19 followers
Viewed: 42 578 times
Version: 1.1
Category: Tutorials