Articles in category "how-tos", sorted by viewsX
Displaying 161-170 of 346 result(s).

How to hide index.php on Microsoft Windows Server with IIS7

Created 3 years ago by GiulianoHow-tos2 comments – viewed 15,486 times – ( +10 ) – version 1.1
I've seen lot of people struggling in finding a way to hide the script name when installing their Yii Application. In an Apache environment everything is well documented in this wiki article, but for those who are running their app on a Windows Server machine there are no hints.

How to create a Widget - Recent Comments widget

Created about a year ago by Nisanth thulasiHow-tos3 comments – viewed 15,433 times – ( +8 ) – version all
Here's a simple way to create a Recent comments showing widget to be used in your templates. The idea is just to highlighting your blog's new comments.

Using updateAll and deleteAll with scopes

Created about a year ago by le_topHow-tos4 comments – viewed 15,433 times – ( +5 ) – version 1.1
Using CActiveRecord->updateAll() and CActiveRecord->deleteAll() with scopes and criteria requires some tricks that are explained in this article. While findAll() , find() and some other methods use scopes automatically, updateAll() and deleteAll() do not.

Displaying uploaded file from DB for update with FileInput widget

Created about a year ago by Kartik VHow-tos3 comments – viewed 15,231 times – ( +39 / -5 ) – version 2.0
This is for folks who are using \kartik\widgets\FileInput to upload files from your client. How do you display an image for update after you have uploaded it to the server using the widget?

Update a part of content using AJAX when select a GridView row

Created about a year ago by Kostas Apazidis (KonApaz)How-tos2 comments – viewed 14,920 times – ( +4 ) – version 1.1
Suppose you want to refresh a form or any content when a single row of CGridView is selected

Simple example for language translation

Created about a year ago by RKAHow-tos2 comments – viewed 14,674 times – ( +1 ) – version 1.1
Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.
tags: yii, i18n

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

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

CSV Export

Created 3 years ago by JohnPollardHow-tos5 comments – viewed 14,331 times – ( +4 ) – version 1.1
I needed a csv export function for my cgridview and I wanted to export the entire result set of the sorted and filtered cgridview the user was viewing via ajax.
tags: csv, export

Changing Controllers Name

Created 4 years ago by TrejderHow-tos0 comments – viewed 14,213 times – ( +5 ) – version 1.1
This very short how-to presents steps required to change controller name. It is oriented for less experienced users, which are starting their journey with Yii, to avoid common newbie pitfalls.

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

Created about a year ago by Kostas Apazidis (KonApaz)How-tos0 comments – viewed 14,154 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.