Wiki articles

Showing 1-20 of 826 items.

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

Created 11 years ago by le_top le_top, updated 11 years ago by le_top 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: 12 505 times
Version: 1.1
Category: Tips

How to add Schema.org markup to Yii2 pages

Created 5 years ago by Gabriel A. López López Gabriel A. López López, updated 5 years ago by Gabriel A. López López Gabriel A. López López.

https://schema.org is a markup system that allows to embed structured data on their web pages for use by search engines and other applications. Let's see how to add Schema.org to our pages on Yii2 based websites using JSON-LD.

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

model rules depended by user roles-permissions

Created 12 years ago by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz), updated 12 years ago by Kostas Apazidis (KonApaz) 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: 21 757 times
Version: Unknown (update)
Category: How-tos

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

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

Yii Rights Management Tips

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

yii rights some tips..

2 0
4 followers
Viewed: 16 136 times
Version: 1.1
Category: Tips

Search a file size range in CGridView

Created 12 years ago by CrazyCat CrazyCat, updated 12 years ago by CrazyCat 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: 13 788 times
Version: Unknown (update)
Category: Tips

Gettext and Poedit HOWTO

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

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 15 430 times
Version: 1.1
Category: Tutorials

Api of Multiple File Uploading in Yii2

Created 5 years ago by fezzymalek fezzymalek, updated 3 years ago by fezzymalek fezzymalek.

After getting lot's of error and don't know how to perform multiple images api in yii2 finally I get it today

5 0
4 followers
Viewed: 76 610 times
Version: 2.0
Category: Tutorials

How to nest DB transactions without actually nesting them.

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

How to redirect all emails to one inbox on Yii2 applications

Created 5 years ago by Gabriel A. López López Gabriel A. López López.

\yii\mail\BaseMailer::useFileTransport is a great tool. If you activate it, all emails sent trough this mailer will be saved (by default) on @runtime/mail instead of being sent, allowing the devs to inspect thre result.

6 0
4 followers
Viewed: 135 802 times
Version: 2.0
Category: How-tos

Themed translations (i18n)

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

Yii v2 snippet guide III

Created 5 years ago by rackycz rackycz, updated 9 months ago by rackycz rackycz.

Articles are separated into more files as there is the max lenght for each file on wiki.

8 0
4 followers
Viewed: 257 507 times
Version: 2.0
Category: Tutorials

Clear CGridView Filters, Sort & Pager

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

Interview Questions For YII2

Created 4 years ago by aayushmhu aayushmhu, updated a year ago by aayushmhu aayushmhu.

Hey Everyone, In this post I Just shared my Experience what most of interviewer ask in YII2 Interview.

2 0
2 followers
Viewed: 83 280 times
Version: 2.0
Category: Tips
Tags: interview

How to filter data using a dropdown list?

Created 17 years ago by qiang qiang, updated 13 years ago by Yang He 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: 52 594 times
Version: 1.1
Category: Tutorials
Tags:

Understanding series articles

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

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

16 0
12 followers
Viewed: 18 266 times
Version: 1.1
Category: Tips

How to use Highslide for image popups

Created 17 years ago by mocapapa mocapapa, updated 15 years ago by wei 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: 35 409 times
Version: 1.1
Category: Tutorials
Tags: image, popups

Application-driven database with CDbMigration and an extended CActiveRecord

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

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

8 0
10 followers
Viewed: 18 721 times
Version: 1.1
Category: Others

GridView show sum of columns in footer.

Created 3 years ago by shiv shiv.

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

2 0
1 follower
Viewed: 121 373 times
Version: 2.0
Category: Tips

How to Create and Use Validator Using Regular expressions

Created 3 years ago by aayushmhu aayushmhu.

There are Multiple Ways to Create a Validator But here we use Regular Expression or JavaScript Regular Expression or RegExp for Creation Validators. In this article, we will see the most Frequently Used Expression

4 0
1 follower
Viewed: 150 565 times
Version: 2.0
Category: How-tos