Wiki articles

Showing 1-20 of 799 items.

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

Created 4 years ago by le_top, updated 4 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: 5 888 times
Version: 1.1
Category: Tips

model rules depended by user roles-permissions

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Kostas Apazidis (KonApaz).

This is a reference about model validators and user roles. In many cases we want model validators to applied only for some privileged users or not

3 0
3 followers
Viewed: 14 412 times
Version: Unknown (update)
Category: How-tos

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

Yii Rights Management Tips

Created 4 years ago by Rajith R, updated 4 years ago by Rajith R.

yii rights some tips..

2 0
4 followers
Viewed: 9 030 times
Version: 1.1
Category: Tips

Search a file size range in CGridView

Created 5 years ago by CrazyCat, updated 5 years ago by CrazyCat.
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
2 0
2 followers
Viewed: 8 871 times
Version: Unknown (update)
Category: Tips

Gettext and Poedit HOWTO

Created 4 years ago by Maug Lee, updated 4 years ago by Maug Lee.

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 8 976 times
Version: 1.1
Category: Tutorials

How to nest DB transactions without actually nesting them.

Created 4 years ago by le_top, updated 4 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: 6 576 times
Version: 1.1
Category: How-tos

Themed translations (i18n)

Created 4 years ago by le_top, updated 4 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: 7 134 times
Version: 1.1
Category: How-tos

Clear CGridView Filters, Sort & Pager

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

Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.

2 0
3 followers
Viewed: 13 199 times
Version: 1.1
Category: How-tos

How to filter data using a dropdown list?

Created 10 years ago by qiang, updated 6 years ago by Yang He.

A dropdown list can be used to select a value, based on which we can filter the data to be displayed. For example, the extension page has a dropdown list to filter the displayed extensions according to the selected category.

7 0
6 followers
Viewed: 33 866 times
Version: 1.1
Category: Tutorials
Tags:

Understanding series articles

Created 7 years ago by GOsha, updated 7 years ago by GOsha.

Here are all wiki articles from "Understanding" series by Yii wiki contributors:

16 0
13 followers
Viewed: 10 920 times
Version: 1.1
Category: Tips

How to use Highslide for image popups

Created 10 years ago by mocapapa, updated 8 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: 22 765 times
Version: 1.1
Category: Tutorials
Tags: image, popups

Application-driven database with CDbMigration and an extended CActiveRecord

Created 7 years ago by Tudor Ilisoi, updated 7 years ago by Tudor Ilisoi.

This is an incipient implementation of application-driven database with Yii.

8 0
10 followers
Viewed: 12 620 times
Version: 1.1
Category: Others

CJuiDatePicker extended for more/better language support

Created 4 years ago by le_top, updated 4 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: 7 868 times
Version: 1.1
Category: How-tos

How to make use of a fragment cache

Created 10 years ago by dalip, updated 8 years ago by wei.
1 0
2 followers
Viewed: 12 962 times
Version: 1.1
Category: Tutorials

using editors of yiibooster - fix issues - configuration

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 years ago by Nur Rochim.

if you have use the yiibooster extension, you have definitely used the amazing redactor, html5 and ckEditor editors.

4 0
4 followers
Viewed: 9 595 times
Version: 1.1
Category: How-tos

YII2 Pagination Options

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

solution here If we are using default pagination option like

1 0
1 follower
Viewed: 12 320 times
Version: 2.0
Category: Tips

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created 5 years ago by Gerhard Liebenberg, updated 5 years ago by Gerhard Liebenberg.

If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

3 0
2 followers
Viewed: 19 937 times
Version: 1.1
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 702 times
Version: 2.0
Category: How-tos

How to create a custom exception and show it friendly with CJuiDialog

Created 4 years ago by Fábio Sales, updated 4 years ago by Fábio Sales.

Sometimes we need to create our custom exception and show it to the end user through a friendly way . In this article, I'm showing how to do it using CJuidialog.

0 0
1 follower
Viewed: 13 819 times
Version: 1.1
Category: How-tos