Wiki articles

Showing 201-220 of 799 items.

ISA hierarchy of tables inside a database and how to implement a single form

Created 8 years ago by pligor, updated 8 years ago by pligor.

Please consider the following Dear software engineers imagine I have a simple ISA hierarchy: parent A with children B and C. So let's say we have the corresponding tables named "a", "b", "c" and (created with the help of the gii model creator) the classes A, B, C The following is a screenshot from MySQL workbench: ![MySQL workbench screenshot](http://s4.postimage.org/4tuwkm43d/Screenshot.pn...

1 0
3 followers
Viewed: 13 573 times
Version: 1.1
Category: How-tos

Turn Web HTML Into Newsletter

Created 6 years ago by yasen, updated 6 years ago by yasen.

These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.

6 0
9 followers
Viewed: 13 625 times
Version: 1.1
Category: How-tos

Directory independent extensions

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

Many people want to use downloaded extensions in their own way. As for me most of the extensions require me to correct Yii::import() instructions inside their source code. All these extensions are directory dependent. To avoid the situation described above, I suggest to implement pseudo-anonymous aliases:

// take the curr...
16 1
7 followers
Viewed: 13 701 times
Version: 1.1
Category: Tips

Using phpseclib with Yii

Created 6 years ago by nkd, updated 6 years ago by nkd.

I installed phpseclib because I needed to do some AES encryption in my project. After all the hassle of installing php lib, I found out that Yii already has a security module (securityManager). I finally decided to keep using phpseclib because it has one big advantage over Yii securityManager module, it does...

0 0
6 followers
Viewed: 13 725 times
Version: 1.1
Category: How-tos
Tags: security

Using the jamselect widget with min and max values

Created 8 years ago by got 2 doodle, updated 8 years ago by wei.

The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.

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

How to show a Captcha in CForm?

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

In this wiki I will show how could use a Captcha in yii CForm. The easy way to show captcha image is create a form using CHtml method & CActiveForm, but CForm also should be able to show a captcha.

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

Implementing a Flat User Access System

Created 6 years ago by Trejder, updated 6 years ago by Trejder.

This article shows a quick and easy way to implement flat user access control system. Flat means, that user access is controlled by level only, which is solution exactly opposite to complex RBAC access systems.

6 0
7 followers
Viewed: 13 804 times
Version: 1.1
Category: How-tos

CGridView keep focus on the control after filtering

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

You can find the reason why I wrote this article here.

5 0
10 followers
Viewed: 13 809 times
Version: 1.1
Category: How-tos

two or more different collected data in one CGridView

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

Assume that you have teachers and students model.

2 1
6 followers
Viewed: 13 892 times
Version: 1.1
Category: How-tos

Building a search GET request with scenarios ; calling a SearchModel from URLs...

Created 4 years ago by Louis Gac, updated 4 years ago by Louis Gac.

Search Models are a very elegant and powerful way to build an Active Data Provider. If you use them a lot, you'll quickly need to use scenarios, which will lead you to a very DRY Controller code.

0 0
2 followers
Viewed: 13 906 times
Version: 2.0
Category: Tips

WordPress Role Based Authentication in Yii

Created 5 years ago by Bob G, updated 5 years ago by CeBe.

This tutorial is for people that are integrating Yii into WordPress. Meaning that WordPress is the host platform, and that Yii will be handling AR, CRUD, etc.

4 0
8 followers
Viewed: 14 032 times
Version: 1.1
Category: Tutorials

Extending CJuiDialog

Created 7 years ago by dstudio, updated 7 years ago by Maurizio Domba Cerin.

Sometimes you have CJuiDialog with different content but same buttons (or width, height). If you don't want to repeat yourself this is a great solution:

1 2
2 followers
Viewed: 14 126 times
Version: 1.1
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: 14 199 times
Version: 1.1
Category: How-tos

关于Yii CHttpSession性能优化篇之源码流程分析

Created 8 years ago by Darwin Wen, updated 7 years ago by Maurizio Domba Cerin.

当我们使用Yii数据库去保存Session时,只要简单的配置就可以完成这个功能,在进行性能优化这个主题之前,我们先来查看一下CHttpSession和CDBHttpSession源代码,探讨CHttpSession和CDBHttpSession的流程再进行深一步优化主题。

0 1
2 followers
Viewed: 14 253 times
Version: 1.1
Category: Tips

Building Page Specific Menus using CMenu

Created 6 years ago by mistryb, updated 4 years ago by mistryb.

The Yii Framework provides a sweet functionality that allows you to easily create page specific menus. What does this mean? This allows you to create one layout or CSS styling for your menu, and when each page is loaded, a new set of menu items is loaded in. This is useful for context specific sidebars within your application.

0 0
3 followers
Viewed: 14 282 times
Version: 1.1
Category: How-tos
Tags: CMenu

Ordering Models by Weight with CJuiSortable

Created 9 years ago by Matt Kelliher, updated 6 years ago by Phil Loaiza.

In this tutorial we will be setting up a content type to be ordered by weight using the JUI Sortable plugin.

9 0
10 followers
Viewed: 14 317 times
Version: 1.1
Category: Tutorials
Tags:

Upload Files to Rackspace Cloud Files CDN

Created 6 years ago by StephenMiracle, updated 6 years ago by StephenMiracle.

** I actually made this into an extension for easier use. You can view the extension: http://www.yiiframework.com/extension/rackspaceconnect/

2 0
3 followers
Viewed: 14 363 times
Version: 1.1
Category: Tutorials

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

Created 7 years ago by c@cba, updated 7 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: 14 419 times
Version: 1.1
Category: How-tos

Getting nulls from database instead of empty strings

Created 8 years ago by samdark, updated 8 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: 14 482 times
Version: 1.1
Category: Tips
Tags: database, null

model rules depended by user roles-permissions

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