Wiki articles

Showing 161-180 of 822 items.

Custom Autocomplete Display and Value Submission

Created 12 years ago by Antonio Ramirez, updated 11 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: 60 884 times
Version: 1.1
Category: How-tos

Display a nice exception message on ajax requests

Created 12 years ago by Maurizio Domba Cerin, updated 12 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: 49 127 times
Version: 1.1
Category: Tips

Customizing Yii's formatting rules (extending CFormatter)

Created 12 years ago by Haensel, updated 12 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: 22 873 times
Version: 1.1
Category: Tips

Yii2 - Upgrading to Bootstrap 4

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

Yii2 - Converting from Bootstrap3 to Bootstrap4

12 0
6 followers
Viewed: 76 790 times
Version: 2.0
Category: How-tos

Using the jqueryslidemenu plugin with CMenu

Created 13 years ago by Antonio Ramirez, updated 13 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: 41 879 times
Version: 1.1
Category: How-tos

How to re enable logging during unit testing

Created 12 years ago by Asgaroth, updated 12 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: 25 487 times
Version: 1.1
Category: How-tos

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

Created 14 years ago by qiang, updated 11 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: 51 408 times
Version: 1.1
Category: Tutorials
Tags:

How to use ldap in UserIdentity for authentication

Created 14 years ago by BeerSerc, updated 10 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: 90 185 times
Version: 1.1
Category: Tutorials

Setting and getting systemwide static parameters

Created 13 years ago by Steve Friedl, updated 13 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: 146 211 times
Version: 1.1
Category: How-tos
Tags: config

Configuring controller access rules to default-deny

Created 13 years ago by Steve Friedl, updated 10 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: 105 350 times
Version: 1.1
Category: How-tos

Using Bootstrap with LESS

Created 11 years ago by Chris83, updated 11 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: 55 657 times
Version: 1.1
Category: How-tos
11 0
20 followers
Viewed: 32 874 times
Version: 1.1
Category: How-tos

Move sources to src

Created 4 years ago by samdark, updated 4 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
6 followers
Viewed: 14 427 times
Version: 2.0
Category: How-tos

Accessing data in a join table with the related models

Created 12 years ago by fsb, updated 11 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: 146 499 times
Version: 1.1
Category: How-tos

Directory independent extensions

Created 13 years ago by GOsha, updated 13 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: 16 882 times
Version: 1.1
Category: Tips

How to create a wrapper for a js library

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

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

16 1
20 followers
Viewed: 22 795 times
Version: 1.1
Category: How-tos

How to create a breadcrumb widget

Created 15 years ago by knut, updated 11 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: 83 883 times
Version: 1.1
Category: Tutorials
Tags:

Front-end developer's guide

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

This wiki is a work in progress.

10 0
19 followers
Viewed: 40 570 times
Version: 1.1
Category: Tutorials

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 12 years ago by c@cba, updated 10 years ago by nsanden.

Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue').
We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options.
The main code was contributed by zaccaria in the forum (see [this post](...

10 0
11 followers
Viewed: 51 251 times
Version: 1.1
Category: How-tos

Simple Share Widget for Facebook, twitter and google+

Created 12 years ago by softark, updated 9 years ago by Rohit Suthar.

This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

10 0
16 followers
Viewed: 32 352 times
Version: 1.1
Category: How-tos