Wiki

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

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

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

yii2-app-advanced on single domain (Apache, Nginx)

Created 2 years ago by MadAndHow-tos4 comments – viewed 66,344 times – ( +9 / -1 ) – version 2.0
If you develop rather complex applications with Yii2, you might already be familiar with yii2-app-advanced application template. Well, the template is awesome and provides high flexibility regarding code/configuration sharing among parts of an application.

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

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

Visualization tree-multi subcategories as listbox or dropdownlist

Created 4 years ago by Kostas Apazidis (KonApaz)How-tos4 comments – viewed 16,221 times – ( +4 / -1 ) – 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 7,418 times – ( +1 / -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 5 years ago by c@cbaHow-tos4 comments – viewed 37,207 times – ( +14 / -1 ) – 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 2 years ago by skwordenHow-tos4 comments – viewed 14,307 times – ( +1 / -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 5 years ago by jayalaHow-tos4 comments – viewed 11,394 times – ( +6 / -1 ) – 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 5 years ago by softarkHow-tos4 comments – viewed 23,654 times – ( +10 / -1 ) – 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.

Simple Web APIs for your Yii App

Created 3 years ago by shivHow-tos4 comments – viewed 20,061 times – ( +2 / -3 ) – 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