Wiki

Articles in category "how-tos", sorted by commentsX
Displaying 111-120 of 355 result(s).

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

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 20,064 times – ( +4 / -6 ) – version 1.1
Ok, it is a little bit difficult to full understanding the unsafe validator.

Multiple Database Connection : Select database based on login user id, Dynamic

Created 3 years ago by Rajith RHow-tos4 comments – viewed 25,849 times – ( +9 / -6 ) – version 1.1
create a class file under protected\components named RActiveRecord.php

Visualization tree-multi subcategories as listbox or dropdownlist

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 14,826 times – ( +4 ) – version 1.1
Do you want to make a listbox or dropdownlist to select one or more categories or sub categories ?

Tarpit for bad bots

Created 5 years ago by mitherealHow-tos4 comments – viewed 6,925 times – ( +1 ) – version 1.1
I recently built a tarpit for bad bots.
tags: tarpit, bots

Drop down list with enum values for column of type ENUM >+> incorporate into giix

Created 4 years ago by c@cbaHow-tos4 comments – viewed 34,885 times – ( +14 ) – version 1.1
Let's say our table 'mug' has a column named 'color' of the type ENUM('red','green','blue'). We want to replace the textfield for the attribute color in the create and update forms of a 'mug' with a drop down list, which has the enum values as options. The main code was contributed by zaccaria in the forum (see this post).

Load data from internal/external source to fill form fields

Created about a year ago by skwordenHow-tos4 comments – viewed 11,307 times – ( +1 ) – version 2.0
This wiki is to show you how to use jQuery get and JSON to get data from a dropdown/any form field and fill form fields with the values instantaneously. First, I'll give example use cases of what I'm going to teach you so you can quickly see if this is for you.

CGridView keep focus on the control after filtering

Created 4 years ago by jayalaHow-tos4 comments – viewed 10,381 times – ( +6 ) – version 1.1
You can find the reason why I wrote this article here.
tags: CGridView, filter

Simple Share Widget for Facebook, twitter and google+

Created 4 years ago by softarkHow-tos4 comments – viewed 22,634 times – ( +10 ) – version 1.1
This widget will show a Facebook "like" button and "comments" box together with "tweet" button and "google plusone" button on your page.

How to include Javascript, CSS

Created 3 years ago by InterboyHow-tos4 comments – viewed 379,726 times – ( +11 / -3 ) – version 1.1
There are many methods that we can include javascript, css into your Yii App. Today I will demonstrate three simple and helpul methods.

Simple Web APIs for your Yii App

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