Wiki articles

Showing 121-140 of 822 items.

Simple access control

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

For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

3 7
10 followers
Viewed: 46 051 times
Version: 1.1
Category: Tutorials

How to store array/widget configuration to the database with config validation rules

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

Note the tag {{homeUrl}} will be dynamically replaced at runtime.

2 3
41 followers
Viewed: 23 553 times
Version: 2.0
Category: Tutorials

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 200 times
Version: 2.0
Category: Tips

Managing your nested dropdown dependency with DepDrop widget

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

If you are coming over to Yii 2 from Yii 1.x, you may have already read this useful wiki for creating dependent dropdowns. You can use a similar approach in Yii 2 to do the same. But if you are looking at a prebuilt solution that helps you manage it easier, read along.

2 3
42 followers
Viewed: 87 420 times
Version: 2.0
Category: Tutorials

Displaying uploaded file from DB for update with FileInput widget

Created 9 years ago by Kartik V, updated 9 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: 61 592 times
Version: 2.0
Category: How-tos

Yii实战中8个必备常用的扩展,模块和

Created 12 years ago by Darwin Wen, updated 12 years ago by Darwin Wen.

在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.

2 3
9 followers
Viewed: 39 869 times
Version: 1.1
Category: Tips

Extending an ActiveRecord model

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

protected $_viewFile

2 3
7 followers
Viewed: 28 643 times
Version: 1.1
Category: How-tos

AutoTimestampBehavior

Created 15 years ago by jonah, updated 11 years ago by Yang He.

This behavior will automatically set timestamp fields to the row creation and modification times.

2 2
3 followers
Viewed: 22 524 times
Version: 1.1
Category: Tutorials
Tags:

"safe" and "unsafe" Model validators (massive assignments)

Created 10 years ago by Kostas Apazidis (KonApaz), updated 7 years ago by brianvu.

Ok, it is a little bit difficult to full understanding the unsafe validator.

2 2
7 followers
Viewed: 36 170 times
Version: 1.1
Category: How-tos

Create/Develop View files with plain HTML (Without using ActiveForm Class)

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

Today i want to share with you is "How can we write HTML Code in view files? I am writing this article because many times we can not use CActiveForm to design our form...

2 2
6 followers
Viewed: 21 514 times
Version: 1.1
Category: How-tos

Two Login in same form in Yii application , with two tables

Created 10 years ago by Balu, updated 9 years ago by Rohit Suthar.

login links will be

3 4
6 followers
Viewed: 30 796 times
Version: 1.1
Category: Tutorials

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 471 times
Version: 2.0
Category: Tips

Provide SVG when the browser supports it, else PNG (using CHtml::image overload)

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

Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.

1 0
1 follower
Viewed: 9 946 times
Version: 1.1
Category: Tips

How to nest DB transactions without actually nesting them.

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

To secure your database from inconsistencies resulting from failing (complex) operations, you (should) use transactions. However, complex methods often rely on other complex methods that themselves build on transactions. This HowTo presents a method to nest or embed transactions without relying on the database's nesting capabilities.

1 0
1 follower
Viewed: 10 460 times
Version: 1.1
Category: How-tos

Themed translations (i18n)

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

When using themes you want to changes some of the translations specifically to the theme while keeping the standard translations for most of the text. Duplicating the main translation file is a headache for maintainance. This how to provides a solution.

1 0
1 follower
Viewed: 16 461 times
Version: 1.1
Category: How-tos

How to use Highslide for image popups

Created 15 years ago by mocapapa, updated 13 years ago by wei.

>Highslide JS is an open source JavaScript software, offering a Web 2.0 approach to popup windows. It streamlines the use of thumbnail images and HTML popups on web pages. > > + No plugins like Flash or Java required. > + Popup blockers are no problem. The content expands within the active browser window. > + Single click. After opening the image or HTML popup, the user can scroll further down...

1 0
2 followers
Viewed: 27 749 times
Version: 1.1
Category: Tutorials
Tags: image, popups

Customizing the CMenu Widget

Created 10 years ago by mistryb, updated 9 years ago by mistryb.

The CMenu class provides some useful features for generating menus in your web application.

1 0
4 followers
Viewed: 67 774 times
Version: 1.1
Category: Tips

GridView show sum of columns in footer.

Created a year ago by shiv.

GridView show sum of columns in footer `PHP use yii\grid\DataColumn;

1 0
1 follower
Viewed: 67 692 times
Version: 2.0
Category: Tips

CJuiDatePicker extended for more/better language support

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

The number of languages supported by the standard CJuiDatePicker implementation is limited and the language code to use is different from the application's language code. This Wiki shows how to improve on that.

1 0
1 follower
Viewed: 11 478 times
Version: 1.1
Category: How-tos

How to make use of a fragment cache

Created 15 years ago by dalip, updated 13 years ago by wei.
1 0
2 followers
Viewed: 17 228 times
Version: 1.1
Category: Tutorials