phphtmllib-devel Mailing List for phpHtmlLib (Page 162)
Status: Beta
Brought to you by:
hemna
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(33) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
(3) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
2004 |
Jan
(1) |
Feb
(8) |
Mar
(139) |
Apr
(65) |
May
(32) |
Jun
(55) |
Jul
(21) |
Aug
(60) |
Sep
(43) |
Oct
(1) |
Nov
(18) |
Dec
(34) |
2005 |
Jan
(25) |
Feb
(2) |
Mar
(49) |
Apr
(13) |
May
(40) |
Jun
(22) |
Jul
(21) |
Aug
(59) |
Sep
(178) |
Oct
(54) |
Nov
(3) |
Dec
(49) |
2006 |
Jan
(21) |
Feb
(1) |
Mar
(5) |
Apr
(29) |
May
(86) |
Jun
(79) |
Jul
(52) |
Aug
(127) |
Sep
(187) |
Oct
(90) |
Nov
(61) |
Dec
(48) |
2007 |
Jan
(79) |
Feb
(136) |
Mar
(58) |
Apr
(139) |
May
(293) |
Jun
(112) |
Jul
(138) |
Aug
(112) |
Sep
(148) |
Oct
(76) |
Nov
(29) |
Dec
(66) |
2008 |
Jan
(45) |
Feb
(60) |
Mar
(119) |
Apr
(169) |
May
(172) |
Jun
(136) |
Jul
(107) |
Aug
(114) |
Sep
(104) |
Oct
(26) |
Nov
(50) |
Dec
(48) |
2009 |
Jan
(9) |
Feb
(35) |
Mar
(22) |
Apr
(43) |
May
(83) |
Jun
(68) |
Jul
(58) |
Aug
(21) |
Sep
(23) |
Oct
(62) |
Nov
(36) |
Dec
(26) |
2010 |
Jan
(16) |
Feb
(83) |
Mar
(73) |
Apr
(51) |
May
(76) |
Jun
(96) |
Jul
(70) |
Aug
(33) |
Sep
(10) |
Oct
(1) |
Nov
(2) |
Dec
|
2011 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
(1) |
Nov
|
Dec
(1) |
2014 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
(3) |
Dec
|
2015 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Walter A. B. I. <wab...@3g...> - 2004-03-14 04:52:16
|
> To me this says there is something fundamentally wrong with PEAR that > this could even happen. With the new voting system > (http://news.php.net/article.php?group=php.pear.dev&article=25264) it > might not have happened that way if it was proposed now. We could > probably get together 7 people and force it through if we really wanted > too. Pear isn't the end all be all but if it becomes the CPAN of php it > would be a shame not to have phphtmllib in there... Converting > phphtmllib to the pear coding standards would be a massive job though-- > tons of old method names would need to be left in to not break BC. It > probably isn't worth all that work. ----yah I tend to agree, which is why I initially tried to get phphtmllib into PEAR. I had made a test version of phphtmllib converting a lot of the method names to conform to the PEAR standard and then they poo poo'd the idea. PHP5 is just around the corner, which is a big OOP boost. Maybe after we rebuild phphtmllib to take advantage of the php5 OOP stuff, we could try again w/ PEAR. I'm not sure I care about it too much :) > This sounds like a good idea. It seems like websites hosted by > sourceforge are always having problems though and they put restrictions > on what you can do with php. Having it on a colo box is probably a good > thing-- maybe just move the CVS to sourceforge? I would be willing to > help some with the site... Have you ever thought about registering > phphtmllib.net? I wonder if trying to get it into the tigris.org > registry would provide any benefits? Just more ideas... ok I'll start thinking about how to update the site. Getting the new style manual done would be really nice I think. I haven't heard of the tigris.org site. I'll poke around on it. I have so many other domains, I just decided to throw phphtmllib's web site on one of em. I have a good friend of mine that I could register it w/ for < $10/year, so that might be a good idea. It would be fairly easy to import the current site into the phphtmllib cvs account. I do have another library that I have build to ease development of my own apps that the current phphtmllib site uses. That's the only issue that I see w/ moving the cvs repos to sf.net. Walt |
From: culley h. <cu...@fa...> - 2004-03-14 00:17:17
|
On Fri, 12 Mar 2004 10:49:19 -0800, "Walter A. Boring IV" <wab...@3g...> said: > ---yah that might not be a bad idea. I'll write Harry and ask for his > permission to bundle the Calendar class. I think it includes a directory > with several files/objects. A while back Harry convinced me to propose > adding > phphtmllib to PEAR. I ended up making the proposal to the developer list > and > then proceeded to be told how much of an idiot I was for using OOP for > html. So > I haven't been a huge fan of PEAR or the developers of PEAR since. > phphtmllib > is basically a competitor to the entire html mechanism that PEAR has, and > they > felt threatened by it basically. It's no biggie. Keeping it seperate > from PEAR > gives me (us) the maximum flexibility for change and new features w/o > having to > go through what is now a big political process to add new features. Bah. > That > being said, there are several good classes in PEAR. > To me this says there is something fundamentally wrong with PEAR that this could even happen. With the new voting system (http://news.php.net/article.php?group=php.pear.dev&article=25264) it might not have happened that way if it was proposed now. We could probably get together 7 people and force it through if we really wanted too. Pear isn't the end all be all but if it becomes the CPAN of php it would be a shame not to have phphtmllib in there... Converting phphtmllib to the pear coding standards would be a massive job though-- tons of old method names would need to be left in to not break BC. It probably isn't worth all that work. > ---yah I just thought it'd be worth a try and play with it. I was able > to > generate the xmldocbook stuff from phpdocumentor, but haven't a clue how > to > convert that to the html output that php.net and pear.php.net has for > their > manual. I'm not even sure the xmldocbook output that phpdocumentor > delivers is > even good enough to do that yet. > I am not sure what is used for php docs but xmlto is often used: http://cyberelk.net/tim/xmlto/ Having this type of manual would be a big plus I think. > If you want to make sure that your changes are getting good > documentation > being generated, you can just pull down the nightly build and try the > docs in > there. I believe my build script generates the docs as well. Or you can > just > install the pear::phpDocumentor and run the phphtmllib/docs/docit.sh > script > I have it installed-- I will try it. > As a side note, I've been thinking about possibly changes to the > phphtmllib > website. The look is kinda tired now, and it'd be nice to have a php.net > style > manual on it, and also make it easier to provide new examples, and > tutorials > possibly. The current incarnation of the site is in cvs on my colocated > box, so > only I have access currerntly to maintain it. I thought about moving it > to > sourceforge as well so others could help maintain it. dunno, just an > idea > This sounds like a good idea. It seems like websites hosted by sourceforge are always having problems though and they put restrictions on what you can do with php. Having it on a colo box is probably a good thing-- maybe just move the CVS to sourceforge? I would be willing to help some with the site... Have you ever thought about registering phphtmllib.net? I wonder if trying to get it into the tigris.org registry would provide any benefits? Just more ideas... culley |
From: <he...@us...> - 2004-03-12 21:09:12
|
Update of /cvsroot/phphtmllib/phphtmllib/widgets/data_list In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15914/widgets/data_list Modified Files: DefaultGUIDataList.inc Log Message: fixed a minor bug in the DefaultGuiDataList with the action arrow image paths. Index: DefaultGUIDataList.inc =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/widgets/data_list/DefaultGUIDataList.inc,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- DefaultGUIDataList.inc 13 Feb 2004 19:41:55 -0000 1.26 +++ DefaultGUIDataList.inc 12 Mar 2004 20:49:27 -0000 1.27 @@ -870,7 +870,7 @@ $td->set_tag_attribute("align", "left"); if ($this->_has_action_column("FIRST") && $this->_datasource->get_total_rows()) { - $td->push(html_img("/phphtmllib/images/widgets/arrow_right.gif")); + $td->push(html_img($this->get_image_path()."/arrow_right.gif")); } else { $td->push(" "); @@ -880,7 +880,7 @@ $td->set_tag_attribute("align", "right"); if ($this->_has_action_column("LAST") && $this->_datasource->get_total_rows()) { - $td->push(html_img("/phphtmllib/images/widgets/arrow_left.gif")); + $td->push(html_img($this->get_image_path()."/arrow_left.gif")); } else { $td->push(" "); |
From: <he...@us...> - 2004-03-12 21:09:11
|
Update of /cvsroot/phphtmllib/phphtmllib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15914 Modified Files: CHANGELOG Log Message: fixed a minor bug in the DefaultGuiDataList with the action arrow image paths. Index: CHANGELOG =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/CHANGELOG,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- CHANGELOG 9 Mar 2004 21:54:08 -0000 1.117 +++ CHANGELOG 12 Mar 2004 20:49:27 -0000 1.118 @@ -5,10 +5,12 @@ - minor change Version 2.4.1 - DEVTBD + - fixed a minor bug in the DefaultGuiDataList with the action arrow + image paths. (UweBaumann at onlinehome.de) + Created 2 new examples: example9.php and examples/form3.php + Fixed a bug causing problems with PEAR+postgresql in the data list widget. --culley - - Added align parameter to html_img_href() (Denny Reeh <den...@gm...>) + - Added align parameter to html_img_href() (Denny Reeh <denny.reeh at gmx.de>) - Fixed a bug with the displaying of the FormElement label when the FormElement had an error. ++ Updated ArrayDataListSource to support searching of data. This removed the @@ -16,17 +18,17 @@ this is determined automatically depending on if a search was done or not. ++ Added DataList::set_showall(), which automatically shows EVERY row back from the DataListSource. When this is set the DefaultGUIDataList will not show navigation. - - Applied a minor cleanup patch to TextCSSNav from Erich Enke <twi...@fa...> + - Applied a minor cleanup patch to TextCSSNav from Erich Enke <twilit77 at fastmail.fm> + Applied a patch to FEFile that adds the ability to set the acceptable file types - and file size from cu...@fa... + and file size from culley at fastmail.fm - Fixed a small issue with the right boarder of the TextCSSNav's first element. ++ Added FERegEx and FormValidation::is_regex() to support a generic Regular expression - based FormElement from Culley Harrelson <cu...@fa...> + based FormElement from Culley Harrelson <culley at fastmail.fm> Version 2.4.0 - Feb 3, 2004 + Added Container::get_element() - to return the data element, so you can modify it post add(); - + Added align attribute parameter to html_img() - Denny Reeh <den...@gm...> + + Added align attribute parameter to html_img() - Denny Reeh <denny.reeh at gmx.de> + Added the ability to set a secondary orderby list for the DataListSource. + Added the support for the secondary orderby list in the SQLDataListSource - fixed broken css link in examples/widget9.php @@ -36,7 +38,7 @@ (thanks to Mufasa from http://www.firetiger.net/) - added another fix to prevent warnings in XMLTagClass::_render_open_tag() (thanks to Mufasa from http://www.firetiger.net/) - - added title parameter to html_area() - Denny Reeh <den...@gm...> + - added title parameter to html_area() - Denny Reeh <denny.reeh at gmx.de> - added a small fix to the HTMLPageClass::add() method when adding a widget that has a get_javascript() method. This prevents a possible warning. - fixed some tab selected bugs with ActiveTab @@ -92,8 +94,8 @@ + Added FormElement::set_tabindex() to set the tab index. + Added FormContent::set_form_tabindex, get_form_tabindex() as a helper to the FormElement::set_tabindex() method. - - fixed an incorrectly spelled variable name in DataListSource (han...@ee...) - - fixed a small js issue with the ActiveTab (mik...@me... + - fixed an incorrectly spelled variable name in DataListSource (hanefeldj at ee.nec.de) + - fixed a small js issue with the ActiveTab (mike_walsh at mentor.com Version 2.3.0 - July 31, 2003 - pulled a small issue from FormProcessor. $this->_message never used. @@ -101,7 +103,7 @@ instead of just setting it to TRUE always. - Added some tests in the FormContent element access methods, to help developing a form. It traps for invalid FormElement labels. - + Added FEFile FormElement from Dave Brondsema <da...@br...> + + Added FEFile FormElement from Dave Brondsema <dave at brondsema.net> + Started work on the FormWizard - cleanup of some warnings for the DataList widgets. - Fixed a problem with doing some queries in the PEARSQLDataListSource @@ -194,7 +196,7 @@ all lowercase, to build valid XHTML. - added HTMLPageClass::add_js_link() to replace push_js_link() - small fix in the DefuaultGUIDataList::_checkbox_javascript() to - be more flexible. Thanks Nils Droge <nd...@ha...> + be more flexible. Thanks Nils Droge <ndroege at haba-ag.de> - made sure the DataList object's form name is set. - let the user set the DataList form method to post or POST. - Don't do indentation on a PREtag @@ -209,21 +211,21 @@ any method. This helps folks create their own i18n FormErrors class. Version 2.2.2 - March 10, 2003 - - Aris Basic <ari...@si...> added a new + - Aris Basic <aris.basic at silencesoftware.com> added a new PGSQLDataListSource object, to allow folks to use the PHP built in PostgreSQL native functions for talking to a DB. This avoids the depenancy on PEAR or ADODB. - Added the xhtml_strict_attributes array to the FORMtag declaration. the attributes 'name' and 'target' are not allowed while in XHTML STRICT mode - (thanks to Philipp Morger <mo...@do...> ) + (thanks to Philipp Morger <morger at dolphins.ch> ) - fixed a minor issue in the DataList object that Richard Greene found. - cleaned up the old 'test' scripts in test. - made a small fix to the ADODBSQLDataListSource::count() method when - handling a DB error. Thanks to Nils Droge <nd...@ha...> + handling a DB error. Thanks to Nils Droge <ndroege at haba-ag.de> - fixed a problem of not being able to search fo '0' in the DataList - Thanks to Nils Droge <nd...@ha...>. + Thanks to Nils Droge <ndroege at haba-ag.de>. - made a small change to the DefaultGUIDataList to make the search area text be localizable. - Added support to change the encoding type for XHTML pages in the @@ -235,7 +237,7 @@ renders a newline after the open tag. - fixed a the DOCTYPE tag attributes for XHTML mode. It now gives the full url path to the DTD's on the W3C site. - (thanks to Philipp Morger <mo...@do...> ) + (thanks to Philipp Morger <morger at dolphins.ch> ) - fixed a small indenting problem with XMLTagClass::render_content() - Moved the SVG, WML, XML widgets into their own dirs under widgets. |
From: Walter A. B. I. <wab...@3g...> - 2004-03-12 19:00:23
|
> How about distributing it with phphtmllib? phpwiki distributes both > PEAR::DB and ADODB with its source so there is a precedent. The author > of the calendar class maintains phppatterns.com and has a positive revi= ew > of phphtmllib in one of his articles, so I am sure he would be happy to > see it included. ---yah that might not be a bad idea. I'll write Harry and ask for his permission to bundle the Calendar class. I think it includes a directory with several files/objects. A while back Harry convinced me to propose ad= ding phphtmllib to PEAR. I ended up making the proposal to the developer list= and then proceeded to be told how much of an idiot I was for using OOP for ht= ml. So I haven't been a huge fan of PEAR or the developers of PEAR since. phpht= mllib is basically a competitor to the entire html mechanism that PEAR has, and= they felt threatened by it basically. It's no biggie. Keeping it seperate fr= om PEAR gives me (us) the maximum flexibility for change and new features w/o hav= ing to go through what is now a big political process to add new features. Bah.= That being said, there are several good classes in PEAR. =20 > I saw the commit on trying to get docbook output-- that would be pretty > cool. I haven't done any testing on the documentation output-- hopeful= ly > I am not screwing things up. ---yah I just thought it'd be worth a try and play with it. I was able t= o generate the xmldocbook stuff from phpdocumentor, but haven't a clue how = to convert that to the html output that php.net and pear.php.net has for the= ir manual. I'm not even sure the xmldocbook output that phpdocumentor deliv= ers is even good enough to do that yet. =20 If you want to make sure that your changes are getting good documentati= on being generated, you can just pull down the nightly build and try the doc= s in there. I believe my build script generates the docs as well. Or you can= just install the pear::phpDocumentor and run the phphtmllib/docs/docit.sh scri= pt As a side note, I've been thinking about possibly changes to the phphtm= llib website. The look is kinda tired now, and it'd be nice to have a php.net= style manual on it, and also make it easier to provide new examples, and tutori= als possibly. The current incarnation of the site is in cvs on my colocated = box, so only I have access currerntly to maintain it. I thought about moving it = to sourceforge as well so others could help maintain it. dunno, just an ide= a Walt >=20 > culley >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Phphtmllib-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phphtmllib-devel >=20 |
From: culley h. <cu...@fa...> - 2004-03-12 15:13:51
|
On Thu, 11 Mar 2004 10:25:54 -0800, "Walter A. Boring IV" <wab...@3g...> said: > ---how would you use that to generate all of the month strings? It basically just loops around a bogus date changing the month and formating it as long month only. > ----just checked it out. Looks like a very rich object already. I think > it > would make sense to use that as a basis for the CalendarWidget. The only > downside, is that the CalendarWidget would require the Date and Calendar > pear > classes to be installed. I'd rather not have to re-invent the wheel, so > I don't > mind making the Date and Calendar classes a requirement for it. > How about distributing it with phphtmllib? phpwiki distributes both PEAR::DB and ADODB with its source so there is a precedent. The author of the calendar class maintains phppatterns.com and has a positive review of phphtmllib in one of his articles, so I am sure he would be happy to see it included. I saw the commit on trying to get docbook output-- that would be pretty cool. I haven't done any testing on the documentation output-- hopefully I am not screwing things up. culley |
From: <cu...@us...> - 2004-03-12 14:54:46
|
Update of /cvsroot/phphtmllib/phphtmllib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28509/examples Modified Files: form3.php Log Message: Added set_element_order() and changed month generation to use the built in php setlocale() function. This is still not well tested. Index: form3.php =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/examples/form3.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- form3.php 11 Mar 2004 06:01:14 -0000 1.4 +++ form3.php 12 Mar 2004 14:35:08 -0000 1.5 @@ -163,11 +163,14 @@ // FEDays($label, $required = TRUE, $width = NULL, $height = NULL) { $this->add_element(new FEDays("FEDays label", false)); + // set the locale to dutch + setlocale(LC_TIME, 'nl_NL'); + $date_element = new FEDate("FEDate label", false); - $date_element->set_locale('de'); $date_element->set_short_months(); $date_element->set_min_year(1970); $date_element->set_max_year(1975); + $date_element->set_element_order('mdy'); $this->add_element($date_element); // a list box that allows you to select multiple items @@ -324,4 +327,5 @@ $page = new Form3Page("Form Example 3"); print $page->render(); + ?> |
From: <cu...@us...> - 2004-03-12 14:54:43
|
Update of /cvsroot/phphtmllib/phphtmllib/form/form_elements In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28509/form/form_elements Modified Files: FEListBox.inc Log Message: Added set_element_order() and changed month generation to use the built in php setlocale() function. This is still not well tested. Index: FEListBox.inc =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/form/form_elements/FEListBox.inc,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- FEListBox.inc 11 Mar 2004 06:01:14 -0000 1.14 +++ FEListBox.inc 12 Mar 2004 14:35:09 -0000 1.15 @@ -807,85 +807,21 @@ class FEMonths extends FEListBox { /** - * The months array divided up by language - * @var array - */ - var $_locale = array( - 'en' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), - 'long' => array ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') - ), - 'de' => array ( - 'short' => array ('Jan', 'Feb', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez'), - 'long' => array ('Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember') - ), - 'fr' => array ( - 'short' => array ('Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec'), - 'long' => array ('Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Decembre') - ), - 'hu' => array ( - 'short' => array ('jan', 'feb', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec'), - 'long' => array ('január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december') - ), - 'pl' => array ( - 'short' => array ('Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa¼', 'Lis', 'Gru'), - 'long' => array ('Styczeñ', 'Luty', 'Marzec', 'Kwiecieñ', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpieñ', 'Wrzesieñ', 'Pa¼dziernik', 'Listopad', 'Grudzieñ') - ), - 'sl' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'), - 'long' => array ('Januar', 'Februar', 'Marec', 'April', 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December') - ), - 'ru' => array ( - 'short' => array ('ßíâ', 'Ôåâ', 'Ìàð', 'Àïð', 'Ìàé', 'Èþí', 'Èþë', 'Àâã', 'Ñåí', 'Îêò', 'Íîÿ', 'Äåê'), - 'long' => array ('ßíâàðü', 'Ôåâðàëü', 'Ìàðò', 'Àïðåëü', 'Ìàé', 'Èþíü', 'Èþëü', 'Àâãóñò', 'Ñåíòÿáðü', 'Îêòÿáðü', 'Íîÿáðü', 'Äåêàáðü') - ), - 'es' => array ( - 'short' => array ('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'), - 'long' => array ('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septimbre', 'Octubre', 'Noviembre', 'Diciembre') - ), - 'da' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), - 'long' => array ('Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December') - ), - 'is' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maí', 'Jún', 'Júl', 'Ágú', 'Sep', 'Okt', 'Nóv', 'Des'), - 'long' => array ('Janúar', 'Febrúar', 'Mars', 'Apríl', 'Maí', 'Júní', 'Júlí', 'Ágúst', 'September', 'Október', 'Nóvember', 'Desember') - ), - 'it' => array ( - 'short' => array ('Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'), - 'long' => array ('Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre') - ), - 'sk' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Máj', 'Jún', 'Júl', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), - 'long' => array ('Január', 'Február', 'Marec', 'Apríl', 'Máj', 'Jún', 'Júl', 'August', 'September', 'Október', 'November', 'December') - ), - 'cs' => array ( - 'short' => array ('Led', 'Úno', 'Bøe', 'Dub', 'Kvì', 'Èen', 'Èec', 'Srp', 'Záø', 'Øíj', 'Lis', 'Pro'), - 'long' => array ('Leden', 'Únor', 'Bøezen', 'Duben', 'Kvìten', 'Èerven', 'Èervenec', 'Srpen', 'Záøí', 'Øíjen', 'Listopad', 'Prosinec') - ), - 'hy' => array( - 'short' => array ('ÐÝí','öïñ','Øñï','²åñ','ØÛë','ÐÝë','ÐÉë','ú·ë','êåï','ÐÏï','ÜÛÙ','¸Ïï'), - 'long' => array ('ÐáõÝí³ñ','ö»ïñí³ñ','سñï','²åñÇÉ','سÛÇë','ÐáõÝÇë','ÐáõÉÇë','ú·áëïáë','ê»åï»Ùµ»ñ','ÐáÏï»Ùµ»ñ','ÜáÛ»Ùµ»ñ','¸»Ïï»Ùµ»ñ') - ), - 'nl' => array ( - 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), - 'long' => array ('Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December') - ) - ); - - - /** * The constructor * * @param string text label for the element * @param boolean is this a required element? * @param int element width in characters, pixels (px), percentage (%) or elements (em) * @param int element height in px - * @param string locale one of: en, de, hu, pl, sl, ru, es, da, is, it, sk, cs, hy, nl * @param string format either long or short */ - function FEMonths($label, $required = TRUE, $width = NULL, $height = NULL, $locale = 'en', $format = 'long') { - $this->FEListBox($label, $required, $width, $height, array_flip($this->_locale[$locale][$format])); + function FEMonths($label, $required = TRUE, $width = NULL, $height = NULL, $format = 'long') { + + $format = (strcmp($format, 'long') == 0) ? '%B' : '%b'; + for ($i = 1; $i < 13; $i++) { + $months[] = strftime($format, strtotime("$i/12/2004")); + } + $this->FEListBox($label, $required, $width, $height, array_flip($months)); } } @@ -939,8 +875,8 @@ } /** - * This class builds a FEDataList that shows - * a select box listing the days of the month + * This class builds a FEDataList that shows a group of select boxes + * (FEYears, FEMonths, FEDays) representing a date. * * @author Culley Harrelson <cu...@fa...> * @@ -949,12 +885,6 @@ class FEDate extends FEBoxElement { /** - * The default locale for the month display - * @var string - */ - var $_locale = 'en'; - - /** * The month format. Default to the long format. * @var bool */ @@ -973,6 +903,14 @@ var $_max_year = 2010; /** + * The order in which to show the elements. This variable must be 3 + * characters long and contain only one m only one d and only one y. + * + * @var string + */ + var $_element_order = 'mdy'; + + /** * The constructor * * @param string text label for the element @@ -995,30 +933,32 @@ $month_format = ($this->_short_months) ? 'short' : 'long'; $container = new Container(); + $years = new FEYears($this->_element_name . '_years', false, null, null, $this->_min_year, $this->_max_year); - $months = new FEMonths($this->_element_name . '_months', false, null, null, $this->_locale, $month_format); + $months = new FEMonths($this->_element_name . '_months', false, null, null, $month_format); $days = new FEDays($this->_element_name . '_days'); - $container->add($months->get_element()); - $container->add($days->get_element()); - $container->add($years->get_element()); + // add the elements in the order specified. + $chars = preg_split('//', $this->_element_order, -1, PREG_SPLIT_NO_EMPTY); + foreach ($chars as $char) { + switch ($char) { + case 'y': + $container->add($years->get_element()); + break; + case 'm': + $container->add($months->get_element()); + break; + case 'd': + $container->add($days->get_element()); + break; + } + } return $container; } /** - * this method sets the locale for the Month display - * - * @param string locale - */ - function set_locale($locale = 'en') { - - $this->_locale = $locale; - - } - - /** * this method toggles the month display between short and long format * * @param bool @@ -1051,6 +991,32 @@ } + /** + * this method sets the display order for the elements in the widget + * + * @param string + * @return bool success or failure + */ + function set_element_order($element_order) { + + if (strlen($element_order) != 3) { + return false; + } + + // compare the characters sent with the characters needed. only set + // the property if one of each is present + $search_for = array ('y', 'm', 'd'); + $chars = preg_split('//', strtolower($element_order), -1, PREG_SPLIT_NO_EMPTY); + + if (count(array_diff($search_for, $chars)) > 0) { + return false; + } + + $this->_element_order = $element_order; + return true; + + } + } ?> |
From: <he...@us...> - 2004-03-11 23:25:07
|
Update of /cvsroot/phphtmllib/phphtmllib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20082 Modified Files: TODO Log Message: Add proper JOIN clause support in the SQLDataListSource to support outer joins. Index: TODO =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/TODO,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TODO 10 Mar 2004 22:14:00 -0000 1.9 +++ TODO 11 Mar 2004 23:06:04 -0000 1.10 @@ -19,3 +19,5 @@ - Add the ability to automatically create a hidden form field in the FormProcessor when a FormElement has been disabled. When a <input> is disabled in the browser, the browser never sends it's value when a form is submitted. + +- Add proper JOIN clause support in the SQLDataListSource to support outer joins. |
From: <he...@us...> - 2004-03-11 20:07:26
|
Update of /cvsroot/phphtmllib/phphtmllib/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10997 Modified Files: docit.sh Log Message: add support for generating docs w/ sourcode view support (-s) Index: docit.sh =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/doc/docit.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- docit.sh 3 Feb 2004 23:27:35 -0000 1.7 +++ docit.sh 11 Mar 2004 19:48:24 -0000 1.8 @@ -7,6 +7,7 @@ /usr/local/bin/phpdoc -o HTML:default:phphtmllib \ -j \ -q \ +-s \ -t $BASEDIR/doc \ -d $BASEDIR -dn phpHtmlLib \ -ti phpHtmlLib \ |
From: <he...@us...> - 2004-03-11 20:06:53
|
Update of /cvsroot/phphtmllib/phphtmllib/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10890 Added Files: xmlit.sh Log Message: added to try and generate XMLDocbook format as a test to see if we can build an online manual like php.net and pear.net has --- NEW FILE: xmlit.sh --- #!/bin/bash cd ..; BASEDIR=`pwd`; export BASEDIR; cd doc; /usr/local/bin/phpdoc -o XML:DocBook/peardoc2:default \ -j \ -q \ -s \ -t $BASEDIR/docxml \ -d $BASEDIR -dn phpHtmlLib \ -ti phpHtmlLib \ -i includes.inc,test*,localinc.php,thumbnail.php,bluetheme.php,redtheme.php,defaulttheme.php,css.php |
From: Walter A. B. I. <wab...@3g...> - 2004-03-11 18:36:22
|
> cool. I will work on this here and there while I am on the road but if= =20 > you need it sooner feel free to take over. I am thinking now that it=20 > might be best to ditch the locale stuff and just let people use the php= =20 > built in setlocale() then generate the month names with strftime(). ---how would you use that to generate all of the month strings? > You might want to look over the relatively new Pear calendar package: >=20 > http://pear.php.net/package/Calendar >=20 > They guy who designed this knows what he is doing... Tons of=20 > documentation too. ----just checked it out. Looks like a very rich object already. I think= it would make sense to use that as a basis for the CalendarWidget. The only downside, is that the CalendarWidget would require the Date and Calendar = pear classes to be installed. I'd rather not have to re-invent the wheel, so = I don't mind making the Date and Calendar classes a requirement for it. =20 > The ability to use a CalendarWidget outside of form processing would be= =20 > good. ---yah I think so. This could be used for all sorts of stuff. > Ya it seems like every 1-3 months is about right. ---yah I agree. =20 Walt |
From: Culley H. <cu...@fa...> - 2004-03-11 15:02:37
|
Hi G=F6sta, I will add these if I don't end up switching it to using setlocale(). culley On Mar 11, 2004, at 1:44 AM, G=F6sta Bostr=F6m wrote: > This looks great! > > Could you add some more languages while you're at it? > (I'm not really sure if Swedish is shortened as 'se' like the domain = or > 'sv' for Swedish) > > 'sv' =3D> array ('short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', = 'Maj', > 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), > 'long' =3D> array ('Januari', 'Februari', 'Mars', 'April', > 'Maj', 'Juni', 'Juli', 'Augusti', 'September', 'Oktober', 'November', > 'December')) > > Best regards, > > G=F6sta > > > > -----Original Message----- > From: php...@li... > [mailto:php...@li...] On Behalf Of > cu...@us... > Sent: den 11 mars 2004 07:01 > To: php...@li... > Subject: [Phphtmllib-devel] phphtmllib/form/form_elements > FEListBox.inc,1.13,1.14 > > Update of /cvsroot/phphtmllib/phphtmllib/form/form_elements > In directory > sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1675/form/form_elements > > Modified Files: > FEListBox.inc > Log Message: > > > Added several new date form elements: > > FEMonths > FEYears > FEDays > FEDate > > FEDate is a container object that contains the other three. FEDate is > not > complete but I wanted to commit this before I leave. Still need to = set > up a > validation routine for FEDate. Also need to figure out an elegant way > to > change element order in FEDate. Possibilities include: > > set_element_order('Ymd') > > set_year_first() > set_year_second() > set_year_third() > ... > > What would be best? > > Also, I ripped the locales for the months from PEAR. Rather than > identifier > strings should we set up constants for each locale? > > What do you think about all this? I think you would prefer = FECalendar, > but > this is a simple solution till something like that could be tackled. > > I haven't even tested submitting the date element yet so that probably > doesn't > work yet-- so far I have only worked on the display. > > culley > > > Index: FEListBox.inc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: > /cvsroot/phphtmllib/phphtmllib/form/form_elements/FEListBox.inc,v > retrieving revision 1.13 > retrieving revision 1.14 > diff -u -d -r1.13 -r1.14 > --- FEListBox.inc 20 Nov 2003 23:08:34 -0000 1.13 > +++ FEListBox.inc 11 Mar 2004 06:01:14 -0000 1.14 > @@ -795,4 +795,262 @@ > return $c; > } > } > + > +/** > + * This class builds a FEDataList that shows > + * a select box for Months of the year > + * > + * @author Culley Harrelson <cu...@fa...> > + * > + */ > + > +class FEMonths extends FEListBox { > + > + /** > + * The months array divided up by language > + * @var array > + */ > + var $_locale =3D array( > + 'en' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'May', > 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), > + 'long' =3D> array ('January', 'February', 'March', =20 > 'April', > 'May', 'June', 'July', 'August', 'September', 'October', 'November', > 'December') > + ), > + 'de' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'M=E4rz', 'April', = 'Mai', > 'Juni', 'Juli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez'), > + 'long' =3D> array ('Januar', 'Februar', 'M=E4rz', = 'April', > 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', > 'Dezember') > + ), > + 'fr' =3D> array ( > + 'short' =3D> array ('Jan', 'Fev', 'Mar', 'Avr', 'Mai', > 'Jun', 'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec'), > + 'long' =3D> array ('Janvier', 'Fevrier', 'Mars', = 'Avril', > 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', > 'Decembre') > + ), > + 'hu' =3D> array ( > + 'short' =3D> array ('jan', 'feb', 'm=E1rc', '=E1pr', = 'm=E1j', > 'j=FAn', 'j=FAl', 'aug', 'szept', 'okt', 'nov', 'dec'), > + 'long' =3D> array ('janu=E1r', 'febru=E1r', 'm=E1rcius', > '=E1prilis', 'm=E1jus', 'j=FAnius', 'j=FAlius', 'augusztus', = 'szeptember', > 'okt=F3ber', 'november', 'december') > + ), > + 'pl' =3D> array ( > + 'short' =3D> array ('Sty', 'Lut', 'Mar', 'Kwi', 'Maj', > 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa=BC', 'Lis', 'Gru'), > + 'long' =3D> array ('Stycze=F1', 'Luty', 'Marzec', =20 > 'Kwiecie=F1', > 'Maj', 'Czerwiec', 'Lipiec', 'Sierpie=F1', 'Wrzesie=F1', = 'Pa=BCdziernik', > 'Listopad', 'Grudzie=F1') > + ), > + 'sl' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', > 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'), > + 'long' =3D> array ('Januar', 'Februar', 'Marec', = 'April', > 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', > 'December') > + ), > + 'ru' =3D> array ( > + 'short' =3D> array ('=DF=ED=E2', '=D4=E5=E2', '=CC=E0=F0',= '=C0=EF=F0', '=CC=E0=E9', > '=C8=FE=ED', '=C8=FE=EB', '=C0=E2=E3', '=D1=E5=ED', '=CE=EA=F2', = '=CD=EE=FF', '=C4=E5=EA'), > + 'long' =3D> array ('=DF=ED=E2=E0=F0=FC', '=D4=E5=E2=F0=E0= =EB=FC', '=CC=E0=F0=F2', '=C0=EF=F0=E5=EB=FC', > '=CC=E0=E9', '=C8=FE=ED=FC', '=C8=FE=EB=FC', '=C0=E2=E3=F3=F1=F2', = '=D1=E5=ED=F2=FF=E1=F0=FC', '=CE=EA=F2=FF=E1=F0=FC', '=CD=EE=FF=E1=F0=FC',= > '=C4=E5=EA=E0=E1=F0=FC') > + ), > + 'es' =3D> array ( > + 'short' =3D> array ('Ene', 'Feb', 'Mar', 'Abr', 'May', > 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'), > + 'long' =3D> array ('Enero', 'Febrero', 'Marzo', = 'Abril', > 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septimbre', 'Octubre', =20 > 'Noviembre', > 'Diciembre') > + ), > + 'da' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', > 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), > + 'long' =3D> array ('Januar', 'Februar', 'Marts', = 'April', > 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', > 'December') > + ), > + 'is' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Ma=ED', > 'J=FAn', 'J=FAl', '=C1g=FA', 'Sep', 'Okt', 'N=F3v', 'Des'), > + 'long' =3D> array ('Jan=FAar', 'Febr=FAar', 'Mars', = 'Apr=EDl', > 'Ma=ED', 'J=FAn=ED', 'J=FAl=ED', '=C1g=FAst', 'September', 'Okt=F3ber', = 'N=F3vember', > 'Desember') > + ), > + 'it' =3D> array ( > + 'short' =3D> array ('Gen', 'Feb', 'Mar', 'Apr', 'Mag', > 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'), > + 'long' =3D> array ('Gennaio', 'Febbraio', 'Marzo', > 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', > 'Ottobre', 'Novembre', 'Dicembre') > + ), > + 'sk' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'M=E1j', > 'J=FAn', 'J=FAl', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), > + 'long' =3D> array ('Janu=E1r', 'Febru=E1r', 'Marec', = 'Apr=EDl', > 'M=E1j', 'J=FAn', 'J=FAl', 'August', 'September', 'Okt=F3ber', = 'November', > 'December') > + ), > + 'cs' =3D> array ( > + 'short' =3D> array ('Led', '=DAno', 'B=F8e', 'Dub', = 'Kv=EC', > '=C8en', '=C8ec', 'Srp', 'Z=E1=F8', '=D8=EDj', 'Lis', 'Pro'), > + 'long' =3D> array ('Leden', '=DAnor', 'B=F8ezen', = 'Duben', > 'Kv=ECten', '=C8erven', '=C8ervenec', 'Srpen', 'Z=E1=F8=ED', '=D8=EDjen'= , 'Listopad', > 'Prosinec') > + ), > + 'hy' =3D> array( > + 'short' =3D> array > = ('=D0=DD=ED','=F6=EF=F1','=D8=F1=EF','=B2=E5=F1','=D8=DB=EB','=D0=DD=EB','= =D0=C9=EB','=FA=B7=EB','=EA=E5=EF','=D0=CF=EF','=DC=DB=D9','=B8=CF=EF=20 > ' > ), > + 'long' =3D> array > = ('=D0=E1=F5=DD=ED=B3=F1','=F6=BB=EF=F1=ED=B3=F1','=D8=B3=F1=EF','=B2=E5=F1= =C7=C9','=D8=B3=DB=C7=EB','=D0=E1=F5=DD=C7=EB','=D0=E1=F5=C9=C7=EB','=FA=B7= =E1=EB=EF=E1=EB'=20 > , > '=EA=BB=E5=EF=BB=D9=B5=BB=F1','=D0=E1=CF=EF=BB=D9=B5=BB=F1','=DC=E1=DB=BB= =D9=B5=BB=F1','=B8=BB=CF=EF=BB=D9=B5=BB=F1') > + ), > + 'nl' =3D> array ( > + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Mei', > 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), > + 'long' =3D> array ('Januari', 'Februari', 'Maart', =20 > 'April', > 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', > 'December') > + ) > + ); > + > + > + /** > + * The constructor > + * > + * @param string text label for the element > + * @param boolean is this a required element? > + * @param int element width in characters, pixels (px), = percentage > (%) or elements (em) > + * @param int element height in px > + * @param string locale one of: en, de, hu, pl, sl, ru, es, da, =20= > is, > it, sk, cs, hy, nl > + * @param string format either long or short > + */ > + function FEMonths($label, $required =3D TRUE, $width =3D NULL, = $height > =3D NULL, $locale =3D 'en', $format =3D 'long') { > + $this->FEListBox($label, $required, $width, $height, > array_flip($this->_locale[$locale][$format])); > + } > +} > + > +/** > + * This class builds a FEDataList that shows > + * a select box listing a range of years > + * > + * @author Culley Harrelson <cu...@fa...> > + * > + */ > + > +class FEYears extends FEListBox { > + > + /** > + * The constructor > + * > + * @param string text label for the element > + * @param boolean is this a required element? > + * @param int element width in characters, pixels (px), = percentage > (%) or elements (em) > + * @param int element height in px > + * @param int min_year > + * @param int max_year > + */ > + function FEYears($label, $required =3D TRUE, $width =3D NULL, = $height =20 > =3D > NULL, $min_year =3D 2000, $max_year =3D 2010) { > + $this->FEListBox($label, $required, $width, $height, > array_flip(range($min_year, $max_year))); > + } > +} > + > +/** > + * This class builds a FEDataList that shows > + * a select box listing the days of the month > + * > + * @author Culley Harrelson <cu...@fa...> > + * > + */ > + > +class FEDays extends FEListBox { > + > + /** > + * The constructor > + * > + * @param string text label for the element > + * @param boolean is this a required element? > + * @param int element width in characters, pixels (px), = percentage > (%) or elements (em) > + * @param int element height in px > + */ > + > + function FEDays($label, $required =3D TRUE, $width =3D NULL, = $height =3D > NULL) { > + $this->FEListBox($label, $required, $width, $height, > array_flip(range(1, 31))); > + } > +} > + > +/** > + * This class builds a FEDataList that shows > + * a select box listing the days of the month > + * > + * @author Culley Harrelson <cu...@fa...> > + * > + */ > + > +class FEDate extends FEBoxElement { > + > + /** > + * The default locale for the month display > + * @var string > + */ > + var $_locale =3D 'en'; > + > + /** > + * The month format. Default to the long format. > + * @var bool > + */ > + var $_short_months =3D false; > + > + /** > + * The earliest year shown in the year list. > + * @var int > + */ > + var $_min_year =3D 2000; > + > + /** > + * The latest year shown in the year list. > + * @var string > + */ > + var $_max_year =3D 2010; > + > + /** > + * The constructor > + * > + * @param string text label for the element > + * @param boolean is this a required element? > + * @param int element width in characters, pixels (px), = percentage > (%) or elements (em) > + * @param int element height in px > + */ > + > + function FEDate($label, $required =3D TRUE, $width =3D NULL, = $height =3D > NULL) { > + $this->FEBoxElement($label, $required, $width, $height); > + } > + > + /** > + * This function builds and returns the > + * form element object > + * > + * @return object > + */ > + function get_element() { > + > + $month_format =3D ($this->_short_months) ? 'short' : 'long'; > + $container =3D new Container(); > + $years =3D new FEYears($this->_element_name . '_years', = false, > null, null, $this->_min_year, $this->_max_year); > + $months =3D new FEMonths($this->_element_name . '_months', =20= > false, > null, null, $this->_locale, $month_format); > + $days =3D new FEDays($this->_element_name . '_days'); > + > + $container->add($months->get_element()); > + $container->add($days->get_element()); > + $container->add($years->get_element()); > + > + return $container; > + > + } > + > + /** > + * this method sets the locale for the Month display > + * > + * @param string locale > + */ > + function set_locale($locale =3D 'en') { > + > + $this->_locale =3D $locale; > + > + } > + > + /** > + * this method toggles the month display between short and long > format > + * > + * @param bool > + */ > + function set_short_months($short_months =3D true) { > + > + $this->_short_months =3D $short_months; > + > + } > + > + /** > + * this method sets the earliest year shown in the year list > + * > + * @param int > + */ > + function set_min_year($min_year) { > + > + $this->_min_year =3D $min_year; > + > + } > + > + /** > + * this method sets the latest year shown in the year list > + * > + * @param int > + */ > + function set_max_year($max_year) { > + > + $this->_max_year =3D $max_year; > + > + } > + > +} > + > ?> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcl= ick > _______________________________________________ > Phphtmllib-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phphtmllib-devel > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id638&op=3Dclick > _______________________________________________ > Phphtmllib-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phphtmllib-devel |
From: Culley H. <cu...@fa...> - 2004-03-11 14:58:30
|
On Mar 10, 2004, at 11:30 PM, Walter A. Boring IV wrote: >> > ---ah man this is awesome. Suren (another guy that I work with) was > going to > create FEDate for the next rev of our product at work anyway. This is > awesome. > I would say go with the set_element_order() and add some checks on > what the user > passes in to make sure they pass in a valid order. cool. I will work on this here and there while I am on the road but if you need it sooner feel free to take over. I am thinking now that it might be best to ditch the locale stuff and just let people use the php built in setlocale() then generate the month names with strftime(). >> > ---I think the timing of you adding this stuff is perfect :) We will > be needing > these form elements for our next version of our product at work. In > fact Suren > and I were just talking about the Calendar widget yesterday. We > aren't entirely > sure yet, but we were thinking of a CalendarWidget object that could > be used for > most anything. Click the day on the calendar and have it open a url > (say for > showing news articles based on a date), or even use that widget as a > popup > window to select a date for a form. At least that is the idea we were > throwing > around. Any thoughts? > You might want to look over the relatively new Pear calendar package: http://pear.php.net/package/Calendar They guy who designed this knows what he is doing... Tons of documentation too. The ability to use a CalendarWidget outside of form processing would be good. > --hehe thats ok. It's good to check in often. I was thinking about > possibly > doing another release fairly soon. It's been a bit since 2.4.0 was > released. > My last 2 releases were waaaaaay too far apart. The advantage of > doing quicker > release cycles, is to get bug fixes out so folks don't have to use a > development > tree/nightly build to fix their issues. Just a thought. > Ya it seems like every 1-3 months is about right. culley |
From: <gos...@te...> - 2004-03-11 09:52:34
|
This looks great! Could you add some more languages while you're at it? (I'm not really sure if Swedish is shortened as 'se' like the domain or 'sv' for Swedish) 'sv' =3D> array ('short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', = 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), 'long' =3D> array ('Januari', 'Februari', 'Mars', 'April', 'Maj', 'Juni', 'Juli', 'Augusti', 'September', 'Oktober', 'November', 'December')) Best regards, G=F6sta -----Original Message----- From: php...@li... [mailto:php...@li...] On Behalf Of cu...@us... Sent: den 11 mars 2004 07:01 To: php...@li... Subject: [Phphtmllib-devel] phphtmllib/form/form_elements FEListBox.inc,1.13,1.14 Update of /cvsroot/phphtmllib/phphtmllib/form/form_elements In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1675/form/form_elements Modified Files: FEListBox.inc=20 Log Message: Added several new date form elements: FEMonths FEYears FEDays FEDate FEDate is a container object that contains the other three. FEDate is not complete but I wanted to commit this before I leave. Still need to set up a validation routine for FEDate. Also need to figure out an elegant way to change element order in FEDate. Possibilities include: set_element_order('Ymd') set_year_first() set_year_second() set_year_third() ... What would be best? Also, I ripped the locales for the months from PEAR. Rather than identifier strings should we set up constants for each locale? What do you think about all this? I think you would prefer FECalendar, but this is a simple solution till something like that could be tackled. I haven't even tested submitting the date element yet so that probably doesn't work yet-- so far I have only worked on the display. culley Index: FEListBox.inc =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/phphtmllib/phphtmllib/form/form_elements/FEListBox.inc,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- FEListBox.inc 20 Nov 2003 23:08:34 -0000 1.13 +++ FEListBox.inc 11 Mar 2004 06:01:14 -0000 1.14 @@ -795,4 +795,262 @@ return $c; } } + +/** + * This class builds a FEDataList that shows + * a select box for Months of the year + *=20 + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEMonths extends FEListBox { + + /** + * The months array divided up by language + * @var array + */ + var $_locale =3D array( + 'en' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), + 'long' =3D> array ('January', 'February', 'March', = 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') + ), + 'de' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'M=E4rz', 'April', = 'Mai', 'Juni', 'Juli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez'), + 'long' =3D> array ('Januar', 'Februar', 'M=E4rz', = 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember') + ), + 'fr' =3D> array ( + 'short' =3D> array ('Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec'), + 'long' =3D> array ('Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Decembre') + ), + 'hu' =3D> array ( + 'short' =3D> array ('jan', 'feb', 'm=E1rc', '=E1pr', = 'm=E1j', 'j=FAn', 'j=FAl', 'aug', 'szept', 'okt', 'nov', 'dec'), + 'long' =3D> array ('janu=E1r', 'febru=E1r', 'm=E1rcius', '=E1prilis', 'm=E1jus', 'j=FAnius', 'j=FAlius', 'augusztus', = 'szeptember', 'okt=F3ber', 'november', 'december') + ), + 'pl' =3D> array ( + 'short' =3D> array ('Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa=BC', 'Lis', 'Gru'), + 'long' =3D> array ('Stycze=F1', 'Luty', 'Marzec', = 'Kwiecie=F1', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpie=F1', 'Wrzesie=F1', = 'Pa=BCdziernik', 'Listopad', 'Grudzie=F1') + ), + 'sl' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' =3D> array ('Januar', 'Februar', 'Marec', 'April', 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December') + ), + 'ru' =3D> array ( + 'short' =3D> array ('=DF=ED=E2', '=D4=E5=E2', '=CC=E0=F0', = '=C0=EF=F0', '=CC=E0=E9', '=C8=FE=ED', '=C8=FE=EB', '=C0=E2=E3', '=D1=E5=ED', '=CE=EA=F2', = '=CD=EE=FF', '=C4=E5=EA'), + 'long' =3D> array ('=DF=ED=E2=E0=F0=FC', = '=D4=E5=E2=F0=E0=EB=FC', '=CC=E0=F0=F2', '=C0=EF=F0=E5=EB=FC', '=CC=E0=E9', '=C8=FE=ED=FC', '=C8=FE=EB=FC', '=C0=E2=E3=F3=F1=F2', = '=D1=E5=ED=F2=FF=E1=F0=FC', '=CE=EA=F2=FF=E1=F0=FC', = '=CD=EE=FF=E1=F0=FC', '=C4=E5=EA=E0=E1=F0=FC') + ), + 'es' =3D> array ( + 'short' =3D> array ('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'), + 'long' =3D> array ('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septimbre', 'Octubre', 'Noviembre', 'Diciembre') + ), + 'da' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' =3D> array ('Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December') + ), + 'is' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Ma=ED', 'J=FAn', 'J=FAl', '=C1g=FA', 'Sep', 'Okt', 'N=F3v', 'Des'), + 'long' =3D> array ('Jan=FAar', 'Febr=FAar', 'Mars', = 'Apr=EDl', 'Ma=ED', 'J=FAn=ED', 'J=FAl=ED', '=C1g=FAst', 'September', 'Okt=F3ber', = 'N=F3vember', 'Desember') + ), + 'it' =3D> array ( + 'short' =3D> array ('Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'), + 'long' =3D> array ('Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre') + ), + 'sk' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'M=E1j', 'J=FAn', 'J=FAl', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' =3D> array ('Janu=E1r', 'Febru=E1r', 'Marec', = 'Apr=EDl', 'M=E1j', 'J=FAn', 'J=FAl', 'August', 'September', 'Okt=F3ber', = 'November', 'December') + ), + 'cs' =3D> array ( + 'short' =3D> array ('Led', '=DAno', 'B=F8e', 'Dub', = 'Kv=EC', '=C8en', '=C8ec', 'Srp', 'Z=E1=F8', '=D8=EDj', 'Lis', 'Pro'), + 'long' =3D> array ('Leden', '=DAnor', 'B=F8ezen', = 'Duben', 'Kv=ECten', '=C8erven', '=C8ervenec', 'Srpen', 'Z=E1=F8=ED', = '=D8=EDjen', 'Listopad', 'Prosinec') + ), + 'hy' =3D> array( + 'short' =3D> array ('=D0=DD=ED','=F6=EF=F1','=D8=F1=EF','=B2=E5=F1','=D8=DB=EB','=D0=DD=EB',= '=D0=C9=EB','=FA=B7=EB','=EA=E5=EF','=D0=CF=EF','=DC=DB=D9','=B8=CF=EF' ), + 'long' =3D> array ('=D0=E1=F5=DD=ED=B3=F1','=F6=BB=EF=F1=ED=B3=F1','=D8=B3=F1=EF','=B2=E5=F1= =C7=C9','=D8=B3=DB=C7=EB','=D0=E1=F5=DD=C7=EB','=D0=E1=F5=C9=C7=EB','=FA=B7= =E1=EB=EF=E1=EB', '=EA=BB=E5=EF=BB=D9=B5=BB=F1','=D0=E1=CF=EF=BB=D9=B5=BB=F1','=DC=E1=DB=BB= =D9=B5=BB=F1','=B8=BB=CF=EF=BB=D9=B5=BB=F1') + ), + 'nl' =3D> array ( + 'short' =3D> array ('Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' =3D> array ('Januari', 'Februari', 'Maart', = 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December') + ) + ); + + + /** + * The constructor + *=20 + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + * @param string locale one of: en, de, hu, pl, sl, ru, es, da, is, it, sk, cs, hy, nl + * @param string format either long or short + */ + function FEMonths($label, $required =3D TRUE, $width =3D NULL, = $height =3D NULL, $locale =3D 'en', $format =3D 'long') { + $this->FEListBox($label, $required, $width, $height, array_flip($this->_locale[$locale][$format])); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing a range of years + *=20 + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEYears extends FEListBox { + + /** + * The constructor + *=20 + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + * @param int min_year + * @param int max_year + */ + function FEYears($label, $required =3D TRUE, $width =3D NULL, = $height =3D NULL, $min_year =3D 2000, $max_year =3D 2010) { + $this->FEListBox($label, $required, $width, $height, array_flip(range($min_year, $max_year))); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing the days of the month + *=20 + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEDays extends FEListBox { + + /** + * The constructor + *=20 + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + */ + + function FEDays($label, $required =3D TRUE, $width =3D NULL, = $height =3D NULL) { + $this->FEListBox($label, $required, $width, $height, array_flip(range(1, 31))); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing the days of the month + *=20 + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEDate extends FEBoxElement { + + /** + * The default locale for the month display + * @var string + */ + var $_locale =3D 'en'; + + /** + * The month format. Default to the long format. + * @var bool + */ + var $_short_months =3D false; + + /** + * The earliest year shown in the year list. + * @var int + */ + var $_min_year =3D 2000; + + /** + * The latest year shown in the year list. + * @var string + */ + var $_max_year =3D 2010; + + /** + * The constructor + *=20 + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + */ + + function FEDate($label, $required =3D TRUE, $width =3D NULL, = $height =3D NULL) { + $this->FEBoxElement($label, $required, $width, $height); + } + + /** + * This function builds and returns the + * form element object + * + * @return object + */ + function get_element() { + + $month_format =3D ($this->_short_months) ? 'short' : 'long'; + $container =3D new Container(); + $years =3D new FEYears($this->_element_name . '_years', false, null, null, $this->_min_year, $this->_max_year); + $months =3D new FEMonths($this->_element_name . '_months', = false, null, null, $this->_locale, $month_format); + $days =3D new FEDays($this->_element_name . '_days'); + + $container->add($months->get_element()); + $container->add($days->get_element()); + $container->add($years->get_element()); + + return $container; + + } + + /** + * this method sets the locale for the Month display + * + * @param string locale + */ + function set_locale($locale =3D 'en') { + + $this->_locale =3D $locale; + + } + + /** + * this method toggles the month display between short and long format + * + * @param bool=20 + */ + function set_short_months($short_months =3D true) { + + $this->_short_months =3D $short_months; + + } + + /** + * this method sets the earliest year shown in the year list + * + * @param int=20 + */ + function set_min_year($min_year) { + + $this->_min_year =3D $min_year; + + } + + /** + * this method sets the latest year shown in the year list + * + * @param int=20 + */ + function set_max_year($max_year) { + + $this->_max_year =3D $max_year; + + } + +} + ?> ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dcli= ck _______________________________________________ Phphtmllib-devel mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phphtmllib-devel |
From: Walter A. B. I. <wab...@3g...> - 2004-03-11 07:40:40
|
=20 > FEDate is a container object that contains the other three. FEDate is = not > complete but I wanted to commit this before I leave. Still need to set= up a > validation routine for FEDate. Also need to figure out an elegant way = to > change element order in FEDate. Possibilities include: ---ah man this is awesome. Suren (another guy that I work with) was goin= g to create FEDate for the next rev of our product at work anyway. This is aw= esome. =20 I would say go with the set_element_order() and add some checks on what t= he user passes in to make sure they pass in a valid order. =20 >=20 > set_element_order('Ymd') ---I think this would be easier. >=20 > set_year_first() > set_year_second() > set_year_third() > ... >=20 > What would be best? >=20 > Also, I ripped the locales for the months from PEAR. Rather than ident= ifier > strings should we set up constants for each locale? ---I think it's probably fine passing in 'en', 'de'. We can always creat= e the constants later. =20 > What do you think about all this? I think you would prefer FECalendar,= but > this is a simple solution till something like that could be tackled. ---I think the timing of you adding this stuff is perfect :) We will be = needing these form elements for our next version of our product at work. In fact= Suren and I were just talking about the Calendar widget yesterday. We aren't e= ntirely sure yet, but we were thinking of a CalendarWidget object that could be u= sed for most anything. Click the day on the calendar and have it open a url (say= for showing news articles based on a date), or even use that widget as a popu= p window to select a date for a form. At least that is the idea we were th= rowing around. Any thoughts? =20 > I haven't even tested submitting the date element yet so that probably > doesn't > work yet-- so far I have only worked on the display. --hehe thats ok. It's good to check in often. I was thinking about poss= ibly doing another release fairly soon. It's been a bit since 2.4.0 was relea= sed.=20 My last 2 releases were waaaaaay too far apart. The advantage of doing q= uicker release cycles, is to get bug fixes out so folks don't have to use a deve= lopment tree/nightly build to fix their issues. Just a thought. Thanks again man, you rock! Walt |
From: <cu...@us...> - 2004-03-11 06:19:44
|
Update of /cvsroot/phphtmllib/phphtmllib/form/form_elements In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1675/form/form_elements Modified Files: FEListBox.inc Log Message: Added several new date form elements: FEMonths FEYears FEDays FEDate FEDate is a container object that contains the other three. FEDate is not complete but I wanted to commit this before I leave. Still need to set up a validation routine for FEDate. Also need to figure out an elegant way to change element order in FEDate. Possibilities include: set_element_order('Ymd') set_year_first() set_year_second() set_year_third() ... What would be best? Also, I ripped the locales for the months from PEAR. Rather than identifier strings should we set up constants for each locale? What do you think about all this? I think you would prefer FECalendar, but this is a simple solution till something like that could be tackled. I haven't even tested submitting the date element yet so that probably doesn't work yet-- so far I have only worked on the display. culley Index: FEListBox.inc =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/form/form_elements/FEListBox.inc,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- FEListBox.inc 20 Nov 2003 23:08:34 -0000 1.13 +++ FEListBox.inc 11 Mar 2004 06:01:14 -0000 1.14 @@ -795,4 +795,262 @@ return $c; } } + +/** + * This class builds a FEDataList that shows + * a select box for Months of the year + * + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEMonths extends FEListBox { + + /** + * The months array divided up by language + * @var array + */ + var $_locale = array( + 'en' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'), + 'long' => array ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December') + ), + 'de' => array ( + 'short' => array ('Jan', 'Feb', 'März', 'April', 'Mai', 'Juni', 'Juli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dez'), + 'long' => array ('Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember') + ), + 'fr' => array ( + 'short' => array ('Jan', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun', 'Jul', 'Aou', 'Sep', 'Oct', 'Nov', 'Dec'), + 'long' => array ('Janvier', 'Fevrier', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Aout', 'Septembre', 'Octobre', 'Novembre', 'Decembre') + ), + 'hu' => array ( + 'short' => array ('jan', 'feb', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec'), + 'long' => array ('január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december') + ), + 'pl' => array ( + 'short' => array ('Sty', 'Lut', 'Mar', 'Kwi', 'Maj', 'Cze', 'Lip', 'Sie', 'Wrz', 'Pa¼', 'Lis', 'Gru'), + 'long' => array ('Styczeñ', 'Luty', 'Marzec', 'Kwiecieñ', 'Maj', 'Czerwiec', 'Lipiec', 'Sierpieñ', 'Wrzesieñ', 'Pa¼dziernik', 'Listopad', 'Grudzieñ') + ), + 'sl' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Avg', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' => array ('Januar', 'Februar', 'Marec', 'April', 'Maj', 'Junij', 'Julij', 'Avgust', 'September', 'Oktober', 'November', 'December') + ), + 'ru' => array ( + 'short' => array ('ßíâ', 'Ôåâ', 'Ìàð', 'Àïð', 'Ìàé', 'Èþí', 'Èþë', 'Àâã', 'Ñåí', 'Îêò', 'Íîÿ', 'Äåê'), + 'long' => array ('ßíâàðü', 'Ôåâðàëü', 'Ìàðò', 'Àïðåëü', 'Ìàé', 'Èþíü', 'Èþëü', 'Àâãóñò', 'Ñåíòÿáðü', 'Îêòÿáðü', 'Íîÿáðü', 'Äåêàáðü') + ), + 'es' => array ( + 'short' => array ('Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'), + 'long' => array ('Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septimbre', 'Octubre', 'Noviembre', 'Diciembre') + ), + 'da' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maj', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' => array ('Januar', 'Februar', 'Marts', 'April', 'Maj', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'December') + ), + 'is' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Maí', 'Jún', 'Júl', 'Ágú', 'Sep', 'Okt', 'Nóv', 'Des'), + 'long' => array ('Janúar', 'Febrúar', 'Mars', 'Apríl', 'Maí', 'Júní', 'Júlí', 'Ágúst', 'September', 'Október', 'Nóvember', 'Desember') + ), + 'it' => array ( + 'short' => array ('Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'), + 'long' => array ('Gennaio', 'Febbraio', 'Marzo', 'Aprile', 'Maggio', 'Giugno', 'Luglio', 'Agosto', 'Settembre', 'Ottobre', 'Novembre', 'Dicembre') + ), + 'sk' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Máj', 'Jún', 'Júl', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' => array ('Január', 'Február', 'Marec', 'Apríl', 'Máj', 'Jún', 'Júl', 'August', 'September', 'Október', 'November', 'December') + ), + 'cs' => array ( + 'short' => array ('Led', 'Úno', 'Bøe', 'Dub', 'Kvì', 'Èen', 'Èec', 'Srp', 'Záø', 'Øíj', 'Lis', 'Pro'), + 'long' => array ('Leden', 'Únor', 'Bøezen', 'Duben', 'Kvìten', 'Èerven', 'Èervenec', 'Srpen', 'Záøí', 'Øíjen', 'Listopad', 'Prosinec') + ), + 'hy' => array( + 'short' => array ('ÐÝí','öïñ','Øñï','²åñ','ØÛë','ÐÝë','ÐÉë','ú·ë','êåï','ÐÏï','ÜÛÙ','¸Ïï'), + 'long' => array ('ÐáõÝí³ñ','ö»ïñí³ñ','سñï','²åñÇÉ','سÛÇë','ÐáõÝÇë','ÐáõÉÇë','ú·áëïáë','ê»åï»Ùµ»ñ','ÐáÏï»Ùµ»ñ','ÜáÛ»Ùµ»ñ','¸»Ïï»Ùµ»ñ') + ), + 'nl' => array ( + 'short' => array ('Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dec'), + 'long' => array ('Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni', 'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December') + ) + ); + + + /** + * The constructor + * + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + * @param string locale one of: en, de, hu, pl, sl, ru, es, da, is, it, sk, cs, hy, nl + * @param string format either long or short + */ + function FEMonths($label, $required = TRUE, $width = NULL, $height = NULL, $locale = 'en', $format = 'long') { + $this->FEListBox($label, $required, $width, $height, array_flip($this->_locale[$locale][$format])); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing a range of years + * + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEYears extends FEListBox { + + /** + * The constructor + * + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + * @param int min_year + * @param int max_year + */ + function FEYears($label, $required = TRUE, $width = NULL, $height = NULL, $min_year = 2000, $max_year = 2010) { + $this->FEListBox($label, $required, $width, $height, array_flip(range($min_year, $max_year))); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing the days of the month + * + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEDays extends FEListBox { + + /** + * The constructor + * + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + */ + + function FEDays($label, $required = TRUE, $width = NULL, $height = NULL) { + $this->FEListBox($label, $required, $width, $height, array_flip(range(1, 31))); + } +} + +/** + * This class builds a FEDataList that shows + * a select box listing the days of the month + * + * @author Culley Harrelson <cu...@fa...> + * + */ + +class FEDate extends FEBoxElement { + + /** + * The default locale for the month display + * @var string + */ + var $_locale = 'en'; + + /** + * The month format. Default to the long format. + * @var bool + */ + var $_short_months = false; + + /** + * The earliest year shown in the year list. + * @var int + */ + var $_min_year = 2000; + + /** + * The latest year shown in the year list. + * @var string + */ + var $_max_year = 2010; + + /** + * The constructor + * + * @param string text label for the element + * @param boolean is this a required element? + * @param int element width in characters, pixels (px), percentage (%) or elements (em) + * @param int element height in px + */ + + function FEDate($label, $required = TRUE, $width = NULL, $height = NULL) { + $this->FEBoxElement($label, $required, $width, $height); + } + + /** + * This function builds and returns the + * form element object + * + * @return object + */ + function get_element() { + + $month_format = ($this->_short_months) ? 'short' : 'long'; + $container = new Container(); + $years = new FEYears($this->_element_name . '_years', false, null, null, $this->_min_year, $this->_max_year); + $months = new FEMonths($this->_element_name . '_months', false, null, null, $this->_locale, $month_format); + $days = new FEDays($this->_element_name . '_days'); + + $container->add($months->get_element()); + $container->add($days->get_element()); + $container->add($years->get_element()); + + return $container; + + } + + /** + * this method sets the locale for the Month display + * + * @param string locale + */ + function set_locale($locale = 'en') { + + $this->_locale = $locale; + + } + + /** + * this method toggles the month display between short and long format + * + * @param bool + */ + function set_short_months($short_months = true) { + + $this->_short_months = $short_months; + + } + + /** + * this method sets the earliest year shown in the year list + * + * @param int + */ + function set_min_year($min_year) { + + $this->_min_year = $min_year; + + } + + /** + * this method sets the latest year shown in the year list + * + * @param int + */ + function set_max_year($max_year) { + + $this->_max_year = $max_year; + + } + +} + ?> |
From: <cu...@us...> - 2004-03-11 06:19:43
|
Update of /cvsroot/phphtmllib/phphtmllib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1675/examples Modified Files: form3.php Log Message: Added several new date form elements: FEMonths FEYears FEDays FEDate FEDate is a container object that contains the other three. FEDate is not complete but I wanted to commit this before I leave. Still need to set up a validation routine for FEDate. Also need to figure out an elegant way to change element order in FEDate. Possibilities include: set_element_order('Ymd') set_year_first() set_year_second() set_year_third() ... What would be best? Also, I ripped the locales for the months from PEAR. Rather than identifier strings should we set up constants for each locale? What do you think about all this? I think you would prefer FECalendar, but this is a simple solution till something like that could be tackled. I haven't even tested submitting the date element yet so that probably doesn't work yet-- so far I have only worked on the display. culley Index: form3.php =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/examples/form3.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- form3.php 9 Mar 2004 21:54:08 -0000 1.3 +++ form3.php 11 Mar 2004 06:01:14 -0000 1.4 @@ -152,6 +152,24 @@ $list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); $this->add_element($list_box); + // FEMonths($label, $required = TRUE, $width = NULL, $height = NULL, $locale = 'en', $format = 'long') { + $this->add_element(new FEMonths("FEMonths label", false)); + $this->add_element(new FEMonths("Polish months short format", false, null, null, 'pl', 'short')); + $this->add_element(new FEMonths("Hungarian months long format", false, null, null, 'hu')); + + // FEYears($label, $required = TRUE, $width = NULL, $height = NULL, $min_year = 2000, $max_year = 2010) { + $this->add_element(new FEYears("FEYears label", false, null, null, date('Y'), date('Y') + 10)); + + // FEDays($label, $required = TRUE, $width = NULL, $height = NULL) { + $this->add_element(new FEDays("FEDays label", false)); + + $date_element = new FEDate("FEDate label", false); + $date_element->set_locale('de'); + $date_element->set_short_months(); + $date_element->set_min_year(1970); + $date_element->set_max_year(1975); + $this->add_element($date_element); + // a list box that allows you to select multiple items $m_list_box = new FEMultiListBox('FEMultiListBox label', false, '200px', '100px'); $m_list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); |
From: <he...@us...> - 2004-03-10 22:32:15
|
Update of /cvsroot/phphtmllib/phphtmllib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13978 Modified Files: TODO Log Message: Add the ability to automatically create a hidden form field in the FormProcessor when a FormElement has been disabled. When a <input> is disabled in the browser, the browser never sends it's value when a form is submitted Index: TODO =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/TODO,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TODO 10 Mar 2004 18:38:13 -0000 1.8 +++ TODO 10 Mar 2004 22:14:00 -0000 1.9 @@ -16,3 +16,6 @@ - Add pre_js and post_js methods to the FormProcessor to allow a FormContent and FormElement to place JS before and after the <form> tag, instead of the always before <form> as it is now +- Add the ability to automatically create a hidden form field in the FormProcessor + when a FormElement has been disabled. When a <input> is disabled in the browser, + the browser never sends it's value when a form is submitted. |
From: <he...@us...> - 2004-03-10 18:56:22
|
Update of /cvsroot/phphtmllib/phphtmllib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28674 Modified Files: TODO Log Message: Added an entry for pre_js and post_js for the <form> tag Index: TODO =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/TODO,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- TODO 31 Jul 2003 21:49:10 -0000 1.7 +++ TODO 10 Mar 2004 18:38:13 -0000 1.8 @@ -3,9 +3,6 @@ 2.x.x ----- -- finish ImageThumbnailtableWidget -- finish TreeNav widget - - add a function/widget for automatically dumping a db table/schema to an xml file. - Add the display() ability to the base classes to directly output @@ -16,3 +13,6 @@ calendar with today's date selected - Finish the FormWizard class. +- Add pre_js and post_js methods to the FormProcessor to allow a FormContent and + FormElement to place JS before and after the <form> tag, instead of the always + before <form> as it is now |
From: <cu...@us...> - 2004-03-09 22:11:38
|
Update of /cvsroot/phphtmllib/phphtmllib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16157/examples Modified Files: form3.php Log Message: cleaned up comments in form3.php, added a few more widget variants. This should now be ready for public consumtion. Index: form3.php =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/examples/form3.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- form3.php 9 Mar 2004 07:58:36 -0000 1.2 +++ form3.php 9 Mar 2004 21:54:08 -0000 1.3 @@ -142,15 +142,20 @@ // Same constructor as FEHostNameWithPort $this->add_element(new FEIPAddressWithPort("FEIPAddressWithPort label", false)); + // your standard drop down select list + $list_box_collapsed = new FEListBox('FEListBoxCollapsed label', false, '200px'); + $list_box_collapsed->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); + $this->add_element($list_box_collapsed); + + // same as the above select list but with a height setting $list_box = new FEListBox('FEListBox label', false, '200px', '100px'); $list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); $this->add_element($list_box); - // does this matter on the back end? How is this different from - // FEListBox? - $list_box = new FEMultiListBox('FEMultiListBox label', false, '200px', '100px'); - $list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); - $this->add_element($list_box); + // a list box that allows you to select multiple items + $m_list_box = new FEMultiListBox('FEMultiListBox label', false, '200px', '100px'); + $m_list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); + $this->add_element($m_list_box); // Same constructor as FEText $this->add_element(new FEName("FEName label", false, "200px")); @@ -175,11 +180,14 @@ $this->add_element(new FENumberPrice("FENumberPrice label", false, "200px")); // FERadioGroup (label $label, [array $data_list = array()]) - // how do we set a default value? throws you to the top of the screen - // and addss a # in firefox when clicked? $this->add_element(new FERadioGroup("FERadioGroup label", array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4))); + // this is the same as the above radio group but it is handled + // differently in the display method below + $this->add_element(new FERadioGroup("FERadioGroup vertical label", + array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4))); + // add constructor label here. $this->add_element( new FERegEx("FERegEx label", false, '200px', 3, '/^1[a-z]T$/', 'This field must equal 1[a-z]T') ); @@ -206,7 +214,6 @@ // FEYesNoRadioGroup (label $label, [bool $required = TRUE], [string // $yes_value = "yes"], [string $no_value = "no"]) - // how do you set the default? $this->add_element(new FEYesNoRadioGroup("FEYesNoRadioGroup label", false)); // FEZipcode (label $label, [bool $required = false], [int $width = @@ -217,12 +224,6 @@ // [int $height = NULL]) $this->add_element(new FESubmitButton("FESubmitButton label", 'submit button value')); - -// not used: -// FEBoxElement - container? yes -// FEDataList - container? yes -// FEError - how to use? look at file FormContent.inc line 671 - } /** @@ -235,6 +236,14 @@ //this sets the value to the FERadioGroup first value to 3 or 'three' $this->set_element_value('FERadioGroup label', 3); + //this sets the value to the FERadioGroup vertical to 2 or 'two' + $this->set_element_value('FERadioGroup vertical label', 2); + + //this sets the default value of the FEYesNoRadioGroup to no + $this->set_element_value('FEYesNoRadioGroup label', 'no'); + + //the default values for check boxes take a boolean + $this->set_element_value('FECheckBox Label', true); } @@ -249,7 +258,17 @@ // add each element to the form as it was included above foreach(array_keys($this->_elements) as $label) { - $table->add_row($this->element_label($label), $this->element_form($label)); + switch ($label) { + case 'FERadioGroup vertical label': + // a radio group can be displayed vertically by changing + // the br flag on get_element to true + $element =& $this->get_element($label); + $table->add_row($this->element_label($label), $element->get_element(null, true)); + break; + default: + $table->add_row($this->element_label($label), $this->element_form($label)); + break; + } } @@ -263,6 +282,8 @@ * */ function form_backend_validation() { + //$this->add_error("uh oh", "some bogus error happened"); + //return FALSE; return TRUE; } @@ -273,7 +294,11 @@ * */ function form_action() { + //$this->add_error("uh oh", "some bogus error happened"); + //return FALSE; $this->set_action_message("WOO!"); + print html_pre(print_r($_POST)); + exit; return TRUE; } } //}}} |
From: <cu...@us...> - 2004-03-09 22:11:38
|
Update of /cvsroot/phphtmllib/phphtmllib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16157 Modified Files: CHANGELOG Log Message: cleaned up comments in form3.php, added a few more widget variants. This should now be ready for public consumtion. Index: CHANGELOG =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/CHANGELOG,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- CHANGELOG 8 Mar 2004 03:19:16 -0000 1.116 +++ CHANGELOG 9 Mar 2004 21:54:08 -0000 1.117 @@ -5,6 +5,7 @@ - minor change Version 2.4.1 - DEVTBD + + Created 2 new examples: example9.php and examples/form3.php + Fixed a bug causing problems with PEAR+postgresql in the data list widget. --culley - Added align parameter to html_img_href() (Denny Reeh <den...@gm...>) |
From: <he...@us...> - 2004-03-09 08:15:39
|
Update of /cvsroot/phphtmllib/phphtmllib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12290 Modified Files: form3.php Log Message: some updates for Culley to see. AWESOME job man. Index: form3.php =================================================================== RCS file: /cvsroot/phphtmllib/phphtmllib/examples/form3.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- form3.php 9 Mar 2004 06:15:21 -0000 1.1 +++ form3.php 9 Mar 2004 07:58:36 -0000 1.2 @@ -219,9 +219,9 @@ // not used: -// FEBoxElement - container? -// FEDataList - container? -// FEError - how to use? +// FEBoxElement - container? yes +// FEDataList - container? yes +// FEError - how to use? look at file FormContent.inc line 671 } @@ -232,6 +232,9 @@ * */ function form_init_data() { + //this sets the value to the FERadioGroup first value to 3 or 'three' + $this->set_element_value('FERadioGroup label', 3); + } |
From: <cu...@us...> - 2004-03-09 06:32:21
|
Update of /cvsroot/phphtmllib/phphtmllib/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28010 Modified Files: example9.php Added Files: form3.php Log Message: fixed comment in example9.php form3 is is a new, beta quality example. Walt when you get a chance could you look over form3.php? The idea of this example is to list all available form elements. I put a couple of questions in the comments of the form setup of things I don't understand (like how to set the default value on radio groups). Also I don't know the effect of having the form upload... Maybe there should just be a bogus error that will never pass so the form upload will not have to be handled? culley --- NEW FILE: form3.php --- <?php /** * This is an unrealistic example form that uses all available form elements. * No items have explicitly been marked as required, enabling you to test * individual elements by entering good data or garbage and seeing the result. * * $Id: form3.php,v 1.1 2004/03/09 06:15:21 culley Exp $ * * @author Culley Harrelson <cu...@fa...> * @package phpHtmlLib * @subpackage form-examples * @version 1.0.0 * */ // Include the phphtmllib libraries $phphtmllib = $_SERVER["DOCUMENT_ROOT"] . "/phphtmllib"; include_once("$phphtmllib/includes.inc"); // Include the Form Processing objects include_once($phphtmllib."/form/includes.inc"); //use the class we defined from //Example 3. include_once($phphtmllib."/examples/MyLayoutPage.inc"); /** * A simple Page Layout object child. this came from Example 3. * * @author Culley Harrelson <cu...@fa...> * @package phpHtmlLib * @subpackage form-examples * */ class Form3Page extends MyLayoutPage { function content_block() { //build the FormProcessor, and add the //Form content object that the FormProcessor //will use. Make the width of the form 95% return new FormProcessor(new SampleForm('95%')); } } /** * This is the Class that handles the building of the Form itself. It creates * the Form Elements inside the form_init_elements() method. * * @author Culley Harrelson <cu...@fa...> * @package phpHtmlLib * @subpackage form-examples * */ class SampleForm extends FormContent { // {{{ /** * This method gets called EVERY time the object is created. It is used to * build all of the FormElement objects used in this Form. * */ function form_init_elements() { // we want an confirmation page for this form. $this->set_confirm(); // now start to add the Form Elements that will be used in this form. // FEButton (label $label, string $value, [string $action = NULL], // [int $width = NULL], [int $height = NULL]) $this->add_element(new FEButton("FEButton Label", 'button-value', 'javascript-action')); // FECheckBox (label $label, string $text) $this->add_element(new FECheckBox("FECheckBox Label", 'checkbox-text')); // FEDataList (string $label, [boolean $required = TRUE], [int $width // = NULL], [int $height = NULL], [array $data_list = array()]) $list = new FECheckBoxList("FECheckBoxList label", FALSE, "200px", "80px", array("Testing 123" => "foo", "my value is bar" => "bar", "Somone's test" => "blah", "Slerm" => "slerm", "my value is hat" => "hat", "One" => 1)); $list->disable_item("Testing 123"); $this->add_element($list); // FEComboListBox (string $label, [boolean $required = TRUE], [int // $width = "200px"], [int $height = "100px"], [array $from_data_list = // array()], [array $to_data_list = array()]) $combo_list = new FEComboListBox("FEComboListBox Label", false, '300px', '100px', array('one' => 1, 'two' => 2), array('three' => 3, 'four' => 4)); $combo_list->set_to_label('this is the to label'); $combo_list->set_from_label('this is the from label'); $this->add_element($combo_list); // FEConfirmActionButton (mixed $label, mixed $value, [mixed $message // = NULL], [mixed $width = NULL], [mixed $height = NULL]) $this->add_element(new FEConfirmActionButton("FEConfirmActionButton label", 'click me for a javascript confirmation', 'Are you sure?')); // the constructor for FEPassword and FEConfirmPassword are the same as FEText $this->add_element(new FEPassword("FEPassword label", false, "200px")); $confirm = new FEConfirmPassword("FEConfirmPassword label", false, "200px"); // add the password FormElement to the ConfirmPassword FormElement so // we can make sure they match. $confirm->password($password); $this->add_element($confirm); // These elements have the same constructor as FEText $this->add_element(new FEDomainName("FEDomainName label", false, "200px")); $this->add_element(new FEEmail("FEEmail label", false, "200px")); $this->add_element(new FEEmailMany("FEEmailMany label (comma separated)", false, "400px")); // What do we do with FEError? // $this->add_element(new FEError("FEError label", 'error message')); // file upload $file = new FEFile("FEFile label", false, "200px"); $file->add_valid_type('image/gif'); $file->add_valid_type('image/jpeg'); $file->set_max_size(1024 * 2); $this->add_element($file); // FEHidden (mixed $label, [mixed $value = NULL]) $this->add_element(new FEHidden("FEHidden label", 'the hidden value')); // FEHostNameWithPort (label $label, [bool $required = TRUE], [int // $width = NULL], [int $maxlength = NULL], [bool $seperate_port = // FALSE]) $this->add_element(new FEHostNameWithPort("FEHostNameWithPort label", false)); // Same constructor as FEText $this->add_element(new FEIPAddress("FEIPAddress label", false, "200px")); // Same constructor as FEHostNameWithPort $this->add_element(new FEIPAddressWithPort("FEIPAddressWithPort label", false)); $list_box = new FEListBox('FEListBox label', false, '200px', '100px'); $list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); $this->add_element($list_box); // does this matter on the back end? How is this different from // FEListBox? $list_box = new FEMultiListBox('FEMultiListBox label', false, '200px', '100px'); $list_box->set_list_data(array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4)); $this->add_element($list_box); // Same constructor as FEText $this->add_element(new FEName("FEName label", false, "200px")); $nested_list_box = new FENestedListBox('FENestedListBox label', false, '200px', '100px'); $data = array("Test" => 1, "Foo" => array("value" => 2, "items" => array("Blah" => 3, "php" => 4)), "Bar" => array("value" => 5, "items" => array("testing" => array("value" => 6, "items" => array("ugh" => 7)), "again" => 8))); $nested_list_box->set_list_data($data); $this->add_element($nested_list_box); // Same constructor as FEText $this->add_element(new FENumber("FENumber label", false, "200px")); $this->add_element(new FENumberFloat("FENumberFloat label", false, "200px")); $this->add_element(new FENumberFloat("FENumberFloat label", false, "200px")); // FENumberInRange (label $label, [bool $required = TRUE], [int $width // = NULL], [int $maxlength = NULL], int $min, [int $max = 100], // [boolean $label_flag = TRUE]) $this->add_element(new FENumberInRange("FENumberInRange label", false, "200px", null, 1, 10)); // Same constructor as FEText $this->add_element(new FENumberPrice("FENumberPrice label", false, "200px")); // FERadioGroup (label $label, [array $data_list = array()]) // how do we set a default value? throws you to the top of the screen // and addss a # in firefox when clicked? $this->add_element(new FERadioGroup("FERadioGroup label", array('one' => 1, 'two' => 2, 'three' => 3, 'four' => 4))); // add constructor label here. $this->add_element( new FERegEx("FERegEx label", false, '200px', 3, '/^1[a-z]T$/', 'This field must equal 1[a-z]T') ); $this->add_element(new FEText("FEText label", false, "200px")); // FETextArea (label $label, [bool $required = TRUE], int $rows, int // $cols, [int $width = NULL], [int $height = NULL], [int // $limit_char_count = -1]) $this->add_element(new FETextArea("FETextArea label", false, 10, 50, null, 300)); // FEUnitedStates (string $label, [boolean $required = TRUE], [int // $width = NULL], [int $height = NULL], array 4) $this->add_element(new FEUnitedStates("FEUnitedStates label", false)); // Same constructor as FEText $this->add_element(new FEUrl("FEUrl label", false, "200px")); $this->add_element(new FEUrlStrict("FEUrlStrict label", false, "200px")); // FEYesNoListBox (label $label, [bool $required = TRUE], [array // $width = NULL], [int $height = NULL], [string $yes_value = "yes"], // [string $no_value = "no"]) $this->add_element(new FEYesNoListBox("FEYesNoListBox label", false)); // FEYesNoRadioGroup (label $label, [bool $required = TRUE], [string // $yes_value = "yes"], [string $no_value = "no"]) // how do you set the default? $this->add_element(new FEYesNoRadioGroup("FEYesNoRadioGroup label", false)); // FEZipcode (label $label, [bool $required = false], [int $width = // NULL], [int $maxlength = 5]) $this->add_element(new FEZipcode("FEZipcode label", false)); // FESubmitButton (label $label, string $value, [int $width = NULL], // [int $height = NULL]) $this->add_element(new FESubmitButton("FESubmitButton label", 'submit button value')); // not used: // FEBoxElement - container? // FEDataList - container? // FEError - how to use? } /** * This method is called only the first time the form page is hit. This * enables u to query a DB and pre populate the FormElement objects with * data. * */ function form_init_data() { } /** * This is the method that builds the layout of where the FormElements will * live. You can lay it out any way you like. * */ function form() { $table = &html_table($this->_width,0,0,2); // add each element to the form as it was included above foreach(array_keys($this->_elements) as $label) { $table->add_row($this->element_label($label), $this->element_form($label)); } return $table; } /** * This method gets called after the FormElement data has passed the * validation. This enables you to validate the data against some backend * mechanism, say a DB. * */ function form_backend_validation() { return TRUE; } /** * This method is called ONLY after ALL validation has passed. This is the * method that allows you to do something with the data, say insert/update * records in the DB. * */ function form_action() { $this->set_action_message("WOO!"); return TRUE; } } //}}} $page = new Form3Page("Form Example 3"); print $page->render(); ?> |
From: Walter A. B. I. <wab...@3g...> - 2004-03-09 06:26:32
|
hehe. I usually just put the version # of the release that the example w= as created. So in this case it would be 4.2.1 It's probably not that useful= l of information, except when viewing the auto generated docs. It's no big. Walt > Should the version number in the example9.php have been something=20 > different? I put it in at 1.0.0. >=20 > culley >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Phphtmllib-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phphtmllib-devel >=20 |