Wiki articles

Showing 61-80 of 651 items.

[Updated] How to create & call custom global function in whole application?

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

In this wiki I will show how to create own custom global function. It may be save the space and reduce the time.

1 3
5 followers
Viewed: 36 606 times
Version: 1.1
Category: Tutorials

Simple Web APIs for your Yii App

Created 10 years ago by shiv, updated 9 years ago by CeBe.

Its very common now-a-days to have Mobile app for web apps. For Mobile apps we need web APIs to fetch data or even post/update on web. We found a very simple method to make such interface. Mobile App can call plain get or post request and receive data back in JSON format. JSON is relatively easy for mobile app to handle while plain standard GET/POST request for easy for Web server to handle. This...

1 2
10 followers
Viewed: 32 467 times
Version: 1.1
Category: How-tos
Tags: API, JSON

Extending CJuiDialog

Created 11 years ago by dstudio, updated 11 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: 18 302 times
Version: 1.1
Category: How-tos

Login Form With email or Whatever

Created 9 years ago by nabil abdouali, updated 9 years ago by nabil abdouali.

Here is my solution to login with email or anything else This update works with database mysql You must generate the user model with GII

1 2
2 followers
Viewed: 31 712 times
Version: 1.1
Category: How-tos

CPhpAuthManager - how it works, and when to use it

Created 12 years ago by dckurushin, updated 12 years ago by François Gannaz.

It is actually mentioned in the documentation

1 2
6 followers
Viewed: 32 003 times
Version: 1.1
Category: How-tos

Yii 1.1.17 Ubuntu AutoInstall Bash Script

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

Just thought I would share this bash script I wrote to help automate a base install of YII on an Ubuntu server. This script does the following:

1 1
1 follower
Viewed: 11 721 times
Version: 1.1
Category: Others

embed a view file of the class which implement the CAction.

Created 13 years ago by Davidhhuan, updated 13 years ago by Davidhhuan.

In Yii, we can define an action class and ask the controller to instantiate it. And we always create ourselves actions class in rootPath/protected/extensions, and the view file we called in the actions class always are located in rootPath/protected/views/ControllerNAME or rootPath/themes/ThemeNAME/ControllerNAME, then when we use the same actions class in different controllers, we have to copy it...

1 1
2 followers
Viewed: 25 109 times
Version: 1.1
Category: Tutorials

Making friends' configs, DB credentials and paths with version control

Created 11 years ago by Alexander Palamarchuk, updated 11 years ago by ajsharma.

In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test s...

1 1
4 followers
Viewed: 17 366 times
Version: 1.1
Category: Tips
Tags: config

Setting static modules' properties in config

Created 11 years ago by Alexander Palamarchuk, updated 11 years ago by Alexander Palamarchuk.

You may face a situation when you need to access to a configurable module's property from everywhere and you don't have an instance of this module's class.

1 1
2 followers
Viewed: 14 211 times
Version: 1.1
Category: Tips
Tags: config, module

An easy way to use escopes and CActiveDataProvider

Created 12 years ago by Rafael Garcia, updated 12 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: 36 844 times
Version: 1.1
Category: Tips

Speedup unit tests by moving MySql data to memory (in Ubuntu)

Created 11 years ago by seb, updated 11 years ago by François Gannaz.

There are several ways to speedup slow unit tests which interact with database:

1 1
3 followers
Viewed: 22 595 times
Version: 1.1
Category: Tips

Create URL to language switcher anchor with langhandler

Created 9 years ago by Anas AbuDayah, updated 9 years ago by Anas AbuDayah.

This topic is related with langhandler extension

1 1
2 followers
Viewed: 10 893 times
Version: 1.1
Category: Tips

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

Created 12 years ago by dinhtrung, updated 12 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: 18 096 times
Version: 1.1
Category: Tips

Yii CDBHttpSession数据库存储session性能优化实战

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

上一篇 关于 Yii CHttpSession性能优化篇之源码流程分析 有详细分析CHttpSession执行流程,在了解CHttpSession的详细执行流程之后,我们就可以非常轻松的扩展Yii Session,来优化和符合自己的业务流程。

1 1
1 follower
Viewed: 14 096 times
Version: 1.1
Category: Tips

How to display Dependent drop-down value using ajax call with dynamically

Created 9 years ago by Ankit Modi, updated 5 years ago by samdark.

Hi Friends, In this tutorial I write a code display dependent drop-down value using ajax call.

1 1
6 followers
Viewed: 49 644 times
Version: 1.1
Category: Tutorials

Add model validator in Controller

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

There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way

1 1
3 followers
Viewed: 30 790 times
Version: 1.1
Category: Tips

Simple access control

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

For those who feel, the Controller->accessRules() or RBAC (Role-Based Access Control) is too complicated or doesn't want the username(s) to be hard-coded in accessRules(), here is a very simple, easy-to-implement solution.

3 7
10 followers
Viewed: 46 051 times
Version: 1.1
Category: Tutorials

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

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

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

2 3
9 followers
Viewed: 39 870 times
Version: 1.1
Category: Tips

Extending an ActiveRecord model

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

protected $_viewFile

2 3
7 followers
Viewed: 28 646 times
Version: 1.1
Category: How-tos

AutoTimestampBehavior

Created 15 years ago by jonah, updated 11 years ago by Yang He.

This behavior will automatically set timestamp fields to the row creation and modification times.

2 2
3 followers
Viewed: 22 524 times
Version: 1.1
Category: Tutorials
Tags: