Sorted by viewsX
Displaying 411-420 of 779 result(s).

Simple Web APIs for your Yii App

Created 2 years ago by shivHow-tos4 comments – viewed 16,559 times – ( +2 / -2 ) – version 1.1
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 mixed approach saves lot of time on server side. We not really need to handle actual REST requests and still be able to exchange data between web and mobiles or ajax java-scripts or even node.js.
tags: API, JSON

Create a custom menu using CMenu data-items (flat or tree structure)

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 16,437 times – ( +4 ) – version 1.1
There are cases that you want more control to your menu Suppose you want a specific menu with complex css, layout, images. also you want to add extra content,html,css,javascript etc it run time foreach submenu item by conditions.

Extending CActiveForm for some form display fixes and language tweaks

Created 5 years ago by TrejderTips0 comments – viewed 16,398 times – ( +5 ) – version 1.1
In this simple example I'll demonstrate how to extend CActiveForm class to overload some drawing functions to achieve some commonly used fixes in forms.

Generate a multi-lever array sub-category for a menu

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos8 comments – viewed 16,365 times – ( +10 ) – version 1.1
Everyone have seen a multilayer menu in several CMS

BUM - Add Additional Info to a User

Created 3 years ago by fireflyHow-tos1 comment – viewed 16,338 times – ( +1 ) – version 1.1
How to add additional information to a user when using BUM extension?

Customizing Yii's formatting rules (extending CFormatter)

Created 5 years ago by HaenselTips0 comments – viewed 16,239 times – ( +14 ) – version 1.1
CFormatter is one of Yii's core components and used to format values displayed in widgets like CGridView or CDetailView. All classic formats like numbers, text, urls or datetime are supported but you may have to use a formatting rule that isn't built in. Let's say we want to display arrays of strings (like tags associated with a product model). When using CDetailView we would usually make use of PHPs implode function to create a simple string value of all values in the $product->tags array.

Impersonate Users within Yii Framework

Created 5 years ago by WoilTutorials6 comments – viewed 16,203 times – ( +22 ) – version 1.1
For some applications it can be advantageous for administration reasons to allow site administrators to login as other users. This is sometimes called user impersonation or "becoming that user".

Extending an ActiveRecord model

Created 3 years ago by BogseyHow-tos3 comments – viewed 16,201 times – ( +2 / -3 ) – version 1.1

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created 3 years ago by Gerhard LiebenbergHow-tos0 comments – viewed 16,060 times – ( +4 / -1 ) – version 1.1
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

Starting with YII 1.1.x in Windows Environment (WAMP)

Created 2 years ago by Rajith RTutorials0 comments – viewed 15,851 times – ( +8 ) – version 1.1
As we know YII is the Leading Framework of PHP. Lots of new developers are starting to use YII day by day. Most of the beginners are little bit confused with how to start with YII . I think this note will help them. Follow the simple steps To run a Yii-powered Web application, you need a Web server that supports PHP 5.1.0.
tags: newbie, yii, yiic