Wiki articles

Showing 461-480 of 651 items.

Sub-domains with different databases in Yii!

Created 13 years ago by jwerd, updated 13 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: 26 218 times
Version: 1.1
Category: How-tos

Creating a parameterized LIKE query

Created 13 years ago by Steve Friedl, updated 12 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: 144 547 times
Version: 1.1
Category: FAQs

Single table inheritance

Created 13 years ago by samdark, updated 13 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
35 followers
Viewed: 53 699 times
Version: 1.1
Category: How-tos

Local time zones and locales

Created 13 years ago by Russell England, updated 13 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
23 followers
Viewed: 100 928 times
Version: 1.1
Category: How-tos

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

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

Implementing a Registration Process using the yii-user-management module

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

Hi Folks,

7 0
21 followers
Viewed: 80 231 times
Version: 1.1
Category: Tutorials

Using Pear Mail Mail_Mime and Mail_Queue

Created 13 years ago by Loren, updated 13 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: 16 056 times
Version: 1.1
Category: How-tos

A simple class to use a different db for a module

Created 13 years ago by tydeas_dr, updated 13 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: 30 339 times
Version: 1.1
Category: Tips

config Use MS SQL SERVER 2005 2008.

Created 13 years ago by vcxz_1982, updated 12 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: 76 779 times
Version: 1.1
Category: Tutorials

Implementing a User Level Access System

Created 13 years ago by Antonio Ramirez, updated 10 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: 71 586 times
Version: 1.1
Category: Tutorials

Logout CSRF Protection

Created 13 years ago by Rodrigo Coelho, updated 13 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: 30 305 times
Version: 1.1
Category: Tutorials

Getting nulls from database instead of empty strings

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

To get null from database instead of empty strings you need to set up your DB connection as follows:

13 0
11 followers
Viewed: 20 606 times
Version: 1.1
Category: Tips
Tags: database, null

Converting an Artisteer Theme to Yii

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

There are two approaches to converting an Artisteer theme. The first is to simply copy an existing Artisteer – based Yii theme, overlay the CSS and images, then make any necessary tweaks to the layout files. This is undoubtedly the fastest route, but won't teach you as much as doing it from scratch. That's ok. Sometimes getting the job done is the top priority. The second approach is more gen...

6 0
12 followers
Viewed: 30 588 times
Version: 1.1
Category: How-tos

How to write a simple application component

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

An application component is a confortable way for share information among all component of the application

15 7
14 followers
Viewed: 75 620 times
Version: 1.1
Category: How-tos

How to generate Yii-like Documentation

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

Something a good application cant miss is documentation, and what would be better than some nice formatted HTML documentation that can be auto-generated from your code, we know several tools that already do this like phpDocumentor, but today we are introducing Yii Docs Generator...

41 0
42 followers
Viewed: 48 820 times
Version: 1.1
Category: How-tos
Tags: doc

CListView AJAX filtering

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

This tutorial shows how to filter CListView items by AJAX, and it's compatible with disabled JavaScript users
In my case this has been done to filter users list

13 0
27 followers
Viewed: 78 636 times
Version: 1.1
Category: Tutorials

Syntax check

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

This will syntax check each php file recursively from the current directory.

4 0
2 followers
Viewed: 15 169 times
Version: 1.1
Category: Tips
Tags: php, syntax

Using International Dates

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

So here is my complete solution - note that I'm using the 'short' date format throughout.

15 0
24 followers
Viewed: 49 808 times
Version: 1.1
Category: How-tos

A simple action for XUpload extension

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

All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action

3 0
5 followers
Viewed: 20 559 times
Version: 1.1
Category: Tips

Relations: BELONGS_TO versus HAS_ONE

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

It's very common to see new Yii users confusing the relations HAS_ONE and BELONGS_TO, and getting it wrong means you won't get proper values back. And though we'll talk about HAS_MANY as well, we're specifically omitting the MANY_MANY relation because it's a whole different animal.

56 0
35 followers
Viewed: 164 558 times
Version: 1.1
Category: FAQs