Wiki

Sorted by commentsX
Displaying 451-460 of 600 result(s).

htmlOptions explained for various controls.

Created 3 years ago by WoilTips1 comment – viewed 37,359 times – ( +17 ) – version 1.1
Most controls that are rendered by CHtml have an argument called $htmlOptions. This argument is an array that holds the attributes of the HTML element. For example the following code:

Functional tests independing from your urlManager settings

Created 3 years ago by RusAlexTips1 comment – viewed 6,959 times – version 1.1
If you are testing your app and use urlManager in your config, sometimes you will find a problem: you want to test your site independing from urlManager settings. in that way you need to extend your WebTestCase class by this method:

Making friends' configs, DB credentials and paths with version control

Created about a year ago by Alexander PalamarchukTips1 comment – viewed 4,484 times – ( +2 / -1 ) – version 1.1
In many cases developers of one project use their own local environments for coding. There may be a common test platform and, of course, production. All these environments usually have different DB credentials and directory structures (first of all, path to YII framework directory). Another feature is debugging. It's convenient to turn it on for local environments, eventually - on the test server and never (generally speaking) - on the production.
tags: config

yii vim eclimd how it works

Created 3 years ago by RusAlexHow-tos1 comment – viewed 6,990 times – ( +10 ) – version 1.1
I want to create a wiki page, and therefore im opening this discussion on this forum, for answering all questions and see other opinions, how do you use vim with yii.
tags: vim, eclimd, vimrc

Create custom button button with AJAX function in CGridView

Created about a year ago by nkdHow-tos1 comment – viewed 27,331 times – ( +11 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

URL component access functions

Created 3 years ago by Steve FriedlTips1 comment – viewed 9,846 times – ( +28 ) – version 1.1
Many applications wish to obtain parts of the URL for the current page (the hostname, the query string, etc.), and the CHttpRequest class wraps various $_SERVER variables to break down the URL into its constituent parts.
tags: URL, request

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

Created about a year ago by kiran sharmaHow-tos1 comment – viewed 8,374 times – ( +5 / -4 ) – 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

caching controllers with filters()

Created 3 years ago by RusAlexHow-tos1 comment – viewed 8,921 times – ( +2 ) – version 1.1
Hello, this article will describe some aspects about caching controllers with filters() method in your controller. And I will describe some problems I meet when using this approach for caching, the main problem was

MigrateCommand class for multiple sites using one code base

Created about a year ago by Hudson NguyenHow-tos1 comment – viewed 2,743 times – ( +1 ) – version 1.1
My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.

A simple action for XUpload extension

Created 2 years ago by tydeas_drTips1 comment – viewed 12,068 times – ( +3 ) – version 1.1
All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action
tags: tips, xupload, caction