Wiki articles

Showing 161-180 of 651 items.

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 353 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 877 times
Version: 1.1
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 503 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 883 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 796 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 573 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 256 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

Using CJuiDialog to display flash Messages in Dialogues

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

In order to nicely display flash Messages, create view like this called views/site/dialog.php :

10 0
9 followers
Viewed: 28 758 times
Version: 1.1
Category: Tutorials
Tags:
10 0
15 followers
Viewed: 41 151 times
Version: all
Category: Others

Styling Radio Buttons

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

The default behavior with radio button lists is ugly, and I figured out mostly how to style them a coupla different ways. I'll used the blog tutorial example (but with my own posting modes):

10 0
9 followers
Viewed: 69 016 times
Version: 1.1
Category: Tips

Search method of a model for filters when using dates - unixtimestamp in database

Created 13 years ago by Mukke, updated 12 years ago by jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 37 241 times
Version: 1.1
Category: Tips

Updating fields on a form with Ajax and Json

Created 13 years ago by Russell England, updated 13 years ago by Russell England.

I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

10 0
22 followers
Viewed: 95 337 times
Version: 1.1
Category: How-tos

CKEditor Integration (includes steps for file uploads) - Step by Step

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

Hey guys, I'm hoping other people will find this helpful. Today I went through the process of adding CKEditor to one of my projects, and then integrating KCFinder as the image uploader. It will be used in a CActiveForm, without the use of any crazy weird widgets. All paths are relative, using Yii functions, so this will work no matter where you install. Here it is:

10 0
22 followers
Viewed: 71 572 times
Version: 1.1
Category: How-tos

Logout CSRF Protection

Created 12 years ago by Rodrigo Coelho, updated 12 years ago by Rodrigo Coelho.

CSRF is the acronymn for Cross-site request forgery.
It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

10 0
11 followers
Viewed: 29 564 times
Version: 1.1
Category: Tutorials

Integrating HybridAuth directly into Yii without an extension

Created 11 years ago by biz dev, updated 10 years ago by biz dev.

This article tries to explain the steps required in integrating the HybridAuth into Yii directly, without using an extension.

10 0
15 followers
Viewed: 51 144 times
Version: 1.1
Category: How-tos

Introducción al control de acceso basado en roles (RBAC)

Created 13 years ago by Juan Calvo, updated 13 years ago by Juan Calvo.

Todos los que hemos empezado a utilizar Yii para crear aplicaciones Web, nos hemos dado de bruces cuando hemos intentado poner a funcionar el RBAC (acceso de control basado en roles).

15 1
9 followers
Viewed: 73 505 times
Version: 1.1
Category: Tutorials

A simple action for CJuiAutoComplete

Created 13 years ago by tydeas_dr, updated 12 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 49 042 times
Version: 1.1
Category: Tips