Wiki articles

Showing 61-80 of 822 items.

"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 292 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 216 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: 76 246 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 323 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 375 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 845 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 982 times
Version: 1.1
Category: How-tos

Run an Yii Application inside an Wordpress page

Created 13 years ago by Paul Apostol, updated 13 years ago by Paul Apostol.

Create a folder where to place an Yii app under wordpress folder (mine is "yii')

12 0
14 followers
Viewed: 38 782 times
Version: 1.1
Category: How-tos

Preventing CJuiTabs from hiding drop-down CMenu items

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

Functional tests independing from your urlManager settings

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

If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

0 0
4 followers
Viewed: 12 390 times
Version: 1.1
Category: Tips

Using jQuery UI 1.8.10 themes with Yii 1.1.6

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

When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

2 0
2 followers
Viewed: 23 273 times
Version: 1.1
Category: Tips

Impersonate Users within Yii Framework

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

For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

20 0
21 followers
Viewed: 26 238 times
Version: 1.1
Category: Tutorials

Use different environments (development, production, etc) in your app with EASY Environment Class

Created 13 years ago by nancoder, updated 13 years ago by marcovtwout.

Hi, I was having problems each time I had to test the site or edit something on my local machine, like changing the db connection, change the debug mode to false, the trace level to 0, disable Gii, etc. So I created a class to resolve all my problems, hope to help you in your projects!

7 0
7 followers
Viewed: 76 529 times
Version: 1.1
Category: Tutorials
Tags:

URL component access functions

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

Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.

28 0
16 followers
Viewed: 19 059 times
Version: 1.1
Category: Tips
Tags: request, URL

How to use Smarty renderer in Yii

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

At first, create a class named SmartyRenderer under application/components or any directory you want.

3 0
7 followers
Viewed: 22 646 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

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

<?php $this->widget('zii.widgets.grid.CGridView', array(

'dataProvider' => $dataprovider,
'id'=>'recipient_table',
    'selectionChanged'=>'updateEditForm',
'columns' => array(
	'rec_id',
            'org.nachname',
            'org.vorname',
            'org_id',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{...
1 0
10 followers
Viewed: 27 411 times
Version: 1.1
Category: How-tos

Updating fields on a form with Ajax and Json

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

I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

10 0
22 followers
Viewed: 95 336 times
Version: 1.1
Category: How-tos

caching controllers with filters()

Created 13 years ago by RusAlex, updated 13 years ago by Maurizio Domba Cerin.

Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

2 0
8 followers
Viewed: 17 735 times
Version: 1.1
Category: How-tos

Extending common classes to allow better customization

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

Actions code reuse with CAction

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

Gii provides us normally with the following code on the 'actionCreate':

public function actionCreate()
{
   $model=new ModelName;

33 0
19 followers
Viewed: 54 764 times
Version: 1.1
Category: How-tos