Wiki articles

Showing 1-20 of 142 items.

Nested Set with Yii2

Created 2 months ago by sangprabo, updated a month ago by sangprabo.

The nested set behaviour is an approach to store hierarchical data in relational databases. For example, if we have many categories for our product or items. One category can be a "parent" for other categories, means that one category consists of more than one category. The model can be drawn using a "tree" model. There are other approaches available but what we will learn in this article is speci...

3 0
2 followers
Viewed: 2 111 times
Version: 2.0
Category: Tutorials

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

Created 4 years ago by Deepak Pradhan, updated 4 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: 5 174 times
Version: 2.0
Category: Tips

Use non Gmail/Gsuite on Gcloud projects

Created a year ago by Luis Armando, updated 10 months ago by Maurizio Domba Cerin.

Small companies and startups use cheap email services or even Cpanel's mail services which are less secure and compete directly with bigger email providers like Microsoft with Outlook and Google with Gmail. This creates a problem when you try to use their services to send/receive emails from this cheap services. <img width="750" src="https://static.techspot.com/fileshost/newspics3/2017/google-clo...

0 0
3 followers
Viewed: 5 769 times
Version: 2.0
Category: How-tos

Events registration examples

Created 2 months ago by minitia, updated 2 months ago by minitia.

Register an event handler at Object-Level

1 0
2 followers
Viewed: 6 034 times
Version: 2.0
Category: How-tos
Tags: events, yii2

An alternative way to ElasticSearch

Created 10 months ago by Necip, updated 9 months 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: 6 675 times
Version: all
Category: How-tos

`forceCopy` per Asset Bundle

Created 4 years ago by schmunk, updated 4 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: 7 626 times
Version: 2.0
Category: How-tos

Automatically get the SVN Revision Number of your Project

Created 5 years ago by jcagentzero, updated 4 years ago by jcagentzero.

When you are handling so many projects and those projects are saved in different repository locations, you may find it very difficult to keep track all the versions and revisions manually and it will be much harder if you are developing in multiple repository branches.

3 0
4 followers
Viewed: 7 748 times
Version: all
Category: Tutorials

A universal model attribute for its synthetic representation

Created 2 years ago by Alexandre Rodichevski, updated 2 years ago by Alexandre Rodichevski.

It is convenient to use the same identification attribute, say info, in all of the active records of your application. It should be a virtual read-only attribute defined by a getter method, its label being the model name.

0 0
3 followers
Viewed: 7 758 times
Version: 2.0
Category: Tips

Getting information from the current locale

Created 9 months ago by CeBe, updated 9 months ago by CeBe.

Yii 2.0 comes with a formatter component to format dates, numbers, and other values for international users according to their locale. This is very useful for displaying data. When working with incoming data or when using enhanced input methods like the [MaskedInput widget](https://www.yiiframework.com/doc/api/2.0/yii-widgets-maskedinp...

5 0
2 followers
Viewed: 7 959 times
Version: 2.0
Category: How-tos

embedded javascript block in your view with IDE checking or intellisense

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

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

1 0
3 followers
Viewed: 7 982 times
Version: 2.0
Category: Tips

Using PayPal IPN with Yii2

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

I'm using PayPal's script from

0 0
1 follower
Viewed: 8 462 times
Version: 2.0
Category: Tips

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

Created 5 years ago by Luis Lobo Borobia, updated a year 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: 8 530 times
Version: all
Category: Tips

MySQL migration environment

Created 3 years ago by Fabrizio Caldarelli, updated 3 years ago by Fabrizio Caldarelli.

It can happen that you work in development environment and you make changes to database tables structures, adding tables, or changing fields.

0 0
2 followers
Viewed: 8 732 times
Version: 2.0
Category: How-tos

A simple widget - jump2link

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

namespace app\components;

0 0
1 follower
Viewed: 8 756 times
Version: 2.0
Category: Tutorials

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

Created 2 years ago by emrald, updated 2 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: 9 070 times
Version: 2.0
Category: Tutorials
0 0
3 followers
Viewed: 9 086 times
Version: 2.0
Category: How-tos
Tags:

Batch Gridview data ajax send splitted in chunks displaying bootstrap Progress bar

Created 6 months ago by toaster, updated 6 months ago by toaster.

The scenario in which this wiki can be useful is when you have to send an (huge) array of model ids and perform a time consuming computation with it like linking every model to other models. The idea is to split the array into smaller arrays and perform sequential ajax requests, showing the calculation progress using a [Bootstrap Progress bar](https://www.yiiframework.com/extension/yiisoft/yii2-bo...

7 0
2 followers
Viewed: 9 113 times
Version: 2.0
Category: Tutorials

MongoDB's RBAC support class extending BaseManager

Created 4 years ago by edoardo849, updated 4 years ago by edoardo849.

Here's a possible implementation for MongoDb of the RBAC standard. Create a class "MongoDbManager" in `common\components and modify your params.php` file like this:

0 0
4 followers
Viewed: 9 283 times
Version: 2.0
Category: How-tos
Tags: mongodb, rbac, yii2

Locking your Yii 2 project package versions with composer.lock

Created 5 years ago by Kartik V, updated 5 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: 9 519 times
Version: 2.0
Category: Tips

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

1 0
5 followers
Viewed: 9 524 times
Version: 2.0
Category: Tutorials