You are here: Re: [SMARTY] How to capitalize work with HTML_SELECT_DATE « Smarty Templates Posts « IT news, forums, messages
Re: [SMARTY] How to capitalize work with HTML_SELECT_DATE

Posted by "messju mohr" on 06/13/05 16:18

On Mon, Jun 13, 2005 at 08:29:44AM -0400, Reynier Perez Mira wrote:
>
> Hi list:
> I try to create a SELECT contains DATE. Reading into Smarty Doc I found HTML_SELECT_DATE but I have some questions. For example if I use them in this way:
> {html_select_date prefix="startdate" start_year="2000" end_year="+1"|capitalize}
> How I know in wich var I found days, months and years separately

in $_REQUEST['startdateDay'], $_REQUEST['startdateMonth'] and
$_REQUEST['startdateYear'].

> and why if I use capitalize the first letter contains in month select doesn't capitalize fine?

because you applied capitalize only to the end_year attribute and not
to html_select_date's output.

{html_select_date|capitalize prefix="startdate" start_year="2000" end_year="+1"}

would capitalize the whole ouput, but this also capitalizes the
html-tag and -attribute names, which is very likely not what you want.


IMHO you have these choices:

- live with capitalized tag-names and values, which may result in
funny side-effects.

- find a locale with capitalized month-names or build one.

- hack {html_select_date} to suit your need.

greetings
messju

> Take a look to my code:
> [PHP Code]
> <?php
> setlocale(LC_ALL,'esp_ESP');
> session_start();
> require(".././class/smarty/Smarty.class.php");
> $tpl = new Smarty();
> $tpl->template_dir = "../themes/admin/";
> $tpl->compile_dir = "../themes/themes_c/";
> $tpl->config_dir = "../themes/config/";
> $tpl->compile_check = true;
> $tpl->display("admin_header.tpl");
> $tpl->display("configuracion.tpl");
> $tpl->display("admin_footer.tpl");
> ?>
>
> Reynier Pérez Mira
> 3er. año Ing. Informática

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация