Articles in category "tutorials", sorted by date (updated)X
Displaying 181-190 of 255 result(s).

Starting your Yii Project Reference Guide (with Git VCS in Linux)

Updated 5 years ago by marcanuyTutorials5 comments – viewed 32,093 times – ( +18 / -1 ) – version 1.1
I've found useful to have a step by step reference guide to work with Git with most used commands, feel free to update it with useful information you may find interesting too.

config Use MS SQL SERVER 2005 2008.

Updated 5 years ago by AsgarothTutorials2 comments – viewed 56,990 times – ( +4 / -1 ) – version 1.1
Use SQL SERVER 2000, the date format not like: yyyy/mm/dd hh:mm:ss. So I change to use SQL SERVER 2008 EXPRESS.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Updated 5 years ago by c@cbaTutorials3 comments – viewed 65,959 times – ( +28 / -2 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...

Front-end developer's guide

Updated 5 years ago by waitekkTutorials5 comments – viewed 28,891 times – ( +11 / -1 ) – version 1.1
This wiki is a work in progress.

Collaborative software with git

Updated 5 years ago by Maurizio Domba CerinTutorials0 comments – viewed 8,684 times – ( +9 / -1 ) – version 1.1
The most difficult thing in a big project, is to manage conflicts with files modified by others users. Git can do this work for us.

Exporting CGridView results to CSV file

Updated 6 years ago by RusAlexTutorials9 comments – viewed 49,751 times – ( +6 / -4 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

Setting application parameters dynamically in the back-end

Updated 6 years ago by PablovpTutorials6 comments – viewed 42,022 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.

Multiple file upload handler

Updated 6 years ago by hasanaviTutorials2 comments – viewed 26,019 times – ( +6 / -1 ) – version 1.1

SEO-conform Multilingual URLs + Language Selector Widget (i18n)

Updated 6 years ago by c@cbaTutorials37 comments – viewed 61,066 times – ( +32 / -1 ) – version 1.1
You have a multilingual application, and you want the URL of a page to be different for different languages, to account for SEO. The URL for the contact page for example should look like in english, and in german. This tutorial describes how to make it happen. Note that currently selected language is always a part of the URL, and thus available to the application through $_GET. You don't have to use sessions variables to keep track of the language if you don't want to.

Manage (Target) Language in Multilingual Applications + A Language Selector Widget (i18n)

Updated 6 years ago by c@cbaTutorials10 comments – viewed 38,130 times – ( +15 / -1 ) – version 1.1
In case of a multilingual application, one might consider it a reasonable approach to store the preferred language of the user in a session variable, and after that, every time a page is requested, to check this session variable and render the page in the indicated language. This tutorial shows a Yii-way of doing this. We implement an event handler for the onBeginRequest event; as the name of the event suggests, this event handler will be called at the beginning of each request, so its a good place to check whether a language is provided (via post, session or cookie) and set the application language accordingly. We also implement a simple Language-Selector Widget, which can render the language options as ajax-links or as a drop-down list.