Wiki articles in category Tips

Showing 1-20 of 36 items.

Adding Yii Search to Your Browser Search Box

Created 13 years ago by qiang, updated 5 years 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: 63 300 times
Version: all
Category: Tips

Using Nginx and Apache2 in separate distributed servers (ie, Amazon EC2 instances)

Created 10 years ago by Luis Lobo Borobia, updated 6 years ago by Luis Lobo Borobia.

We are running one frontend running NGINX and several app servers running Apache2. There are several issues we have come across but right now I'll be documenting one of them. I'll be completing this article when I get more time.

2 0
2 followers
Viewed: 14 368 times
Version: all
Category: Tips

Auto-update denormalized attributes with MongoDb and Yii2

Created 10 years ago by edoardo849, updated 9 years ago by CeBe.

You have different collections in MongoDb with de-normalized attributes. As you may know, due to its not-join nature, MongoDb tends to encourage repetition of the same value in different collections (de-normalization). In this MongoDb is opposed to a more SQL-like approach where you usually reference only the ID of the value with a foreign key.

1 0
3 followers
Viewed: 17 534 times
Version: 2.0
Category: Tips

Yii2 default values for Index data Provider

Created 9 years ago by CTala, updated 9 years ago by CTala.

Guys,

2 0
5 followers
Viewed: 31 522 times
Version: 2.0
Category: Tips

Activating Bootstrap 3 Tooltips & Popover for your Yii Site.

Created 9 years ago by Kartik V, updated 6 years ago by alrazi.

Step 1: Initialize the Bootstrap Tooltip & Popover plugins in your view layout file @web\views\layouts\main.php. Add this to somewhere in the beginning head section (after you have loaded the Jquery using your AppAsset or something similar).

3 3
48 followers
Viewed: 65 417 times
Version: 2.0
Category: Tips

Yii 2 list of path aliases available with default basic and advanced app.

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

If you are coming over from Yii 1.x to Yii 2, and already read this guide, you may note that namespaces are very important in Yii 2 to identify classes. But do you know the list of seeded path aliases that come shipped with a basic or advanced app? Here is my attempt to list them.

14 4
46 followers
Viewed: 180 397 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 9 years ago by Kartik V, updated 9 years ago by toph.

// In Yii 1.x $form = $this->beginWidget('CActiveForm', [

'id' => 'order-search-form',
'method' => 'get',

]); echo $form->textInput($searchModel, 'id'); echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']); $this->endWidget(); `

7 2
41 followers
Viewed: 61 346 times
Version: all
Category: Tips

My Own Components Folder in Yii2

Created 9 years ago by CTala, updated 9 years ago by CTala.

In Yii1 I used to have my own components under the components folder of the structure, now with namespacing this is a little bit different.

2 1
2 followers
Viewed: 20 734 times
Version: 2.0
Category: Tips

Locking your Yii 2 project package versions with composer.lock

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

Ok, you have installed a Yii 2 basic or advanced app for the first time and completed the post install steps. You have picked up a few extensions to install for the first time as well. You would already see a composer.lock file in your application root folder.

0 2
37 followers
Viewed: 16 510 times
Version: 2.0
Category: Tips

Install specific Yii2 vendor extension & dependency without updating other packages.

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

The tips here are for advanced usages of composer and its assumed you have read about using composer and have a knowledge of your vendor packages to be updated. Let's consider, you want to update only one specific yii2 vendor library, without updating all the other extension packages?

2 3
39 followers
Viewed: 43 153 times
Version: 2.0
Category: Tips

Key web server settings after installing a fresh Yii 2 basic or advanced app

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

So, you have installed a brand new Yii 2 app (basic) or (advanced). Here are a few tips for Apache web server users to get things running more secure and better with your yii2 app.

3 0
46 followers
Viewed: 28 943 times
Version: 2.0
Category: Tips

Model validation for field ranges using yii2-field-range extension

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

The yii2-field-range extension enables you to easily setup ActiveField range fields with Bootstrap styling. You basically can setup two attributes joined together like a single field with combined validation error block.

0 0
37 followers
Viewed: 27 552 times
Version: 2.0
Category: Tips

embedded javascript block in your view with IDE checking or intellisense

Created 9 years ago by yiqing95, updated 9 years ago by yiqing95.

this is my way for embed js code block in view file:

2 0
3 followers
Viewed: 13 004 times
Version: 2.0
Category: Tips

Create Form With DynamicModel

Created 9 years ago by Misbahul D Munir, updated 9 years ago by Misbahul D Munir.

In yii2 we can create form without create FormModel. Here we go

4 0
8 followers
Viewed: 47 001 times
Version: 2.0
Category: Tips
Tags: form, model, yii2

Step by step for how to full export Yii2 grid to excel

Created 9 years ago by Scott_Huang, updated 9 years ago by Scott_Huang.

We will leverage Yii2-excelview widget. So, first of all is install Yii2-excelview:

1 0
5 followers
Viewed: 74 366 times
Version: 2.0
Category: Tips

Easy way to redirect http:\\localhost\yii2-basic to http:\\localhost\yii2-basic\web\index.php

Created 9 years ago by Scott_Huang, updated 9 years ago by Scott_Huang.

First of all, install yii2 basic template according below link:

1 0
5 followers
Viewed: 69 959 times
Version: 2.0
Category: Tips

Analyse the server's USER-AGENT against browsecap file to determine it's capability.

Created 9 years ago by Deepak Pradhan, updated 9 years ago by Deepak Pradhan.

Does your application need to know user's details on browser details, os and device type? We can use PHP's misc. function to achieve that provided you have an update copy of browsercap.ini

0 0
0 follower
Viewed: 9 075 times
Version: 2.0
Category: Tips

YII2 Pagination Options

Created 9 years ago by VivekYii, updated 9 years ago by VivekYii.

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 18 231 times
Version: 2.0
Category: Tips

Debuging variables in Yii2

Created 9 years ago by johonunu, updated 9 years ago by johonunu.

This tutorial is explained following "basic" application structure.

4 1
8 followers
Viewed: 41 740 times
Version: 2.0
Category: Tips

Using PayPal IPN with Yii2

Created 9 years ago by darioo, updated 9 years ago by darioo.

I'm using PayPal's script from

0 0
1 follower
Viewed: 12 951 times
Version: 2.0
Category: Tips