Wiki

Sorted by viewsX
Displaying 681-690 of 784 result(s).

Attaching multiple event handlers to onBeginRequest

Created 3 years ago by BoazHow-tos0 comments – viewed 7,426 times – ( +2 / -1 ) – version 1.1
There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).

Multilanguage Lorem Ipsum Text Generator

Created 4 years ago by yasenHow-tos2 comments – viewed 7,422 times – ( +2 / -1 ) – version 1.1
Taking futher the idea from Piotr MaseĊ‚kowski - http://www.yiiframework.com/extension/elipsum/ here's how to generate multilanguage Lorem Ipsum text. This example uses English and Bulgarian sample paragraphs. Create a class in /protected/components/LoremIpsum.php. Wall of text incoming wohoo...

A Single Page with a List and a Detail

Created 11 months ago by softarkHow-tos1 comment – viewed 7,363 times – ( +4 / -1 ) – version 2.0
The CRUD generator of Gii has done a wonderful job for you, and you already have a list of items in the "index" page and a detailed view of a specified item in the "view" page.
tags: gridview, detail, ajax

YII2 Pagination Options

Created 2 years ago by VivekYiiTips0 comments – viewed 7,324 times – ( +1 / -1 ) – version 2.0
solution here If we are using default pagination option like
tags: pagination, View, vivs

How to store array/widget configuration to the database with config validation rules

Created 3 years ago by Kartik VTutorials0 comments – viewed 7,243 times – ( +39 / -5 ) – version 2.0
You may have scenarios, where you want to store a specific array configuration to the database. A classic example could be saving Yii widget configuration to the database and then retrieving it at runtime, with dynamic parameters set. This wiki discusses one of the approaches to do this. Let's consider you have something like the NavBar configuration below to store in the db:

Implementing menu items with progress (wait) dialog

Created 4 years ago by TrejderHow-tos0 comments – viewed 7,240 times – ( +1 / -1 ) – version 1.1
This article shows one of possible ways to implement menu items (as well as links), which displays a progress / wait dialog and are redirecting browser to destination URL in the same time. This is especially useful, for links or routes that are know to be loaded for a prolonged period of time (i.e. getting a lot of data from database).

Advanced CGridview issues - custom button using php and html

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 7,231 times – ( +1 / -1 ) – version 1.1
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)

Tarpit for bad bots

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

Multiple CGridView virtual attributes, retrieved from a single model function. Also communication between CGridView columns and rows; and between CGridView and its own parent view.

Created 2 years ago by Gerhard LiebenbergHow-tos3 comments – viewed 7,176 times – ( +1 / -1 ) – version 1.1
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:

an easy way to required multi columns(At least one cannot be blank)

Created 5 years ago by 1065227709Tips0 comments – viewed 7,102 times – ( +2 / -1 ) – version 1.1
in model add the following code:
tags: rules