Wiki articles

Showing 1-20 of 822 items.

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 947 times
Version: 1.1
Category: Tips

How to add Schema.org markup to Yii2 pages

Created 3 years ago by Gabriel A. López López, updated 3 years ago by 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.

2 0
3 followers
Viewed: 49 779 times
Version: 2.0
Category: How-tos

model rules depended by user roles-permissions

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

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

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

Yii Rights Management Tips

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

yii rights some tips..

2 0
4 followers
Viewed: 13 183 times
Version: 1.1
Category: Tips

Search a file size range in CGridView

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

Gettext and Poedit HOWTO

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

Example settings when using Gettext for i18n.

0 0
2 followers
Viewed: 12 969 times
Version: 1.1
Category: Tutorials

Api of Multiple File Uploading in Yii2

Created 3 years ago by fezzymalek, updated a year ago by 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: 63 081 times
Version: 2.0
Category: Tutorials

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 461 times
Version: 1.1
Category: How-tos

How to redirect all emails to one inbox on Yii2 applications

Created 3 years ago by 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: 102 440 times
Version: 2.0
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

Yii v2 snippet guide III

Created 3 years ago by rackycz, updated 8 months ago by rackycz.

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

8 0
4 followers
Viewed: 136 964 times
Version: 2.0
Category: Tutorials

Clear CGridView Filters, Sort & Pager

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

Interview Questions For YII2

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

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

2 0
2 followers
Viewed: 54 386 times
Version: 2.0
Category: Tips
Tags: interview

How to filter data using a dropdown list?

Created 15 years ago by qiang, updated 11 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: 41 850 times
Version: 1.1
Category: Tutorials
Tags:

Understanding series articles

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

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

16 0
12 followers
Viewed: 14 042 times
Version: 1.1
Category: Tips

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

Convert JSON data to html table for display on page

Created a year ago by shiv.

I have a calls which help me display json directly in html table.

0 0
1 follower
Viewed: 67 979 times
Version: all
Category: Tips
Tags: html, JSON

Application-driven database with CDbMigration and an extended CActiveRecord

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

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

8 0
10 followers
Viewed: 16 371 times
Version: 1.1
Category: Others

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