Wiki

Sorted by viewsX
Displaying 401-410 of 741 result(s).

Simple example for language translation

Created about a year ago by RKAHow-tos2 comments – viewed 12,154 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

Get 'source' data from the database - for TbEditableColumn or EditableColumn ('type'=>'select' / dropdownlist)

Created about a year ago by Gerhard LiebenbergHow-tos0 comments – viewed 12,091 times – ( +4 / -1 ) – version 1.1
If you want to edit data directly in the gridview in a 'dropdownlist' style, then you could use the 'type' => 'select' option of TbEditableColumn (YiiBooster) or EditableColumn (x-editable for Yii). This wiki shows how to get data from the db for the 'dropdownlist', by converting AR model data into an array that is passed in json format.

i18n for your model in just 1 line

Created 5 years ago by mintaoTutorials0 comments – viewed 11,974 times – ( +12 ) – version 1.1
A simple trick to get the localized version of a model field is to add this little method to your models.
tags: i18n

YouTube API v2.0 – Browser-based Uploading

Created 2 years ago by VaibhavHow-tos1 comment – viewed 11,899 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.

Using events with CAction classes

Created 3 years ago by Antonio RamirezTips0 comments – viewed 11,882 times – ( +9 ) – version 1.1
There are some good guides out there explaining how to work with events and the ways to attach them to your components, but none (that I know) explain the following way to configure your events with CAction classes on your controllers the following way.

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

Created 2 years ago by kiran sharmaHow-tos1 comment – viewed 11,856 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

CSqlDataProvider in CGridView

Created about a year ago by Kostas Apazidis (KonApaz)Tutorials8 comments – viewed 11,814 times – ( +7 ) – version 1.1
In this wiki I will show how could use a CSqlDataProvider in CGridView with specific features

CJuiTabs Content

Created 2 years ago by mbalaTips2 comments – viewed 11,733 times – ( +6 ) – version 1.1
When I used CJuiTabs I did something. They are
tags: CJuiTabs

Managing constants easily

Created 3 years ago by briiC.lvTips4 comments – viewed 11,683 times – ( +4 ) – version 1.1
For time to time i have models with constants (basicly status constants) which i use in diferent places and if these constant changes, i have to change mentions of constant in code elsewhere.

How to implement cron in Yii 2

Created about a year ago by hemcHow-tos8 comments – viewed 11,651 times – ( +9 ) – version 2.0
In advance template there is already a file yii. And there is no need to run it as php, it is Linux script.
tags: cron, yii2, console