Wiki

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

Extending CActiveForm for some form display fixes and language tweaks

Created 5 years ago by TrejderTips0 comments – viewed 16,336 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.

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

Created 2 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 16,301 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.

Simple Web APIs for your Yii App

Created 2 years ago by shivHow-tos4 comments – viewed 16,269 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

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

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

Customizing Yii's formatting rules (extending CFormatter)

Created 5 years ago by HaenselTips0 comments – viewed 16,153 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,096 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,061 times – ( +2 / -3 ) – version 1.1
Introduction

BUM - Add Additional Info to a User

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

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

Created 3 years ago by Gerhard LiebenbergHow-tos0 comments – viewed 15,907 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.

Open Dialog from ajax content

Created 3 years ago by TouzasHow-tos1 comment – viewed 15,734 times – ( +4 / -1 ) – version 1.1
This tutorial will show you how to create Ajax dialog. It's very simple code.