Wiki articles

Showing 41-60 of 165 items.

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

Created 8 years ago by emrald, updated 8 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: 21 990 times
Version: 2.0
Category: Tutorials

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

Created 8 years ago by Amjad Khan, updated 8 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

4 1
7 followers
Viewed: 93 644 times
Version: 2.0
Category: Tutorials

Upload files in Yii2 with MongoDb and GridFs

Created 11 years ago by edoardo849, updated 5 years ago by pceuropa.

Uploading files in a webapp can be extremely tricky and sometimes the quickest way to do it is to store the file directly in the webserver or into a DNS (like Amazon S3) and then to save the link and the metadata inside a table in the DB. The thing is that you'll have to deal with file permissions, server storage, file management and so on (which is perfectly fine, by the way).

6 0
6 followers
Viewed: 39 041 times
Version: 2.0
Category: How-tos

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

Created 11 years ago by Kartik V, updated 10 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.

15 4
46 followers
Viewed: 185 962 times
Version: 2.0
Category: Tips

Using your own forked version of extensions with composer

Created 11 years ago by Kartik V, updated 9 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: 24 949 times
Version: 2.0
Category: Tutorials

Managing a star rating with the StarRating widget in Yii 2

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

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 26 071 times
Version: 2.0
Category: How-tos

How to implement form events

Created 10 years ago by Antonio Ramirez, updated 9 years ago by deacs.

You have that, when a product is on development they can change its API anytime. This change is quite important though, its related on how to set the events of your form, for example, the useful beforeSubmit.

5 0
6 followers
Viewed: 40 658 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

Create Form With DynamicModel

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

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

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

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

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

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

1 0
5 followers
Viewed: 77 652 times
Version: 2.0
Category: Tips

Debuging variables in Yii2

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

This tutorial is explained following "basic" application structure.

4 1
8 followers
Viewed: 44 790 times
Version: 2.0
Category: Tips

Use kartik Growl with Yii2 flash messages

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

This is to show you how to use Yii2 flash messages with Kartik Growl (bootstrap notify wrapper).

8 0
11 followers
Viewed: 50 596 times
Version: 2.0
Category: How-tos

Remove Byte Order Mark (BOM) from files recursively

Created 11 years ago by Kostas Apazidis (KonApaz), updated 6 years 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: 35 301 times
Version: all
Category: How-tos

Yii2: How to create/develop a new extension using Composer locally without version control or Git

Created 8 years ago by Wade Shuler, updated 6 years ago by jwerner.

Using a version control system, like Git, is nice. However, when building an extension from scratch and loading it via Composer, it adds a lot of pain in the butt steps. You have to commit your changes, update composer to pull them over, then notice there is an error, fix, commit, update. repeat.. I don't want all my baby steps under Git. Sure, I could edit my commit history, but c'mon. Just let m...

7 0
6 followers
Viewed: 39 090 times
Version: 2.0
Category: How-tos
10 0
15 followers
Viewed: 42 977 times
Version: all
Category: Others

How to make UrlManager createAbsoluteUrl work with sub-domains

Created 8 years ago by Wade Shuler, updated 7 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: 40 335 times
Version: 2.0
Category: How-tos

How to send emails using SMTP

Created 11 years ago by robregonm, updated 6 years ago by Wade Shuler.
6 0
11 followers
Viewed: 141 436 times
Version: 2.0
Category: How-tos

Yii2 default values for Index data Provider

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

Guys,

2 0
5 followers
Viewed: 32 773 times
Version: 2.0
Category: Tips

FORM with GET method causes repeated stacking of URL Parameters

Created 11 years ago by Kartik V, updated 11 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: 64 120 times
Version: all
Category: Tips

Displaying uploaded file from DB for update with FileInput widget

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

This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

2 3
43 followers
Viewed: 64 223 times
Version: 2.0
Category: How-tos

When to use Active Record

Created 6 years ago by samdark, updated 5 years ago by samdark.

When to use Active Record is a common question among developers, Yii and overall.

13 0
4 followers
Viewed: 54 103 times
Version: all
Category: FAQs