Wiki

Sorted by viewsX
Displaying 101-110 of 784 result(s).

Write & use a custom Component in Yii2.0

Created 2 years ago by sirin kHow-tos5 comments – viewed 63,244 times – ( +18 / -1 ) – version 2.0
This is a simple example in Yii2.0 to understand how you can write a custom component and use it inside your app.(basic template)

X-Sendfile - serve large static files efficiently from web applications

Created 6 years ago by Maurizio Domba CerinHow-tos5 comments – viewed 63,111 times – ( +26 / -1 ) – version 1.1
Normally when we want users to download a file, that file is put in a folder under the web application root and the web server does the rest.

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

Created 5 years ago by c@cbaTutorials3 comments – viewed 62,674 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...

Using standard filters in CGridView custom fields

Created 6 years ago by GOshaHow-tos4 comments – viewed 62,657 times – ( +17 / -1 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

How To Customize CMenu Output

Created 6 years ago by AngeloTutorials7 comments – viewed 62,246 times – ( +10 / -1 ) – version 1.1
CMenu comes with a lot of great customization options built in but sometimes you need it to do more.
tags: menu

Displaying image in a CGridView column.

Created 5 years ago by sirin kHow-tos5 comments – viewed 62,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

How to display static pages in Yii?

Created 8 years ago by qiangTutorials2 comments – viewed 61,829 times – ( +19 / -1 ) – version 1.1
In a Web application, we often need to display pages like "about this site", "legal information", whose content are mostly static. There are several approaches to deal with this kind of pages.
tags: static pages

Yii and XAMPP server on Windows

Created 6 years ago by TrejderTutorials0 comments – viewed 60,814 times – ( +3 / -1 ) – version 1.1
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.
tags: windows, xampp, server

Using Yii with Nginx and PHP-FPM

Created 6 years ago by LericHow-tos10 comments – viewed 60,217 times – ( +18 / -1 ) – version 1.1
This config is built on an Ubuntu 11.04 server. Software is nginx, php-fpm (php5-fpm). For performance, it's recommended to run php-fpm in SOCKET mode, instead of accessing via IP:PORT. That is the method shown below.

YiiBoilerplate - Setup a professional project structure in seconds

Created 4 years ago by Antonio RamirezOthers53 comments – viewed 59,332 times – ( +48 / -1 ) – version 1.1
YiiBoilerplate
tags: directory, config