Wiki articles

Showing 181-200 of 650 items.

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

Created 9 years ago by Mukke, updated 8 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: 32 827 times
Version: 1.1
Category: Tips

htmlOptions explained for various controls.

Created 9 years ago by Woil, updated 9 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: 61 767 times
Version: 1.1
Category: Tips

Functional tests independing from your urlManager settings

Created 9 years ago by RusAlex, updated 9 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: 10 987 times
Version: 1.1
Category: Tips

Open bootstrap modal and load content via Ajax

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

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

1 0
2 followers
Viewed: 55 247 times
Version: 1.1
Category: How-tos

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

Created 7 years ago by Alexander Palamarchuk, updated 7 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: 12 115 times
Version: 1.1
Category: Tips
Tags: config

yii vim eclimd how it works

Created 9 years ago by RusAlex, updated 8 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: 11 197 times
Version: 1.1
Category: How-tos
Tags: eclimd, vim, vimrc

URL component access functions

Created 9 years ago by Steve Friedl, updated 9 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: 16 339 times
Version: 1.1
Category: Tips
Tags: request, URL

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

Created 7 years ago by kiran sharma, updated 7 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: 21 411 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML

caching controllers with filters()

Created 9 years ago by RusAlex, updated 9 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: 15 461 times
Version: 1.1
Category: How-tos

MigrateCommand class for multiple sites using one code base

Created 7 years ago by Hudson Nguyen, updated 7 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: 4 886 times
Version: 1.1
Category: How-tos
Tags:

A simple action for XUpload extension

Created 9 years ago by tydeas_dr, updated 9 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: 18 184 times
Version: 1.1
Category: Tips

Turn Web HTML Into Newsletter

Created 7 years ago by yasen, updated 7 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: 14 188 times
Version: 1.1
Category: How-tos

Logout CSRF Protection

Created 9 years ago by Rodrigo Coelho, updated 9 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: 23 583 times
Version: 1.1
Category: Tutorials

Using Bootstrap with LESS

Created 7 years ago by Chris83, updated 7 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: 50 589 times
Version: 1.1
Category: How-tos

Limit a CGridView field to some preset length.

Created 7 years ago by le_top, updated 7 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: 17 277 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 5 years ago by Louis Gac, updated 5 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: 17 514 times
Version: 1.1
Category: Tutorials

Make the authentication more securely

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 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: 10 875 times
Version: 1.1
Category: Tutorials

Custom Login Error Messages

Created 7 years ago by whoopass, updated 7 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
9 followers
Viewed: 45 274 times
Version: 1.1
Category: Tutorials

Open Dialog from ajax content

Created 7 years ago by Touzas, updated 7 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: 20 945 times
Version: 1.1
Category: How-tos

using jqbargraph to create beautiful graphs

Created 7 years ago by MAHESH.E.U, updated 7 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: 10 149 times
Version: 1.1
Category: Tips