Articles in category "how-tos", sorted by viewsX
Displaying 191-200 of 354 result(s).

Sub-domains with different databases in Yii!

Created 5 years ago by jwerdHow-tos5 comments – viewed 15,637 times – ( +2 ) – version 1.1
Sub-domains with different databases in Yii!

Changing Controllers Name

Created 5 years ago by TrejderHow-tos0 comments – viewed 15,630 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.

How to handle decimal separators (e.g comma instead of dot) for l18n

Created 4 years ago by jpabloHow-tos2 comments – viewed 15,139 times – ( +2 ) – version 1.1
Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

get summary of related model via STAT relation

Created 3 years ago by rootbearHow-tos2 comments – viewed 15,090 times – ( +7 / -1 ) – version 1.1
typical scenario: invoice, invoice items.

Insert a multirow header in CGridView

Created 3 years ago by PeppeHow-tos2 comments – viewed 15,054 times – ( +6 ) – version 1.1
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way you can write columns grouping headers, and obtain a nicer view.

How to re enable logging during unit testing

Created 4 years ago by AsgarothHow-tos3 comments – viewed 15,008 times – ( +11 ) – version 1.1
Some of you have experienced the need to log some information while doing unit testing, due to the fact that the information given in the summary is just not enough, to know why the test is actually failing. this article focuses on 2 ways to get you logs up and running again.

Use CGridview to sort and filter CSqlDataProvider - when used with UNRELATED tables (or complex queries)

Created 2 years ago by Gerhard LiebenbergHow-tos6 comments – viewed 15,008 times – version 1.1
I have two tables called hospitals and departments. I have a junction table between them which holds the departments in each hospital. But sometimes I need a list of "All hospitals with All possible departments" - regardless of whether they are linked in the junction table or not.

Remove Byte Order Mark (BOM) from files recursively

Created 3 years ago by Kostas Apazidis (KonApaz)How-tos3 comments – viewed 14,985 times – ( +5 / -1 ) – version all
Ok, this wiki is not only for yii projects.

Create sitemap.xml file dynamically on root folder with one hit

Created 3 years ago by kiran sharmaHow-tos1 comment – viewed 14,837 times – ( +5 / -5 ) – version 1.1
I had created one controller file which can create sitemap.xml file(which is used for seo, google crawler and many other puropse) dynamically with one run.
tags: SEO, SiteMap, XML

YouTube API v2.0 – Browser-based Uploading

Created 4 years ago by VaibhavHow-tos1 comment – viewed 14,719 times – ( +6 ) – version 1.1
Through the YouTube API you can upload files directly to the Youtube server. Youtube currently offers two services 1. Direct Link 2. Browser Based Uploading. In this wiki I will demonstrate how you can quickly set Browser Based Uploading for your Yii application. This is the protocol request that takes place.