Wiki articles

Showing 61-80 of 650 items.

Simple Web APIs for your Yii App

Created 6 years ago by shiv, updated 6 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: 26 211 times
Version: 1.1
Category: How-tos
Tags: API, JSON

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

Login Form With email or Whatever

Created 6 years ago by nabil abdouali, updated 6 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: 24 630 times
Version: 1.1
Category: How-tos

CPhpAuthManager - how it works, and when to use it

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

It is actually mentioned in the documentation

1 2
6 followers
Viewed: 27 372 times
Version: 1.1
Category: How-tos

Yii 1.1.17 Ubuntu AutoInstall Bash Script

Created 4 years ago by Preacher, updated 4 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: 9 444 times
Version: 1.1
Category: Others

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

Created 9 years ago by Davidhhuan, updated 9 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: 9 938 times
Version: 1.1
Category: Tutorials

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

Created 7 years ago by Alexander Palamarchuk, updated 7 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: 12 114 times
Version: 1.1
Category: Tips
Tags: config

Setting static modules' properties in config

Created 7 years ago by Alexander Palamarchuk, updated 7 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: 11 813 times
Version: 1.1
Category: Tips
Tags: config, module

An easy way to use escopes and CActiveDataProvider

Created 9 years ago by Rafael Garcia, updated 9 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: 34 007 times
Version: 1.1
Category: Tips

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

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

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

1 1
3 followers
Viewed: 18 835 times
Version: 1.1
Category: Tips

Create URL to language switcher anchor with langhandler

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

This topic is related with langhandler extension

1 1
2 followers
Viewed: 7 936 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 690 times
Version: 1.1
Category: Tips

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

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

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

1 1
1 follower
Viewed: 12 243 times
Version: 1.1
Category: Tips

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

Created 5 years ago by Ankit Modi, updated a year 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: 42 082 times
Version: 1.1
Category: Tutorials

Add model validator in Controller

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 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: 23 754 times
Version: 1.1
Category: Tips

Simple access control

Created 7 years ago by szfjozsef, updated 7 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: 42 686 times
Version: 1.1
Category: Tutorials

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

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

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

2 3
9 followers
Viewed: 36 088 times
Version: 1.1
Category: Tips

Extending an ActiveRecord model

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

protected $_viewFile

2 3
7 followers
Viewed: 23 669 times
Version: 1.1
Category: How-tos

AutoTimestampBehavior

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

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

2 2
3 followers
Viewed: 17 548 times
Version: 1.1
Category: Tutorials
Tags:

"safe" and "unsafe" Model validators (massive assignments)

Created 6 years ago by Kostas Apazidis (KonApaz), updated 3 years ago by brianvu.

Ok, it is a little bit difficult to full understanding the unsafe validator.

2 2
7 followers
Viewed: 29 487 times
Version: 1.1
Category: How-tos