Showing 161-180 of 219 items.

Yii and XAMPP server on Windows

Created 16 years ago by Trejder Trejder, updated 16 years ago by Trejder Trejder. 0 comments

This article explains issues about installing XAMPP server package (Lite version) on Windows OS and configuring it for serving webapps written in Yii. Please note, that XAMPP is available for many more platforms and systems. I write about Windows edition as it was the only one tested by me.

3 0
0
Viewed: 85 371 times
Version: 1.1
Category: Tutorials

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

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 3 comments

    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 `...

19 1
14
Viewed: 86 025 times
Version: 1.1
Category: Tutorials

How to log changes of ActiveRecords?

Created 17 years ago by pfth pfth, updated 14 years ago by Yang He Yang He. 7 comments

A simple and effective way to keep track what your users are doing within your application is to log their activities related to database modifications. You can log whenever a record was inserted, changed or deleted, and also when and by which user this was done. For a [CActiveRecord] Model you could use a behavior for this purpose. This way you will be able to add log functionality to ActiveRecor...

31 1
47
Viewed: 86 609 times
Version: 1.1
Category: Tutorials

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

Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 37 comments

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 http://something.com/en/contact in english, and http://something.com/de/contact in german. This tutorial describes how to make it happen.
Note that currently selected language is always a part...

28 0
42
Viewed: 86 677 times
Version: 1.1
Category: Tutorials

Use different environments (development, production, etc) in your app with EASY Environment Class

Created 16 years ago by nancoder nancoder, updated 15 years ago by marcovtwout marcovtwout. 6 comments

Hi, I was having problems each time I had to test the site or edit something on my local machine, like changing the db connection, change the debug mode to false, the trace level to 0, disable Gii, etc. So I created a class to resolve all my problems, hope to help you in your projects!

7 0
7
Viewed: 88 456 times
Version: 1.1
Category: Tutorials

    Create / Generate PDF files with TCPDF plugin (Example to generate Table with TCPDF plugin)

    Created 13 years ago by codesutra codesutra, updated 12 years ago by codesutra codesutra. 11 comments

    Few days ago i was playing with TCPF plugin to create a PDF files. Since i have checked few available extension and also checked some forum threads but still i dont get my expected result for PDF file.

    4 0
    11
    Viewed: 90 549 times
    Version: 1.1
    Category: Tutorials

    How to create a breadcrumb widget

    Created 17 years ago by knut knut, updated 14 years ago by Yang He Yang He. 4 comments

    Here's a simple way to create a breadcrumb widget to be used in your templates. The idea is just to isolate how the breadcrumb is generated based on an array of crumbs.

    10 0
    11
    Viewed: 91 179 times
    Version: 1.1
    Category: Tutorials

      Custom Number Formatting or Decimal Separators and i18n

      Created 14 years ago by c@cba c@cba, updated 14 years ago by c@cba c@cba. 8 comments

      By default, the decimal separator in php (also in mysql) is a dot (.). So when we work with floats in Yii (in calculations, validation, sql statements etc.), the decimal separator has to be a dot. If we want to use for example a comma (,) as the decimal separator, that is if we want to display numbers and enable users to enter numbers with a comma before the decimals, we have to...

      4 0
      16
      Viewed: 96 292 times
      Version: 1.1
      Category: Tutorials

      Create Excel File with PHPExcel Plugin (Insert Image in Excel Sheet ,Use Template to Create Excel File, Create New Sheet)

      Created 13 years ago by codesutra codesutra, updated 11 years ago by codesutra codesutra. 6 comments

      This is an example for how to create Excel File with PHPExcel library.This article is inspired by Wikki Article return by Antonio Ramirez and extension created by marcovtwout for [PHPExcel library](https://github.co...

      Organize directories for applications with front-end and back-end

      Created 17 years ago by qiang qiang, updated 8 years ago by CeBe CeBe. 10 comments

      Large applications are often divided into front-end and back-end (or even more ends) depending on the target user groups. The front-end should be used by common users, while the back-end mainly the administrators or staff members. The two ends usually have dramatically different appearance, even though they may share a lot of code underneath. In this tutorial, we describe a way of organizing direc...

      25 0
      34
      Viewed: 108 371 times
      Version: 1.1
      Category: Tutorials