Wiki articles

Showing 41-60 of 651 items.

Performance - A Guide For Best Practice

Created 14 years ago by Y!!, updated 13 years ago by ajsharma.

In this guide I will explain best practise regarding performance in MySQL, PHP and of course our loved Yii Framework. Since this is a complex topic, I will start with some basics and then expand this guide from time to time. Since this wiki can become big, you may click on View history - there you can see what changes have been made, so you don't miss anything.

9 5
10 followers
Viewed: 27 129 times
Version: 1.1
Category: Tutorials

Quick Tip about Pagination Params

Created 13 years ago by Antonio Ramirez, updated 13 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: 62 753 times
Version: 1.1
Category: Tips

Using standard filters in CGridView custom fields

Created 13 years ago by GOsha, updated 13 years ago by jwerner.

In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0.
So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 74 019 times
Version: 1.1
Category: How-tos

Auto TDD - How to auto-run PHPUnit

Created 13 years ago by imehesz, updated 13 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: 20 744 times
Version: 1.1
Category: Tips

Putting Function To Be Called In View

Created 13 years ago by junxiong, updated 13 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: 51 760 times
Version: 1.1
Category: Tips
Tags: render, view

Setting and getting systemwide static parameters

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

Occasionally one wishes to set systemwide parameters for an application, such as a contact address for email, an application name, or setting an option that guides major behavior. Yii provides for setting of static parameters in the configuration file, and this article talks about how to do it conveniently.

11 0
12 followers
Viewed: 146 047 times
Version: 1.1
Category: How-tos
Tags: config

belajar AR : part 1 (learn AR : part 1)

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

hai teman yii... apa kabar.. kembali lagi bersama catatan saya..

0 0
1 follower
Viewed: 17 738 times
Version: 1.1
Category: Tutorials
Tags: indonesia

embed a view file of the class which implement the CAction.

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

In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/ControllerNAME, then when we use the same actions class in different controllers, we have to copy it...

1 1
2 followers
Viewed: 25 109 times
Version: 1.1
Category: Tutorials

Introducción al control de acceso basado en roles (RBAC)

Created 13 years ago by Juan Calvo, updated 13 years ago by Juan Calvo.

Todos los que hemos empezado a utilizar Yii para crear aplicaciones Web, nos hemos dado de bruces cuando hemos intentado poner a funcionar el RBAC (acceso de control basado en roles).

15 1
9 followers
Viewed: 73 302 times
Version: 1.1
Category: Tutorials

Mais segurança em suas aplicações com Yii e PHPIDS

Created 13 years ago by Rafael Garcia, updated 13 years ago by Rafael Garcia.

PHPIDS é conhecido projeto que pode ser visto em php-ids.org.

2 1
3 followers
Viewed: 12 423 times
Version: 1.1
Category: How-tos

Yii code completion and calltips in Komodo Edit

Created 13 years ago by viter, updated 13 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: 14 612 times
Version: 1.1
Category: Tips

Enforcing "You must agree" requirements in forms

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

Checkboxes have two possible values, true and false, but some applications require that the user select one particular value before proceeding. Examples might be:

25 0
17 followers
Viewed: 33 231 times
Version: 1.1
Category: How-tos

More security in your applications with Yii and PHPIDS

Created 13 years ago by Rafael Garcia, updated 13 years ago by Gustavo.

PHPIDS is a well known project that can be found in php-ids.org.

6 0
14 followers
Viewed: 19 970 times
Version: 1.1
Category: How-tos

"Why do I get a 403 error when trying to use Gii?"

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

After enabling the Gii module in your protected/config/main.php file and then try to use it with http://example.com/index.php?r=gii, you get an error: ~~~ Error 403 You are not allowed to access this page. ~~~ This is almost certainly caused by the IP filtering mechanism that Gii uses to protect your system from outsiders - by default it allows localhost only (both IPv4 and IPv6), and r...

6 0
5 followers
Viewed: 86 196 times
Version: 1.1
Category: FAQs
Tags: config, Gii

Eclipse PDT - code-hints, references and other goodies

Created 15 years ago by mindeh, updated 13 years ago by Woil.

Since PHP is dynamically typed language, the way IDE may help you is limited.

14 0
6 followers
Viewed: 41 123 times
Version: 1.1
Category: Tutorials
Tags: IDE

How to create nice modal login widget with a CJuiDialog

Created 13 years ago by Igor Ivanovic, updated 13 years ago by Maurizio Domba Cerin.

You have to extend the widget class and configure it for user login widget

6 0
30 followers
Viewed: 60 070 times
Version: 1.1
Category: Tutorials

Single sign on across multiple subdomains

Created 13 years ago by ianaré, updated 13 years ago by ianaré.

This had me stumped for a while so I figured it would be nice to share here to avoid others the grief.

29 0
37 followers
Viewed: 64 221 times
Version: 1.1
Category: How-tos

Real Time Logging

Created 13 years ago by lucifurious, updated 13 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: 35 313 times
Version: 1.1
Category: Tips

htmlOptions explained for various controls.

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

Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

15 0
14 followers
Viewed: 65 772 times
Version: 1.1
Category: Tips

Include Yii framework in a Joomla module

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

Delploying anything using joomla's framework is quite difficult. The framework don't provide a good MVC structure and the documentation is very poor.

8 2
17 followers
Viewed: 34 916 times
Version: 1.1
Category: How-tos