Wiki articles

Showing 101-120 of 822 items.

Managing a star rating with the StarRating widget in Yii 2

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

In Yii 1.x, there was a built in widget CStarRating based on the jquery star rating plugin. There exists no prebuilt solution in Yii2, however the same concepts can be extended using any jquery plugin.

1 3
41 followers
Viewed: 24 013 times
Version: 2.0
Category: How-tos
1 3
3 followers
Viewed: 10 330 times
Version: 1.1
Category: How-tos

[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 608 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 470 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

Overcoming removal of client helpers (e.g. ajaxLink) and ClientScript in Yii 2.0

Created 9 years ago by Kartik V, updated 9 years ago by Kartik V.

Alternatively, inline assets (JS/CSS) can be registered at runtime from within the View. For example you can clearly simulate the ajaxLink feature using a inline javascript. Its however recommended if you can merge where possible, client code (JS/CSS) into separate JS/CSS files and loaded through the AssetBundle. Note there is no more need of a CClientScript anymore:

1 2
41 followers
Viewed: 43 325 times
Version: 2.0
Category: FAQs

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

Aadhar Number Validator

Created a year ago by shiv.

In India have Aadhar number an we may need to valid it a input. So I created a validator for yii2

1 1
1 follower
Viewed: 66 297 times
Version: 2.0
Category: Tips
Tags: validator

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 368 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 212 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 597 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 791 times
Version: 1.1
Category: Tips