Wiki articles

Showing 561-580 of 651 items.

Extending CActiveForm for some form display fixes and language tweaks

Created 14 years ago by Trejder Trejder, updated 14 years ago by Trejder Trejder.

In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

The colon

Here is overloaded version of CActiveForm.labelEx that adds colon (:) at the end of text of label with respecting CHtml::$afterRequiredLabel and CHtml::$beforeRequiredLabel

5 0
6 followers
Viewed: 25 647 times
Version: 1.1
Category: Tips

Saving files to a blob field in the database

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

As a follow-up from the How to upload a file using a model wiki entry that explains how to save a file to the filesystem, this article will do the same using a blob field in the database.

6 2
17 followers
Viewed: 82 420 times
Version: 1.1
Category: Tips

Using recaptchlib in your projects

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 14 years ago by Antonio Ramirez Antonio Ramirez.

It is good when someone writes extensions for us but trust, sometimes we forget about other approaches that, if we know the library, we shouldn't forget.

5 0
4 followers
Viewed: 16 455 times
Version: 1.1
Category: How-tos

Using the jqueryslidemenu plugin with CMenu

Created 14 years ago by Antonio Ramirez Antonio Ramirez, updated 14 years ago by pc131 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: 43 449 times
Version: 1.1
Category: How-tos

Configuring PhpStorm IDE for Yii 1.1

Created 14 years ago by samdark samdark, updated 7 years ago by samdark samdark.
  • Complete code: Ctrl+Space.
  • Show method arguments: Ctrl+Q.
59 1
53 followers
Viewed: 156 418 times
Version: 1.1
Category: Tips
Tags: IDE, PhpStorm

Implementing cron jobs with Yii

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

There are two ways to run a cron job:

27 2
27 followers
Viewed: 117 672 times
Version: 1.1
Category: How-tos
Tags: cli, cron

Using the jamselect widget with min and max values

Created 14 years ago by got 2 doodle got 2 doodle, updated 14 years ago by wei wei.

The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.

2 0
1 follower
Viewed: 20 296 times
Version: 1.1
Category: How-tos

Module based login

Created 14 years ago by suriyansuresh suriyansuresh, updated 14 years ago by suriyansuresh suriyansuresh.

If you want to add module based login to a site without using RBAC, please follow these guidelines.

13 0
18 followers
Viewed: 93 849 times
Version: 1.1
Category: Tutorials

CSS Naming Conventions

Created 14 years ago by qiang qiang, updated 6 years ago by samdark samdark.

In this article, we introduce a set of CSS naming conventions that we have applied in several big projects and achieved success. The goal of these naming conventions is to eliminate the possibility of naming conflicts, facilitate debugging and maintenance, and to simplify the naming process.

35 0
24 followers
Viewed: 52 528 times
Version: 1.1
Category: Tutorials

Ajax update

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

Often happens to have the need of change a part of the page with ajax.

16 2
14 followers
Viewed: 60 883 times
Version: 1.1
Category: Tips
Tags: AJAX

Reading the doc

Created 14 years ago by zaccaria zaccaria, updated 14 years ago by Orteko Orteko.

Almost all the information you need whilst working with yii is written in the Class Reference.

21 0
3 followers
Viewed: 13 485 times
Version: 1.1
Category: Tips
Tags: doc

Integrating FirePHP

Created 14 years ago by ricardograna ricardograna, updated 14 years ago by ricardograna ricardograna.
  • Install Firebug plugin for Firefox from here.
7 0
6 followers
Viewed: 19 095 times
Version: 1.1
Category: Tutorials
Tags:

NetBeans IDE and Yii projects

Created 14 years ago by marcovtwout marcovtwout, updated 10 years ago by marcovtwout marcovtwout.

This page is created to supply short directions and general tips for managing a Yii application in NetBeans IDE.

65 0
66 followers
Viewed: 255 590 times
Version: 1.1
Category: Tutorials

How to add an analogue clock widget on your skeleton application

Created 14 years ago by mocapapa mocapapa, updated 14 years ago by mocapapa mocapapa.


Followings are the simple steps to put an analogue clock widget on your skeleton application that is just generated by yiic.

1 0
1 follower
Viewed: 12 739 times
Version: 1.1
Category: Tutorials
Tags:

List with multiple checkbox

Created 14 years ago by matkaz matkaz, updated 14 years ago by matkaz matkaz.

It is a common case coders often come accross. For example the purpose of these checkbox is to mark records to be deleted

4 0
8 followers
Viewed: 41 816 times
Version: 1.1
Category: Tutorials
Tags:

Add information to Yii::app()->user by extending CWebUser (better version)

Created 14 years ago by emix emix, updated 11 years ago by Anas AbuDayah Anas AbuDayah.

I found a better solution.

5 0
10 followers
Viewed: 51 426 times
Version: 1.1
Category: Tutorials
Tags: rbac, user, Yii

Using CJuiDialog to display flash Messages in Dialogues

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

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

10 0
9 followers
Viewed: 29 602 times
Version: 1.1
Category: Tutorials
Tags:

Multiple Databases and Multiple Domains

Created 15 years ago by got 2 doodle got 2 doodle, updated 14 years ago by Maurizio Domba Cerin Maurizio Domba Cerin.

Add these lines in /config/main.php

'components'=>array(
.........
		'db'=>array(
			'connectionString' => 'mysql:host=localhost;dbname=database1',
			'emulatePrepare' => true,
			'username' => 'root',
			'password' => 'itsasecret',
			'charset' => 'utf8',
		),
		'db2'=>array(
		    'class' => 'CDbConnection',
			'connectionString' => 'mysql:host=localhost;dbname=databa...
13 2
15 followers
Viewed: 58 341 times
Version: 1.1
Category: Tutorials
Tags: database

Named scope - Get orphan AR without losing primary key

Created 15 years ago by cma cma, updated 14 years ago by Steve Friedl Steve Friedl.

Sometime, in a many-to-many relation, you need to retrieve AR that aren't linked. In practice, AR with null value in the join table. So you implements a criteria like this :

public function scopeUnused( $useAnd = true )
    {
        $join = " left outer join composed_by j on t.ID = j.ID ";
        $condition = ' j.ID Is Null';

0 0
2 followers
Viewed: 10 348 times
Version: 1.1
Category: Tutorials
Tags:

Installing WAMP - Apache, MySQL, & PHP on Windows 7

Created 15 years ago by Yeti Yeti, updated 14 years ago by Trejder Trejder.

Installing WAMP on XP was pretty easy; W7 is not so trivial. It's not difficult once you know, but it took me best part of a day to figure out and required gleaning various bits of information from around the web; this tutorial brings it all together in one place to (hopefully) make other peoples lives that bit easier. It does assume that you are reasonably happy configuring Apache, PHP, and MySQL...

2 0
1 follower
Viewed: 47 192 times
Version: 1.1
Category: Tutorials
Tags: