Wiki articles in category Tips

Showing 141-158 of 158 items.

Real Time Logging

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

I've seen a lot of people asking about the logging facilities in Yii and thought I'd share a nice little class I wrote that provides near real-time logging.

13 0
17 followers
Viewed: 30 140 times
Version: 1.1
Category: Tips

Preventing CJuiTabs from hiding drop-down CMenu items

Created 8 years ago by Steve Friedl, updated 8 years ago by RusAlex.

Almost all Yii applications use CMenu at the top of each page to show options available to the user, and many include drop-down components to allow more fine-grained selection.

4 0
3 followers
Viewed: 12 643 times
Version: 1.1
Category: Tips

Yii code completion and calltips in Komodo Edit

Created 8 years ago by viter, updated 8 years ago by wei.

My favourite editor is Komodo Edit (free and crossplatform) and I use it for my everyday coding work. Just recently I found out how to make it help me to work with Yii. :) So follow these steps:

5 0
3 followers
Viewed: 13 003 times
Version: 1.1
Category: Tips

Putting Function To Be Called In View

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

Sometimes we need some complicated view to be displayed (such as generating complicated table). Most people suggest that in MVC the View must be as simple as possible (don't have too much loops, etc). So what we have to do is to hide away the complex code by putting it at somewhere else. The following are few places options to keep the function:

5 1
5 followers
Viewed: 43 410 times
Version: 1.1
Category: Tips
Tags: render, view

Auto TDD - How to auto-run PHPUnit

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

If you are lucky enough and have the privilege to develop on a Linux based environment, this little tip might boost-up your TDD process (at least the Unit Testing part). Please note, that this should work just fine with Apple computers also, but not tested!

3 0
6 followers
Viewed: 18 192 times
Version: 1.1
Category: Tips

Quick Tip about Pagination Params

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

Developing custom Grids and ListViews for my new CMS I was facing a small challenge: If I was to update/delete/batch delete items of my Grid, how would I return to the current page view?

5 0
8 followers
Viewed: 33 533 times
Version: 1.1
Category: Tips

Extending common classes to allow better customization

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

The two most commonly-used base classes in most Yii applications are CController and CActiveRecord, each extended to your own particular models and controllers.

36 0
19 followers
Viewed: 34 302 times
Version: 1.1
Category: Tips
Tags:

ChromePHP for Yii

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

ChromePHP is a console logging extension for Google Chrome.

3 1
4 followers
Viewed: 15 195 times
Version: 1.1
Category: Tips

Styling Radio Buttons

Created 8 years ago by Steve Friedl, updated 8 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: 59 352 times
Version: 1.1
Category: Tips

Directory independent extensions

Created 8 years ago by GOsha, updated 8 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: 13 852 times
Version: 1.1
Category: Tips

Adding Yii Search to Your Browser Search Box

Created 8 years ago by qiang, updated a year ago by CeBe.

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6 followers
Viewed: 50 603 times
Version: all
Category: Tips

Code style

Created 8 years ago by zaccaria, updated 8 years ago by g3ck0.

Often, when writing widgets or editing Yii code, it is unclear whether or not the code is following the MVC pattern.

29 0
7 followers
Viewed: 21 850 times
Version: 1.1
Category: Tips
Tags: mvc

Using Yii with Oracle through PDO

Created 8 years ago by Trejder, updated 8 years ago by waterloomatt.

When you are developing an webapp with Yii that will be using Oracle RDBMS you should take a look at these issues in which you may run into it.

1 0
7 followers
Viewed: 57 970 times
Version: 1.1
Category: Tips

Extending CActiveForm for some form display fixes and language tweaks

Created 8 years ago by Trejder, updated 8 years ago by 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: 19 558 times
Version: 1.1
Category: Tips

Saving files to a blob field in the database

Created 8 years ago by zaccaria, updated 8 years ago by 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.

5 2
17 followers
Viewed: 66 407 times
Version: 1.1
Category: Tips

Configuring PhpStorm IDE for Yii 1.1

Created 8 years ago by samdark, updated a year ago by samdark.
  • Complete code: Ctrl+Space.
  • Show method arguments: Ctrl+Q.
59 1
53 followers
Viewed: 135 036 times
Version: 1.1
Category: Tips
Tags: IDE, PhpStorm

Ajax update

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

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

16 2
14 followers
Viewed: 52 569 times
Version: 1.1
Category: Tips
Tags: AJAX

Reading the doc

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

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

21 0
3 followers
Viewed: 9 501 times
Version: 1.1
Category: Tips
Tags: doc