Wiki articles

Showing 81-100 of 153 items.

Override/Eliminate Bootstrap CSS/JS for Yii 2.0 widgets

Created 6 years ago by Kartik V, updated 2 years ago by CeBe.

An example of customizing the Yii GridView is mentioned here. You can easily override Bootstrap or other styling defaults by changing the GridView default options.

4 2
39 followers
Viewed: 46 630 times
Version: 2.0
Category: How-tos

FORM with GET method causes repeated stacking of URL Parameters

Created 6 years ago by Kartik V, updated 6 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(); `

4 2
40 followers
Viewed: 50 863 times
Version: all
Category: Tips

Creating a Simple CRUD App With Yii2 (Revised 12/20/2013)

Created 7 years ago by Charles R. Portwood II, updated 6 years ago by Vivek.

By popular demand, today I will be revisiting my previous Yii Framework 2 Getting Started Guide and updating it with what is currently available in the Yii Framework 2 Repository. Provide here is an super simple example CRUD application that will help you get started using the framework.

7 6
21 followers
Viewed: 248 434 times
Version: 2.0
Category: Tutorials

Using your own forked version of extensions with composer

Created 6 years ago by Kartik V, updated 5 years ago by Kartik V.

So you want to use a fork of any existing vendor extension with your Yii 2 install and use the fork, instead of original source. This does not need you to push any update or register your package on packagist.org. You are recommended to follow the approach below:

3 2
40 followers
Viewed: 18 775 times
Version: 2.0
Category: Tutorials

Remove Byte Order Mark (BOM) from files recursively

Created 6 years ago by Kostas Apazidis (KonApaz), updated a year ago by samdark.

The problem was that all my web applications ran normally on localhost, but on server the Greek characters (or any other no-english characters) displayed with problems.

2 1
7 followers
Viewed: 27 102 times
Version: all
Category: How-tos

Yii2 GridView Sorting and Searching with a Junction Table Column(Many to Many Relationship)

Created 3 years ago by Amjad Khan, updated 3 years ago by Amjad Khan.

Following is the table structure

tblgroups

CREATE TABLE IF NOT EXISTS `tblgroups` (
  `id` int(11) NOT NULL,
  `groupname` varchar(150) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=Acitve,2=Inactive',
  `date` datetime NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

tblcontacts

2 1
6 followers
Viewed: 65 406 times
Version: 2.0
Category: Tutorials

My Own Components Folder in Yii2

Created 6 years ago by CTala, updated 6 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: 16 053 times
Version: 2.0
Category: Tips

YII2 Pagination Options

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

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 14 355 times
Version: 2.0
Category: Tips

`forceCopy` per Asset Bundle

Created 5 years ago by schmunk, updated 5 years ago by schmunk.

During development and depending on your setup you may need to use the options forceCopy or linkAssets of the asset manager to work around possible file-system and permission issues.

1 0
1 follower
Viewed: 9 214 times
Version: 2.0
Category: How-tos

YII2 : simple language Switcher Widget

Created 5 years ago by phunsanit, updated 5 years ago by phunsanit.
  1. create file common\components\languageSwitcher.php
1 0
5 followers
Viewed: 24 166 times
Version: 2.0
Category: Tutorials

Load data from internal/external source to fill form fields

Created 5 years ago by skworden, updated 5 years ago by skworden.

This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

1 0
5 followers
Viewed: 26 568 times
Version: 2.0
Category: How-tos

Load & Save With Relation

Created 5 years ago by moo.tensai, updated 5 years ago by moo.tensai.

Use this extension : yii2-relation-trait

1 0
2 followers
Viewed: 13 636 times
Version: 2.0
Category: Tips

Language Selector

Created 4 years ago by Programmer Thailand, updated 4 years ago by Programmer Thailand.

common\components\LanguageSelector.php

<?php
namespace common\components;

1 0
5 followers
Viewed: 11 284 times
Version: 2.0
Category: Tutorials

Tunneling using SSH in a limited enviroment

Created 6 years ago by nineinchnick, updated 6 years ago by CeBe.

This tutorial describes how to connect to a remote service via tunnel when only most basic software is available on the remote server. It is not directly related to Yii. It could be hovewer useful for web developers working with shared hosting sites with limited access.

1 0
3 followers
Viewed: 12 793 times
Version: all
Category: Others

How to make bootstrap tabs remain active/selected after navigating to different web pages.

Created 3 years ago by emrald, updated 3 years ago by emrald.

Bootstrap tabs gets unselected/inactive when user navigates to other page and comes back. How to make bootstrap tabs remain active/selected after navigating to different web pages.

1 0
3 followers
Viewed: 11 434 times
Version: 2.0
Category: Tutorials

How to make UrlManager createAbsoluteUrl work with sub-domains

Created 3 years ago by Wade Shuler, updated 2 years ago by CeBe.

Upon creating my Yii2 Members System, I have ran into a few snags along the way that forced me to extend and bend Yii2 to my will.

1 0
3 followers
Viewed: 25 571 times
Version: 2.0
Category: How-tos

Auto-update denormalized attributes with MongoDb and Yii2

Created 6 years ago by edoardo849, updated 6 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: 13 686 times
Version: 2.0
Category: Tips

Editing, Deleting, and Viewing model data with the yii2-detail-view extension

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

The yii2-detail-view extension offers you an easy way to EDIT and VIEW your model data, toggle these modes, and adds other features. You can read the extension documentation and/or view a demo of this extension, to understand usage.

1 0
43 followers
Viewed: 71 090 times
Version: 2.0
Category: Tutorials

Using the yii2-datecontrol extension along with yii2-detail-view widget

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

The yii2-datecontrol extension allows you to control separate date formats for display and saving for form inputs.

1 0
37 followers
Viewed: 16 310 times
Version: 2.0
Category: How-tos

An alternative way to ElasticSearch

Created 2 years ago by Necip, updated 2 years ago by Necip.

This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.

1 0
2 followers
Viewed: 11 518 times
Version: all
Category: How-tos