Wiki articles

Showing 181-200 of 651 items.

Search method of a model for filters when using dates - unixtimestamp in database

Created 13 years ago by Mukke, updated 12 years ago by jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 37 192 times
Version: 1.1
Category: Tips

htmlOptions explained for various controls.

Created 13 years ago by Woil, updated 13 years ago by Woil.

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:

15 0
14 followers
Viewed: 65 772 times
Version: 1.1
Category: Tips

Functional tests independing from your urlManager settings

Created 13 years ago by RusAlex, updated 13 years ago by RusAlex.

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:

0 0
4 followers
Viewed: 12 369 times
Version: 1.1
Category: Tips

Open bootstrap modal and load content via Ajax

Created 9 years ago by JbalTero, updated 9 years ago by JbalTero.

My goal here is to Open bootstrap modal and load ANY content using ajax response.

1 0
2 followers
Viewed: 61 647 times
Version: 1.1
Category: How-tos

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

Created 11 years ago by Alexander Palamarchuk, updated 11 years ago by ajsharma.

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

1 1
4 followers
Viewed: 17 366 times
Version: 1.1
Category: Tips
Tags: config

yii vim eclimd how it works

Created 13 years ago by RusAlex, updated 12 years ago by RusAlex.

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.

8 0
8 followers
Viewed: 12 861 times
Version: 1.1
Category: How-tos
Tags: eclimd, vim, vimrc

URL component access functions

Created 13 years ago by Steve Friedl, updated 13 years ago by Steve Friedl.

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.

28 0
16 followers
Viewed: 19 015 times
Version: 1.1
Category: Tips
Tags: request, URL

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

Created 11 years ago by kiran sharma, updated 11 years ago by kiran sharma.

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.

2 1
9 followers
Viewed: 63 614 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML

caching controllers with filters()

Created 13 years ago by RusAlex, updated 13 years ago by Maurizio Domba Cerin.

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

2 0
8 followers
Viewed: 17 701 times
Version: 1.1
Category: How-tos

MigrateCommand class for multiple sites using one code base

Created 11 years ago by Hudson Nguyen, updated 11 years ago by Hudson Nguyen.

My CMS supports multiple sites using one code base therefore the db connection can only be configured by detecting the site's domain.

0 0
2 followers
Viewed: 6 061 times
Version: 1.1
Category: How-tos
Tags:

A simple action for XUpload extension

Created 12 years ago by tydeas_dr, updated 12 years ago by tydeas_dr.

All the basic functionality for an action used by the xupload extension. Check resources for the source code of this action

3 0
5 followers
Viewed: 20 207 times
Version: 1.1
Category: Tips

Turn Web HTML Into Newsletter

Created 11 years ago by yasen, updated 10 years ago by yasen.

These newsletters have always been hard to create as regular web HTML is not properly read by web email interfaces and email clients. I thought that the simplest solution would be to use a web page that would serve as a web version of the newsletter and turn it somehow into newsletter HTML.

6 0
9 followers
Viewed: 16 484 times
Version: 1.1
Category: How-tos

Logout CSRF Protection

Created 12 years ago by Rodrigo Coelho, updated 12 years ago by Rodrigo Coelho.

CSRF is the acronymn for Cross-site request forgery.
It is an attack which forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated.

10 0
11 followers
Viewed: 29 492 times
Version: 1.1
Category: Tutorials

Using Bootstrap with LESS

Created 11 years ago by Chris83, updated 11 years ago by Chris83.

I discovered Twitter Bootstrap almost two years ago. After trying it out for a while I fell in love with it. It didn't take long before I realized that it would be great to write an extension that allowed developers to start using Bootstrap in their Yii projects. One night I sat down and started writing what later became my now popular [bootstrap extension](http://ww...

11 0
14 followers
Viewed: 55 594 times
Version: 1.1
Category: How-tos

Limit a CGridView field to some preset length.

Created 11 years ago by le_top, updated 10 years ago by le_top.

Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

9 0
9 followers
Viewed: 22 145 times
Version: 1.1
Category: How-tos

Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Created 9 years ago by Louis Gac, updated 9 years ago by Louis Gac.

Let's take the example of the above article to display an email button next to a delete button:

3 0
4 followers
Viewed: 22 170 times
Version: 1.1
Category: Tutorials

Make the authentication more securely

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

Suppose a hacker has an account of your website He could set the PHPSESSID to empty After of that He login in your system The PHPSESSID remains blank and user has already logged with this session

2 0
3 followers
Viewed: 15 396 times
Version: 1.1
Category: Tutorials

Custom Login Error Messages

Created 11 years ago by whoopass, updated 11 years ago by whoopass.

The Yii Framework is very powerful and it provides a lot of functionality right from the pre-built webapp. One of the nice things that is already established for you as a developer is the Login authentication. While the default configuration simply sets it up to run against an array of hard coded usernames and passwords, the [Yii Blog Tutorial](http://www.yiiframework.com/doc/blog/1.1/en/prototype...

6 0
8 followers
Viewed: 51 289 times
Version: 1.1
Category: Tutorials

Open Dialog from ajax content

Created 11 years ago by Touzas, updated 11 years ago by Touzas.

This is the code in the View.

<?php echo CHtml::link('MyDialog', Yii::app()->createUrl('site/page'), array('class' => 'openDlg divDialog')); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id'=>'divDialog',
	'options'=>array( 'title'=>Yii::t('Dialog Title', 'autoOpen'=>false, 'modal'=>true, 'width'=>600)));
?>
	<div class="divForForm"></div>
<?php
$this->endWidget(...
3 1
5 followers
Viewed: 24 227 times
Version: 1.1
Category: How-tos

using jqbargraph to create beautiful graphs

Created 11 years ago by MAHESH.E.U, updated 11 years ago by MAHESH.E.U.

If you are about to create a graph, the best option i would suggest is the jqbargraph.

5 0
9 followers
Viewed: 11 424 times
Version: 1.1
Category: Tips