Wiki articles

Showing 61-80 of 826 items.

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

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl 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: 92 402 times
Version: 1.1
Category: FAQs
Tags: config, Gii

Eclipse PDT - code-hints, references and other goodies

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

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

14 0
6 followers
Viewed: 47 237 times
Version: 1.1
Category: Tutorials
Tags: IDE

How to create nice modal login widget with a CJuiDialog

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

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

6 0
30 followers
Viewed: 79 959 times
Version: 1.1
Category: Tutorials

Single sign on across multiple subdomains

Created 15 years ago by ianaré ianaré, updated 15 years ago by ianaré 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: 68 944 times
Version: 1.1
Category: How-tos

Real Time Logging

Created 15 years ago by lucifurious lucifurious, updated 15 years ago by lucifurious 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: 38 948 times
Version: 1.1
Category: Tips

htmlOptions explained for various controls.

Created 15 years ago by Woil Woil, updated 15 years ago by Woil 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: 68 845 times
Version: 1.1
Category: Tips

Include Yii framework in a Joomla module

Created 15 years ago by zaccaria zaccaria, updated 15 years ago by Anupam 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: 38 461 times
Version: 1.1
Category: How-tos

Run an Yii Application inside an Wordpress page

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

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

12 0
14 followers
Viewed: 42 431 times
Version: 1.1
Category: How-tos

Preventing CJuiTabs from hiding drop-down CMenu items

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

Functional tests independing from your urlManager settings

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

Using jQuery UI 1.8.10 themes with Yii 1.1.6

Created 15 years ago by a110y a110y, updated 15 years ago by samdark 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: 26 205 times
Version: 1.1
Category: Tips

Impersonate Users within Yii Framework

Created 15 years ago by Woil Woil, updated 15 years ago by Woil 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: 30 345 times
Version: 1.1
Category: Tutorials

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

Created 15 years ago by nancoder nancoder, updated 15 years ago by marcovtwout 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: 85 390 times
Version: 1.1
Category: Tutorials
Tags:

URL component access functions

Created 15 years ago by Steve Friedl Steve Friedl, updated 15 years ago by Steve Friedl 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: 21 730 times
Version: 1.1
Category: Tips
Tags: request, URL

How to use Smarty renderer in Yii

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

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

3 0
7 followers
Viewed: 23 906 times
Version: 1.1
Category: How-tos

CGridView and AjaxForm Connect

Created 15 years ago by PinkBrainPlan PinkBrainPlan, updated 15 years ago by PinkBrainPlan 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: 30 398 times
Version: 1.1
Category: How-tos

Updating fields on a form with Ajax and Json

Created 15 years ago by Russell England Russell England, updated 15 years ago by Russell England 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: 99 838 times
Version: 1.1
Category: How-tos

caching controllers with filters()

Created 15 years ago by RusAlex RusAlex, updated 15 years ago by Maurizio Domba Cerin 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: 20 240 times
Version: 1.1
Category: How-tos

Extending common classes to allow better customization

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

Actions code reuse with CAction

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

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

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

33 0
19 followers
Viewed: 58 458 times
Version: 1.1
Category: How-tos