Wiki articles

Showing 21-40 of 651 items.

How to make use of a fragment cache

Created 15 years ago by dalip, updated 13 years ago by wei.
1 0
2 followers
Viewed: 17 228 times
Version: 1.1
Category: Tutorials

How to implement multiple page layouts in an application

Created 14 years ago by qiang, updated 13 years ago by wei.

In this tutorial, we describe how to implement multiple layouts for action views in an application. As an example, we assume that the pages in our application will use three different layouts:

19 0
22 followers
Viewed: 125 323 times
Version: 1.1
Category: Tutorials
Tags: layout

Implementing cron jobs with Yii

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

There are two ways to run a cron job:

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

Using recaptchlib in your projects

Created 13 years ago by Antonio Ramirez, updated 13 years ago by 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: 15 253 times
Version: 1.1
Category: How-tos

Module based login

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

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

13 0
18 followers
Viewed: 89 390 times
Version: 1.1
Category: Tutorials

Saving files to a blob field in the database

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

6 2
17 followers
Viewed: 79 438 times
Version: 1.1
Category: Tips

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

Created 13 years ago by Yeti, updated 13 years ago by 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: 45 670 times
Version: 1.1
Category: Tutorials
Tags:

Yii and XAMPP server on Windows

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

This article explains issues about installing XAMPP server package (Lite version) on Windows OS and configuring it for serving webapps written in Yii. Please note, that XAMPP is available for many more platforms and systems. I write about Windows edition as it was the only one tested by me.

3 0
0 follower
Viewed: 79 200 times
Version: 1.1
Category: Tutorials

Code style

Created 13 years ago by zaccaria, updated 13 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: 27 703 times
Version: 1.1
Category: Tips
Tags: mvc

Add charts / print buttons to your webapp

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

In this article you will find Yii framework extensions enabling you to add various charts/print out buttons etc. to your webapp.

6 0
9 followers
Viewed: 37 470 times
Version: 1.1
Category: Tutorials

Directory independent extensions

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

Using the jqueryslidemenu plugin with CMenu

Created 13 years ago by Antonio Ramirez, updated 13 years ago by 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: 41 816 times
Version: 1.1
Category: How-tos

How To Customize CMenu Output

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

CMenu comes with a lot of great customization options built in but sometimes you need it to do more.

7 0
15 followers
Viewed: 68 578 times
Version: 1.1
Category: Tutorials
Tags: menu

Multiple Databases and Multiple Domains

Created 13 years ago by got 2 doodle, updated 13 years ago by 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: 55 221 times
Version: 1.1
Category: Tutorials
Tags: database

Styling Radio Buttons

Created 13 years ago by Steve Friedl, updated 13 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: 68 959 times
Version: 1.1
Category: Tips

Using setFlash for displaying various kind of messages

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

In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.

5 4
6 followers
Viewed: 91 710 times
Version: 1.1
Category: How-tos

How to customize error handling in console-mode applications

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

One can control the detail of a web application in the webroot/index.php file by manipulating the values of YII_DEBUG and YII_TRACE_LEVEL, but these don't appear to be used by console applications. This is because although the base CApplication class defines a displayError() method that does consider these variable, CConsoleApplication overrides it with a function that doesn't honor th...

3 0
4 followers
Viewed: 21 041 times
Version: 1.1
Category: How-tos

Extending CActiveForm for some form display fixes and language tweaks

Created 13 years ago by Trejder, updated 13 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: 23 919 times
Version: 1.1
Category: Tips

How to log and debug variables using CWebLogRoute

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

Yii comes with a set of powerful classes for logging. If you have read the documentation about logging messages, you have noticed that we can actually decide which messages we wish to log. And this is exactly what we are going to do, using [CWebLogRoute](http://www.yiiframework.com/doc/api/1.1/CWebLog...

13 0
20 followers
Viewed: 78 259 times
Version: 1.1
Category: How-tos
Tags: Logging

ChromePHP for Yii

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

ChromePHP is a console logging extension for Google Chrome.

3 1
4 followers
Viewed: 18 264 times
Version: 1.1
Category: Tips