Wiki

Sorted by ratingX
Displaying 251-260 of 785 result(s).

Database driven Cmenu

Created 5 years ago by twisted1919How-tos0 comments – viewed 26,295 times – ( +13 / -2 ) – version 1.1
This is a simple example that will give you a base for designing a database driven menu system that will use CMenu to be rendered.

Setting application parameters dynamically in the back-end

Created 5 years ago by PablovpTutorials6 comments – viewed 40,352 times – ( +13 / -2 ) – version 1.1
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.

Displaying image in a CGridView column.

Created 5 years ago by sirin kHow-tos5 comments – viewed 63,242 times – ( +13 / -2 ) – version 1.1
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

Avoiding duplicate script download when using Ajax calls to render different Views

Created 6 years ago by Antonio RamirezTips6 comments – viewed 24,311 times – ( +13 / -2 ) – version 1.1
I had to partially render two types of views, depending on user selection. Wanted to display a GRID or a LIST style with an event that AJAX'ed new contents and update a layer with them.
tags: tutorial, AJAX, views

Multiple Databases and Multiple Domains

Created 7 years ago by got 2 doodleTutorials2 comments – viewed 40,927 times – ( +15 / -3 ) – version 1.1
Add these lines in /config/main.php
tags: database

Updating fields on a form with Ajax and Json

Created 6 years ago by Russell EnglandHow-tos4 comments – viewed 57,600 times – ( +12 / -2 ) – version 1.1
I'm developing a website that has an option to look up a car's registration number via SOAP and return additional details such as make, model, colour etc.

Adding a date range search for CGridView the easy way

Created 4 years ago by mikewalenTips6 comments – viewed 32,166 times – ( +12 / -2 ) – version 1.1
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

Avoiding duplicate script download when using CActiveForm on Ajax calls

Created 6 years ago by Antonio RamirezTutorials2 comments – viewed 20,295 times – ( +12 / -2 ) – version 1.1
Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX'ed dialog/slide form rather than reloading the page to just display one or two fields.

RBAC Super Simple with Admin and User

Created 2 years ago by evercodeTutorials11 comments – viewed 60,725 times – ( +17 / -4 ) – version 2.0
One of the common requests I see in the forum is how to implement RBAC. While you can implement Yii 2's built-in RBAC, that might be too much for developers who are just starting with Yii 2 or have simpler needs. Sometimes you are looking for a fast solution and just want two flavors, user and admin. And even if you will eventually need more, you can use these methods as a starting point for developing your own features or move on to Yii 2's RBAC.

Cgridview counter column

Created 4 years ago by Nisanth thulasiTips5 comments – viewed 6,354 times – ( +9 / -1 )
some times we want to show the serialNo on cgridview .