Wiki articles

Showing 201-220 of 822 items.

How to obtain a grammatically correct translation of the model name in giix-generated view files

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

The giix code generator has out of the box i18n support for model names and attribute labels (besides other cool features > check it out!) .
But I want to factor in not only the plural form, but also the grammatical cases (especially the accusative) while translating 'Manage Objects', 'Create Object', 'Edit Object' etc.

4 0
1 follower
Viewed: 19 186 times
Version: 1.1
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 259 times
Version: Unknown (update)
Category: How-tos

i18n for your model in just 1 line

Created 14 years ago by mintao, updated 13 years ago by Orteko.

A simple trick to get the localized version of a model field is to add this little method to your models.

12 0
9 followers
Viewed: 19 332 times
Version: 1.1
Category: Tutorials
Tags: i18n

Email by YiiMailer, Call Outlook, IMAP

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

In Yii community we have lots of extention can send emails, such as YiiMailer and Swift and so on, or even IMAPI, thanks for team contribution. However, sometimes, in the intranet enviroment, the program cannot run successfully since SMTP /IMAP port been banded. So you need to seek other ways. The most simple way is call outlook as COM.

0 0
6 followers
Viewed: 19 419 times
Version: 1.1
Category: How-tos

Catching bounce messages (NDR) and piping them to a Yii command

Created 11 years ago by bennouna, updated 10 years ago by bennouna.

But in the supposedly small share of webapps that don't ask users to activate their accounts, you can end up with a number of bounce messages and non-accessible active accounts.

1 0
7 followers
Viewed: 19 426 times
Version: 1.1
Category: Tutorials

adding class and links to Ctreeview node

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

This article will show you how to add links and class to each node in ctreeview. so you can attach events in js by obtaining handler on anchor or class.

4 0
6 followers
Viewed: 19 530 times
Version: 1.1
Category: Tips

REST API and null values in XML

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

I have been working on a REST API using the excellent tools provided by Yii2. My problem was that I have to differentiate between empty values and null values. In other words, <elem></elem> is different from null as it represents an empty string. Also, although some use <elem/> to represent a null value it should still be interpreted as an empty string. In other cases, the absence of the eleme...

0 0
0 follower
Viewed: 19 534 times
Version: 2.0
Category: Tips
Tags: null, REST, XML

How to extend CFormatter, add i18n support to booleanFormat and use it in CDetailView

Created 12 years ago by c@cba, updated 12 years ago by c@cba.

As you know, the CDetailView widget displays details of a single model. If no formatting is specified, boolean values that are stored in the database as 0 and 1, are represented in the detail view as 0 and 1. If formatted as boolean, they are represented as 'No' and 'Yes'. We want to add i18n support, so that Yes and No appear in the current language.

9 0
9 followers
Viewed: 19 563 times
Version: 1.1
Category: How-tos

Before Query Example : Soft Delete

Created 8 years ago by moo.tensai, updated 8 years ago by moo.tensai.

This is how i do before query on Yii 2.0

0 0
3 followers
Viewed: 19 600 times
Version: 2.0
Category: How-tos

Execute migration on server/linux using shell

Created 8 years ago by darioo, updated 8 years ago by 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: 19 601 times
Version: 2.0
Category: How-tos

How to prevent Login from two places?

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

In this wiki I will show how to Disallowing login from multi places. User can login or access their account at time, only single place.

0 0
5 followers
Viewed: 19 616 times
Version: 1.1
Category: Tutorials

Save uploaded file with any filename characters

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

First of all this is a very common problem, for more details see this post http://www.yiiframework.com/forum/index.php/topic/52052-upload-file-with-any-charset/

1 0
3 followers
Viewed: 19 640 times
Version: 1.1
Category: How-tos

How to use BootstrapInterface

Created 9 years ago by Antonio Ramirez, updated 9 years ago by Antonio Ramirez.

Yii2 introduces the BootstrapInterface to ease our application initialization tasks, whether they are composer based or Application bootstrap (do not mistaken with Bootstrap CSS Framework) based tasks. On this article, I am going to explain how to use it on y...

2 0
3 followers
Viewed: 19 662 times
Version: 2.0
Category: How-tos

An important tip when you are using CArrayDataProvider.

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

Yii's CArrayDataProvider is very helpful to display model relation data's directly on it.But it is truely a confusing one because by default it will assume a table field named “id” as primary key for its pagination purpose and what if you dont have field named “id” as primary key on your table? so its truely confusing and if you tried to display without an “id” field on ur table you will get an...

5 1
5 followers
Viewed: 19 748 times
Version: 1.1
Category: Tips

CJuiTabs Content

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

When I used CJuiTabs I did something. They are

2 0
7 followers
Viewed: 19 753 times
Version: 1.1
Category: Tips
Tags: CJuiTabs

CGridView customized CCheckBoxColumn

Created 10 years ago by chandran, updated 10 years ago by CeBe.

Hi friends,

3 0
6 followers
Viewed: 19 845 times
Version: 1.1
Category: Tips

History Autocomplete

Created 12 years ago by zaccaria, updated 12 years ago by Maurizio Domba Cerin.

In application development we often have to choose how to mange recurrent values.

3 0
9 followers
Viewed: 19 848 times
Version: 1.1
Category: How-tos

Rendering a view file in a console application

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

When someone want to send formatted HTML mails from a console application she/he will probably come across the problem of rendering view files.

2 1
7 followers
Viewed: 19 854 times
Version: 1.1
Category: How-tos

More security in your applications with Yii and PHPIDS

Created 13 years ago by Rafael Garcia, updated 13 years ago by Gustavo.

PHPIDS is a well known project that can be found in php-ids.org.

6 0
14 followers
Viewed: 20 016 times
Version: 1.1
Category: How-tos

Getting nulls from database instead of empty strings

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

To get null from database instead of empty strings you need to set up your DB connection as follows:

13 0
11 followers
Viewed: 20 042 times
Version: 1.1
Category: Tips
Tags: database, null