Wiki articles in category Tips

Showing 121-140 of 158 items.

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

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

How to ensure unicity to url

Created 7 years ago by zaccaria, updated 7 years ago by marcovtwout.

Many time for SEO porpouses is important that each page will have a unique address.

13 0
17 followers
Viewed: 17 096 times
Version: 1.1
Category: Tips
Tags: SEO, unique, URL

adding class and links to Ctreeview node

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

BaseModuleAR class with MultiActiveRecord

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

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

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

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 260 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: 36 986 times
Version: 1.1
Category: Tips

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

A simple class to use a different db for a module

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

What would you do if you want/need to have a different than the main database connection in an module's models?

8 0
12 followers
Viewed: 23 503 times
Version: 1.1
Category: Tips

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

Syntax check

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

This will syntax check each php file recursively from the current directory.

4 0
2 followers
Viewed: 10 661 times
Version: 1.1
Category: Tips
Tags: php, syntax

A simple action for XUpload extension

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

All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action

3 0
5 followers
Viewed: 17 663 times
Version: 1.1
Category: Tips

Yii实战中8个必备常用的扩展,模块和

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

在经过畅K网的实战后,总结一下在Yii的项目中会经常用到的组件和一些基本的使用方法,分享给大家,同时也给自己留个备忘录,下面我以代码加图片说明.

2 3
9 followers
Viewed: 35 191 times
Version: 1.1
Category: Tips

An easy way to use escopes and CActiveDataProvider

Created 8 years ago by Rafael Garcia, updated 8 years ago by Rafael Garcia.

Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.

1 1
10 followers
Viewed: 32 878 times
Version: 1.1
Category: Tips

An easy way to display a success page using flash messages

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

We often need to display a success page after the user has submitted a form without problem. We may show some welcome message after a user registers a new account. There are many ways to implement this workflow. In this article, I will explain a method that exploits flash messages.

21 0
29 followers
Viewed: 46 726 times
Version: 1.1
Category: Tips

A simple action for CJuiAutoComplete

Created 8 years ago by tydeas_dr, updated 7 years ago by Thiago Souza.

Simple as that. I have placed this action in my extension folder like:

15 1
19 followers
Viewed: 43 961 times
Version: 1.1
Category: Tips

URL component access functions

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

Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.

28 0
16 followers
Viewed: 15 521 times
Version: 1.1
Category: Tips
Tags: request, URL

Using jQuery UI 1.8.10 themes with Yii 1.1.6

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

When using the latest stable jQuery UI themes (1.8.10) with Yii 1.1.6 (which uses 1.8.6) the widgets don't appear (they're invisible but they're there). In order to make them visible you need to change the following line:

2 0
2 followers
Viewed: 19 828 times
Version: 1.1
Category: Tips

Functional tests independing from your urlManager settings

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

If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

0 0
4 followers
Viewed: 10 642 times
Version: 1.1
Category: Tips

htmlOptions explained for various controls.

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

Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

15 0
14 followers
Viewed: 60 464 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 683 times
Version: 1.1
Category: Tips