Wiki articles

Showing 181-200 of 799 items.

Logout CSRF Protection

Created 8 years ago by Rodrigo Coelho, updated 8 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: 22 346 times
Version: 1.1
Category: Tutorials

Implementing a User Level Access System

Created 8 years ago by Antonio Ramirez, updated 5 years ago by Phil Loaiza.

Please note that this article is a simple example and good security should be taken into account when we play with authentication systems.

27 0
37 followers
Viewed: 59 158 times
Version: 1.1
Category: Tutorials

config Use MS SQL SERVER 2005 2008.

Created 8 years ago by vcxz_1982, updated 7 years ago by Asgaroth.

Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss. So I change to use SQL SERVER 2008 EXPRESS.

3 0
8 followers
Viewed: 61 729 times
Version: 1.1
Category: Tutorials

A simple class to use a different db for a module

Created 8 years ago by tydeas_dr, updated 8 years ago by Maurizio Domba Cerin.

What would you do if you want/need to have a different than the main database connection in an module's models?

8 0
12 followers
Viewed: 23 637 times
Version: 1.1
Category: Tips

Using Pear Mail Mail_Mime and Mail_Queue

Created 8 years ago by Loren, updated 8 years ago by Loren.

require_once 'Mail.php'; // PEAR Mail require_once 'Mail/mime.php'; // PEAR Mail_mime require_once 'Mail/Queue.php'; // PEAR Mail_queue require_once 'Mail/Queue/Container/mdb2.php'; // PEAR Mail_queue mdb2

7 0
11 followers
Viewed: 13 488 times
Version: 1.1
Category: How-tos
7 0
21 followers
Viewed: 71 000 times
Version: 1.1
Category: Tutorials

[PT-BR] Proteção Contra Logout CSRF

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

CSRF é o acrônimo para Cross-site request forgery.
CSRF é um ataque que forca o usuário a executar ações não desejadas numa aplicação Web na qual ele está autenticado.

2 1
3 followers
Viewed: 10 185 times
Version: 1.1
Category: Tutorials

Local time zones and locales

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

The sql 'set time_zone' ensures that all dates retrieved are in UTC time. If your MySql server has the time zone names installed then use 'UTC' instead of '+00:00'.

Components

Copy the code at the end of this wiki for LocalTime.php and DefaultDateTimeParser.php int...

13 2
24 followers
Viewed: 82 385 times
Version: 1.1
Category: How-tos

Single table inheritance

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

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
36 followers
Viewed: 44 156 times
Version: 1.1
Category: How-tos

Creating a parameterized LIKE query

Created 8 years ago by Steve Friedl, updated 7 years ago by Asgaroth.

It's common to see users wishing to make substring DB queries, using the % metacharacter used to match anything; in this FAQ we'll search the tbl_comments table from the blog tutorial hoping to find the text in $match in the content column

13 0
21 followers
Viewed: 105 803 times
Version: 1.1
Category: FAQs

Sub-domains with different databases in Yii!

Created 8 years ago by jwerd, updated 8 years ago by jwerd.

I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...

2 0
12 followers
Viewed: 20 016 times
Version: 1.1
Category: How-tos

How to use EzComponents in Yii

Created 8 years ago by Ehsanjs, updated 7 years ago by samdark.

change your index.php

4 0
6 followers
Viewed: 10 669 times
Version: 1.1
Category: How-tos

Integrating Yii with Wordpress

Created 8 years ago by isekream, updated 8 years ago by isekream.

Well I finally had some time and tinkered a bit with the notion of integrating wordpress and Yii. Now for me I wanted to use Yii as a framework to develop wordpress plugins. Using some tips from imasia Article I was able to do a simple integration of yii as a wordpress plugin. The integratio...

9 1
13 followers
Viewed: 63 934 times
Version: 1.1
Category: Tips

How to create a wrapper for a js library

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

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

16 1
21 followers
Viewed: 17 540 times
Version: 1.1
Category: How-tos

Using CJuiDialog to edit rows in a CGridView

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

I used Zaccarias excellent article as the base http://www.yiiframework.com/wiki/145/cjuidialog-for-create-new-model/

Solution

First follow the wiki above to create all the required code. Then make the following modifications in your...

3 1
11 followers
Viewed: 37 076 times
Version: 1.1
Category: Tips

How to show ajax delete status in CGridView like flash messages

Created 8 years ago by hasanavi, updated 6 years ago by adlersd.

I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully dele...

17 0
30 followers
Viewed: 50 289 times
Version: 1.1
Category: How-tos

Using MBMenu and Rights to automatically create menu item for your modules

Created 8 years ago by dinhtrung, updated 8 years ago by dinhtrung.

Using Rights generator component, we can easily create a dynamic menu, in which we scan every modules' controllers, to access the index page of them.

1 1
2 followers
Viewed: 16 313 times
Version: 1.1
Category: Tips

BaseModuleAR class with MultiActiveRecord

Created 8 years ago by dinhtrung, updated 8 years ago by Gustavo.

MultiActiveRecord is an extension that add support for multiple database connection for your application.

2 0
0 follower
Viewed: 11 228 times
Version: 1.1
Category: Tips

How to use an application behavior to maintain runtime configuration

Created 8 years ago by zaccaria, updated 7 years ago by Pablovp.

In this tutorial will be explained a method to manage some configuration runtime. This excellent tutorial follows a similar approach, but requires to write a masterclass which all controllers are supposed to extend, following this wiki you can achieve the same by only editing the configuration.

26 0
26 followers
Viewed: 35 828 times
Version: 1.1
Category: How-tos

Multilanguage web site controlling by get request and database allowed languages

Created 8 years ago by Igor Ivanovic, updated 7 years ago by rei.

First, you have to have create database table for default language and allowed languages.

CREATE TABLE IF NOT EXISTS `tbl_languages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lang` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `flagpath` varchar(40) CHARACTER SET utf8 COLLATE utf8_unicode_...
5 0
13 followers
Viewed: 25 066 times
Version: 1.1
Category: Tutorials