Wiki articles

Showing 501-520 of 823 items.

Simple access control

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

For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

3 7
10 followers
Viewed: 47 860 times
Version: 1.1
Category: Tutorials

Access log output from unit tests

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

Say, you want to write a test for a component which provides a caching feature. How would you know, that some method of your component returns a cached result? With the solution described here you can inspect all log outputs. So you could search the logs for accesses to the DB to really make sure, that the result was served from cache.

3 0
2 followers
Viewed: 16 875 times
Version: 1.1
Category: Tips

Show captcha after <N> unsuccessfull attempts

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

In this mini howto I would like to show how to add a required captcha field in the login form, after a defined number of unsuccessfull attempts. To do this, I will use the blog demo that you have in default Yii download package (path/to/yii/demos/blog).

13 4
15 followers
Viewed: 36 424 times
Version: 1.1
Category: How-tos

CSV Export

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

I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.

4 0
5 followers
Viewed: 31 918 times
Version: 1.1
Category: How-tos
Tags: csv, export

Importing CSV file to mysql table using "LOAD DATA" command.

Created 13 years ago by sirin k sirin k, updated 8 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

hi, Here i am giving you some simple step to import huge data from a csv file to your mysql table.this is useful when you have a very huge data to import from csv format.

5 0
20 followers
Viewed: 72 433 times
Version: 1.1
Category: Tips
Tags: csv, import, mysql

Adding Bash Command Completion for Yii Commands

Created 13 years ago by Dustin Oprea Dustin Oprea, updated 13 years ago by Dustin Oprea Dustin Oprea.

This article discusses the installation/configuration of the YiiBash project (https://github.com/dsoprea/YiiBash).

3 0
5 followers
Viewed: 15 516 times
Version: 1.1
Category: How-tos

Radio Button List with enum values for column of type ENUM >+> incorporate into giix

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

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 Radio Button List, which has the enum values as options.
This is a rewrite of c@cba in the wiki article of [enumDropdownList](http://www...

6 0
3 followers
Viewed: 26 612 times
Version: 1.1
Category: How-tos

Use phing to make Yii application "installable"

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

To use this "how-to", you need to install phing in your machine.

7 0
10 followers
Viewed: 15 972 times
Version: 1.1
Category: How-tos
Tags: phing

Storing your images in your table's blob field and displaying that stored images.

Created 13 years ago by sirin k sirin k, updated 8 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

He im giving you a very simple example ie how you can store an image to your blob field in a table.Hope you already familiar with the normal image upload.

8 2
11 followers
Viewed: 50 606 times
Version: 1.1
Category: How-tos
Tags: blob, image

Displaying image in a CGridView column.

Created 13 years ago by sirin k sirin k, updated 8 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.

9 1
14 followers
Viewed: 76 569 times
Version: 1.1
Category: How-tos

MVC primer and 5 minute form walkthrough

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

This tutorial assumes some basic knowledge of Yii and a functional development environment.

8 0
6 followers
Viewed: 31 349 times
Version: 1.1
Category: Tutorials

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

Created 13 years ago by bennouna bennouna, updated 11 years ago by bennouna 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: 65 771 times
Version: 1.1
Category: How-tos

Simple RBAC

Created 13 years ago by hasanavi hasanavi, updated 13 years ago by Stageline Stageline.

If you need simple Role based access control without the long RBAC process then this article is just for you. Lets jump to the point.

33 1
43 followers
Viewed: 124 854 times
Version: 1.1
Category: Tutorials

Events explained

Created 13 years ago by pligor pligor, updated 12 years ago by Ivo Renkema Ivo Renkema.

Let's see what exactly are the events in Yii!

16 3
24 followers
Viewed: 58 631 times
Version: 1.1
Category: Tutorials

Widget Personalizado

Created 13 years ago by Cálcio Cálcio, updated 10 years ago by Cálcio Cálcio.

$this->render('index', array( 'dataProvider' => $dataProvider, )); `

6 0
4 followers
Viewed: 11 374 times
Version: 1.1
Category: Tutorials

CGridView keep state of page and sort.

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

Remember-filters-gridview is one of the must-use extension on all of my project. However, it lacks of storing the page and sort variables of the grid view.

5 0
13 followers
Viewed: 36 818 times
Version: 1.1
Category: How-tos

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Created 13 years ago by Gerhard Liebenberg Gerhard Liebenberg, updated 11 years ago by Gerhard Liebenberg Gerhard Liebenberg.

Many desktop programmers are used to having dynamic forms, where clicking on a record in a parent sub-form, updates another sub-form with the child records. While having many levels of nested sub-forms in a single view might not be such a good idea for a web application, I thought doing it one level deep might be interesting and useful. But, instead of sub-forms I used CGridViews.

Integrating Wordpress and Yii: still another approach, using Yii as the router/controller

Created 13 years ago by acorncom acorncom, updated 12 years ago by acorncom acorncom.

When you're finished following this article, you'll have a website that integrates WordPress and Yii routes in under one path. For example, you can setup /widgets and /customers to point to Yii controllers and /about-us, /contact-us, /blog/* and /faq pointing to WordPress pages.

19 0
24 followers
Viewed: 88 613 times
Version: 1.1
Category: How-tos

Using loginRequiredAjaxResponse to solve ajax session timeout

Created 13 years ago by Rutger Rutger, updated 8 years ago by Rutger Rutger.

This solution requires Yii 1.1.9 or above

12 0
16 followers
Viewed: 41 571 times
Version: 1.1
Category: How-tos

How to catch and log MySQL deadlock errors

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

This method allows to log InnoDB monitor output when deadlock error occured. This way we will have much more useful data to find and fix deadlock.

4 0
7 followers
Viewed: 22 131 times
Version: 1.1
Category: Tips
Tags: database