Wiki articles in category How-tos

Showing 81-100 of 292 items.

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 670 times
Version: 1.1
Category: How-tos
Tags: SEO, SiteMap, XML

Using setFlash for displaying various kind of messages

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

In this short how-to I will show how to customize setFlash() to display messages (flashes) styled to be success confirmation, error report or notice information. And how to achieve displaying errors in other way.

5 4
6 followers
Viewed: 91 818 times
Version: 1.1
Category: How-tos

Caching strategy

Created 10 years ago by darkheir, updated 10 years ago by CeBe.

Note: Before reading this wiki you should have read the caching part in the Yii guide

3 1
12 followers
Viewed: 11 795 times
Version: 1.1
Category: How-tos

How to hide `index` action from URL

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

Here is my experiment inspired by my own question and others from the forum.

3 1
9 followers
Viewed: 24 663 times
Version: 1.1
Category: How-tos
Tags: index

Cheat Sheet: Displaying Name instead of Numbers and Displaying Alphanumeric instead of numeric values

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

I keep a reference to some simple but painful task if you forget a common or something. I am new to Yii and this took awhile for me to figure out. Everything I read said do this or do that and not a single one worked for me. However, the following did.

3 1
6 followers
Viewed: 31 151 times
Version: 1.1
Category: How-tos

Twitter Bootstrap style Breadcrumbs

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

will generate twitter bootstrap styled breadcrumb code:

3 1
4 followers
Viewed: 53 917 times
Version: 1.1
Category: How-tos

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 266 times
Version: 1.1
Category: How-tos

Clear CGridView Filters, Sort & Pager

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

Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.

2 0
3 followers
Viewed: 18 690 times
Version: 1.1
Category: How-tos

How to pass the third parameter to UserIdentity on login authentication

Created 9 years ago by Rohit Suthar, updated 9 years ago by Rohit Suthar.

In this wiki I will show how could wo pass the third parameter to UserIdentity on login authenticate. So we can do separate login authentcation from two or more different models from single login form.

2 0
5 followers
Viewed: 34 361 times
Version: 1.1
Category: How-tos

How to validate the uniqueness of multiple columns

Created 9 years ago by oligalma, updated 8 years ago by oligalma.

I am going to show you an effective way to validate the uniqueness of multiple columns.

2 0
2 followers
Viewed: 18 368 times
Version: 1.1
Category: How-tos

How to register scripts and css

Created 9 years ago by oligalma, updated 8 years ago by oligalma.

Then, we write this in the config > main.php:

2 0
3 followers
Viewed: 93 723 times
Version: 1.1
Category: How-tos

How to handle decimal separators (e.g comma instead of dot) for l18n

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

Yii i18n does not cover decimal format. Some languages like Spanish (I live in Argentina) uses comma ',' instead of dot '.' as decimal separator.

2 0
10 followers
Viewed: 22 681 times
Version: 1.1
Category: How-tos
Tags:

ClientValidation for files (modern browsers)

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

There are cases that you want to validate the file format, size, extension etc but how to do that without submit the form ?

2 0
6 followers
Viewed: 18 148 times
Version: 1.1
Category: How-tos

Take more control of CGridview and model searching (related model or another controller)

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

Suppose you have an Application in Yii that manages hotels each one has many customers.

2 0
6 followers
Viewed: 41 613 times
Version: 1.1
Category: How-tos

Using the jamselect widget with min and max values

Created 13 years ago by got 2 doodle, updated 13 years ago by wei.

The keywords will be stored in a text field in a comma delimited format. The keywords will be created by the site administrator.

2 0
1 follower
Viewed: 18 700 times
Version: 1.1
Category: How-tos

Publish yii webapp using Git push

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

I did not invent this instructions, I read it somewhere and re-organized in my way as I was trying and it works for me;

2 0
8 followers
Viewed: 19 132 times
Version: 1.1
Category: How-tos
Tags: git

HOW TO: Use token based authentication

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

After reading the other wiki article regarding token based access, I thought that it might be interesting to share my method.

2 0
10 followers
Viewed: 44 045 times
Version: 1.1
Category: How-tos

Simple Multiple Environment Setup with Default Yii Installation

Created 10 years ago by Ibrar Turi, updated 10 years ago by CeBe.

After installing Yii basic application on our systems, most of the time we want to have multiple environment such as local, dev and live setup. Most of the times when we want to make changes to configuration file, we have to over-write configurations file for each environment.

2 0
8 followers
Viewed: 16 758 times
Version: 1.1
Category: How-tos

YouTube API v2.0 – Browser-based Uploading

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

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.

2 0
7 followers
Viewed: 24 057 times
Version: 1.1
Category: How-tos