Wiki articles

Showing 121-140 of 826 items.

How to translate and do the translations the easy way

Created 14 years ago by Roman Solomatin Roman Solomatin, updated 10 years ago by Roman Solomatin Roman Solomatin.

I wanted to keep all the I18N related translations in separate files, so that I would not need to modify the view files or the model files every time I need to update or fix the translations of application's source language.

16 2
17 followers
Viewed: 91 627 times
Version: 1.1
Category: How-tos

Escape from Default's Yii2 Delete Confirm Box

Created 12 years ago by Antonio Ramirez Antonio Ramirez, updated 10 years ago by Cozumel Cozumel.

If you started playing with Yii2's new GridView, you will soon realize that some things have improved quite a lot, but I am sure its going to be a bit confusing at first glance when you try to modify certain javascript behaviors like for example, its delete confirmation dialog box.

4 1
16 followers
Viewed: 50 661 times
Version: 2.0
Category: How-tos

Handling recursive deletion in Yii

Created 13 years ago by JamesBarnsley JamesBarnsley, updated 10 years ago by JamesBarnsley JamesBarnsley.

I www.jamesbarnsley.com was tasked to find a way to do recursive deletion in Yii. As I asked other developers and looked around the internet the usual answers all came up, use a plugin or use cascade delete at the DB level, but I did not want to do either of these.

3 0
5 followers
Viewed: 19 756 times
Version: 1.1
Category: How-tos

Handling Bootstrap active tabs in Yii via URL

Created 13 years ago by JamesBarnsley JamesBarnsley, updated 10 years ago by JamesBarnsley JamesBarnsley.

I (www.jamesbarnsley.com) found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to...

3 0
7 followers
Viewed: 44 458 times
Version: 1.1
Category: How-tos

CMenu widget like bootstrap navbar with submenu

Created 10 years ago by kv4nt kv4nt, updated 10 years ago by kv4nt kv4nt.
0 0
1 follower
Viewed: 26 875 times
Version: 1.1
Category: Tutorials

Language Selector

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

common\components\LanguageSelector.php

<?php
namespace common\components;

2 0
6 followers
Viewed: 20 068 times
Version: 2.0
Category: Tutorials

Handling tabular data loading and validation in Yii 2

Created 12 years ago by Kartik V Kartik V, updated 10 years ago by Said Bakr Said Bakr.

The only differences in Yii 2 is that its much simpler due to available functions in the Model class for loading and validating models.

3 2
51 followers
Viewed: 66 569 times
Version: 2.0
Category: Tutorials

Relational Query - Lazy Loading and Eager Loading in Yii 1.1 / with and together

Created 13 years ago by softark softark, updated 10 years ago by softark softark.

It's well known that there are Lazy Loading approach and Eager Loading approach in the relational query. But it's important to note that you should distinguish 2 different modes in the Eager Loading in Yii 1.1.x.

9 0
22 followers
Viewed: 66 332 times
Version: 1.1
Category: Tutorials

How to use imagine ( crop, thumb, effects for images ) on Yii2

Created 11 years ago by Anas AbuDayah Anas AbuDayah, updated 10 years ago by Cozumel Cozumel.

Imagine adds most common image functions and also acts as a wrapper to Imagine image manipulation library.

5 0
14 followers
Viewed: 105 858 times
Version: 2.0
Category: Tutorials

Multi Data Provider

Created 12 years ago by Sharon Lavie Sharon Lavie, updated 10 years ago by Sharon Lavie Sharon Lavie.

Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

1 0
4 followers
Viewed: 21 740 times
Version: 1.1
Category: Tips

A simple widget - jump2link

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

namespace app\components;

0 0
1 follower
Viewed: 16 734 times
Version: 2.0
Category: Tutorials

How to implement form events

Created 11 years ago by Antonio Ramirez Antonio Ramirez, updated 10 years ago by deacs 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: 44 703 times
Version: 2.0
Category: How-tos
Tags: Forms, How to, yii2

MySQL migration environment

Created 10 years ago by Fabrizio Caldarelli Fabrizio Caldarelli, updated 10 years ago by Fabrizio Caldarelli 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: 15 551 times
Version: 2.0
Category: How-tos

How to use a Widget as an Action Provider

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

All done, now we can call all the actionProvider actions as controllerID/actionPrefix.actionID. Here is the example:

24 0
41 followers
Viewed: 67 562 times
Version: 1.1
Category: How-tos

Simple Jui Autocomplete in yii2

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

To use jui auto complete widget first add

0 0
3 followers
Viewed: 55 815 times
Version: 2.0
Category: Tutorials

Cron Jobs in Yii

Created 13 years ago by aarondfrancis aarondfrancis, updated 10 years ago by Roman Solomatin Roman Solomatin.

I've gotten Yii running cron jobs, and wanted to explain briefly how I did it.

2 0
9 followers
Viewed: 39 132 times
Version: 1.1
Category: How-tos

How to use nested DB transactions (MySQL 5+, PostgreSQL)

Created 17 years ago by mindeh mindeh, updated 10 years ago by Boaz Boaz.

Original source code and idea are from: PHP, PDO & Nested Transactions.

41 0
26 followers
Viewed: 78 262 times
Version: 1.1
Category: How-tos

Yii2: Query build for complexity SQL

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

As for complexity SQL query we have two solutions as below, I will discuss #2 in this article.

0 0
3 followers
Viewed: 42 377 times
Version: 2.0
Category: Tips

Simple Google Maps object for use with ajax maps

Created 10 years ago by Chris Backhouse Chris Backhouse, updated 10 years ago by Chris Backhouse Chris Backhouse.

The Google mapping extension by Dos Amigos (link) is really great but there are difficulties with Google maps when you want to manipulate your map object with Ajax.

0 0
3 followers
Viewed: 21 478 times
Version: 2.0
Category: How-tos

Execute migration on server/linux using shell

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

It's easy to execute migration locally on XAMPP using cmd, but on server where you script is it's little bit harder.

0 0
3 followers
Viewed: 23 757 times
Version: 2.0
Category: How-tos