Wiki articles

Showing 101-120 of 802 items.

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 556 times
Version: 1.1
Category: Tips
Tags: database, null

Single table inheritance

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

Relational databases do not support inheritance so if we need to represent it, we have to somehow store meta info while keeping performance by minimizing JOINs. One way to solve this problem is using single table inheritance. All fields for the whole class tree are stored in a single table. Class name is stored in the type field...

34 0
36 followers
Viewed: 44 483 times
Version: 1.1
Category: How-tos

Sub-domains with different databases in Yii!

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

I used another example posted here a while back where the person was modifying the index.php and adding in a switch case for different domains and loading separate config files. This was actually too much for me, because all my portals are the exact same (as far as routes, modules, extensions, etc) and if I ever wanted to add another route it wouldn't be feasible opening up all the config files t...

2 0
12 followers
Viewed: 20 203 times
Version: 1.1
Category: How-tos

How to write a simple application component

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

An application component is a confortable way for share information among all component of the application

14 7
14 followers
Viewed: 65 499 times
Version: 1.1
Category: How-tos

Integrating Yii with Wordpress

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

Well I finally had some time and tinkered a bit with the notion of integrating wordpress and Yii. Now for me I wanted to use Yii as a framework to develop wordpress plugins. Using some tips from imasia Article I was able to do a simple integration of yii as a wordpress plugin. The integratio...

9 1
13 followers
Viewed: 64 348 times
Version: 1.1
Category: Tips

Using CJuiDialog to edit rows in a CGridView

Created 8 years ago by Russell England, updated 8 years ago by Russell England.

I used Zaccarias excellent article as the base http://www.yiiframework.com/wiki/145/cjuidialog-for-create-new-model/

Solution

First follow the wiki above to create all the required code. Then make the following modifications in your...

3 1
11 followers
Viewed: 37 205 times
Version: 1.1
Category: Tips

How to create a wrapper for a js library

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

This wiki will explain how to include a javascript library in a widget.

16 1
21 followers
Viewed: 17 714 times
Version: 1.1
Category: How-tos

Using MBMenu and Rights to automatically create menu item for your modules

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

Using Rights generator component, we can easily create a dynamic menu, in which we scan every modules' controllers, to access the index page of them.

1 1
2 followers
Viewed: 16 399 times
Version: 1.1
Category: Tips

Search method of a model for filters when using dates - unixtimestamp in database

Created 8 years ago by Mukke, updated 8 years ago by jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 31 995 times
Version: 1.1
Category: Tips

Integrating Wordpress and Yii: yet another approach

Created 8 years ago by goncin, updated 8 years ago by goncin.
6 2
11 followers
Viewed: 30 456 times
Version: 1.1
Category: How-tos

Url: hide index.php

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

Maybe it looks simple, but some time ago I need some time to find a solution of this case. I finally got it, and I want to share that I also experienced such cases. So that it can make reference.

19 0
31 followers
Viewed: 229 147 times
Version: 1.1
Category: How-tos

yii vim eclimd how it works

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

I want to create a wiki page, and therefore im opening this discussion on this forum, for answering all questions and see other opinions, how do you use vim with yii.

8 0
8 followers
Viewed: 10 923 times
Version: 1.1
Category: How-tos
Tags: eclimd, vim, vimrc

Using Yii with Nginx and PHP-FPM

Created 8 years ago by Leric, updated 8 years ago by grigori.

This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

18 0
20 followers
Viewed: 74 389 times
Version: 1.1
Category: How-tos

BaseModuleAR class with MultiActiveRecord

Created 8 years ago by dinhtrung, updated 8 years ago by Gustavo.

MultiActiveRecord is an extension that add support for multiple database connection for your application.

2 0
0 follower
Viewed: 11 355 times
Version: 1.1
Category: Tips

CJuiDialog and AjaxSubmitButton

Created 9 years ago by tydeas_dr, updated 8 years ago by phazei.

Hello ppl. Even though i have a small experience with yii I though of writing this to help people which want to do something similar.

33 1
45 followers
Viewed: 109 982 times
Version: 1.1
Category: Tutorials
Tags: AJAX

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

adding class and links to Ctreeview node

Created 8 years ago by bingjie2680, updated 8 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: 16 959 times
Version: 1.1
Category: Tips

Update/delete model with CJuiDialog (works in CGridView)

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

This tutorial will show you how to create Ajax dialog which allows to create new model, update or delete existing model. It works with simple links, CGridView button column links, adds a minimal amount of code and degrades gracefully with JavaScript turned off.

15 0
25 followers
Viewed: 72 149 times
Version: 1.1
Category: Tutorials

Moving project code outside of webroot (plus multiple project support)

Created 8 years ago by Steve Friedl, updated 8 years ago by Steve Friedl.

Yii's by-default directory organization works well enough, but there are several steps one can take that improve the security and serviceability of the system, especially in the context of multiple Yii projects on the same machine (including multiple versions of the same project).

21 1
19 followers
Viewed: 56 450 times
Version: 1.1
Category: How-tos

三步使用cronjobs自动化去执行Yii 控制台任务

Created 8 years ago by Darwin Wen, updated 8 years ago by Darwin Wen.

这篇文章将介绍使用Linux cronjobs去自动化执行Yii Console Application(控制台)任务,像每天晚上执行缓存清理,临时文件清理,发送邮件,网站备份等等,重复的工作都交给服务器后台去完成,Yii本身已经提供了强大的支持,我们所做的工作就很少,当使用yiic webapp 自动生成工程结构时,强大的Yii已经全部帮我们生成好,仅仅只需三步。

0 4
2 followers
Viewed: 22 846 times
Version: 1.1
Category: Tutorials