html-template-users Mailing List for HTML::Template (Page 66)
Brought to you by:
samtregar
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(80) |
Aug
(77) |
Sep
(97) |
Oct
(65) |
Nov
(80) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(63) |
Feb
(47) |
Mar
(45) |
Apr
(63) |
May
(67) |
Jun
(51) |
Jul
(78) |
Aug
(37) |
Sep
(45) |
Oct
(59) |
Nov
(50) |
Dec
(70) |
2004 |
Jan
(23) |
Feb
(90) |
Mar
(37) |
Apr
(53) |
May
(111) |
Jun
(71) |
Jul
(35) |
Aug
(58) |
Sep
(35) |
Oct
(35) |
Nov
(35) |
Dec
(20) |
2005 |
Jan
(51) |
Feb
(19) |
Mar
(20) |
Apr
(8) |
May
(26) |
Jun
(14) |
Jul
(49) |
Aug
(24) |
Sep
(20) |
Oct
(49) |
Nov
(17) |
Dec
(53) |
2006 |
Jan
(12) |
Feb
(26) |
Mar
(45) |
Apr
(19) |
May
(19) |
Jun
(13) |
Jul
(11) |
Aug
(9) |
Sep
(10) |
Oct
(16) |
Nov
(17) |
Dec
(13) |
2007 |
Jan
(9) |
Feb
(12) |
Mar
(28) |
Apr
(33) |
May
(12) |
Jun
(12) |
Jul
(19) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(5) |
Dec
(13) |
2008 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(16) |
May
(3) |
Jun
(1) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(7) |
Oct
(1) |
Nov
(15) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
(28) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(8) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Jayson P. <JP...@je...> - 2003-11-03 20:24:00
|
Looks like you are mostly successful. Is there a path variable in the document=3F (eg <TMPL=5FVAR NAME=3D'path'>) It appears to be trying to = set the variable 'path' which is not in the template file. =3D) --Jayson "l.f.elia" <l.f...@la...> Sent by: htm...@li... 11/03/03 03:09 PM To: htm...@li... cc: Subject: [htmltmpl] newbie so this may be a faq Hello All, I've been checking out HTML::Template, ($HTML::Template::VERSION =3D '2.6';), and I cannot get it to work with the examples in the documentation. I am using activestate perl ActivePerl Build 633 on win32, nothing fancy just the examples, but they wont work. Is this a windows problem=3F I get this error: HTML::Template : Attempt to set nonexistent parameter 'path' - this parameter name doesn't match any declarations in the template file : (die=5Fon=5Fbad=5Fparams =3D> 1) at templ.pl line 6 please help... -- There are at least two kinds of games. One could be called finite, the other infinite. A finite game is played for the purpose of winning, an infinite game for the purpose of continuing the play. -- James Carse ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive=3F Does it help you create better code=3F SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F Html-template-users mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/html-template-users Jefferies archives and reviews outgoing and incoming e-mail. It may be prod= uced at the request of regulators or in connection with civil litigation. Jefferies accepts no liability for any errors or omissions arising as a resu= lt of transmission. Use by other than intended recipients is prohibited. |
From: l.f.elia <l.f...@la...> - 2003-11-03 20:08:48
|
Hello All, I've been checking out HTML::Template, ($HTML::Template::VERSION = '2.6';), and I cannot get it to work with the examples in the documentation. I am using activestate perl ActivePerl Build 633 on win32, nothing fancy just the examples, but they wont work. Is this a windows problem? I get this error: HTML::Template : Attempt to set nonexistent parameter 'path' - this parameter name doesn't match any declarations in the template file : (die_on_bad_params => 1) at templ.pl line 6 please help... -- There are at least two kinds of games. One could be called finite, the other infinite. A finite game is played for the purpose of winning, an infinite game for the purpose of continuing the play. -- James Carse |
From: Ron S. <ro...@de...> - 2003-10-30 22:47:53
|
On Thu, 30 Oct 2003 12:57:12 -0500, Greg Marr wrote: Hi Folks > At 11:43 AM 10/30/2003, nic...@cl... wrote: >> Now, my problem is that I'm unable to make this function works. >> Here >> is the code I use within the cgiapp_postrun method: >> >> sub cgiapp_postrun { >> my $self =3D shift; >> my $output_ref =3D shift; >> >> my $new_output =3D "<h3>";#.$$output_ref."</h3>"; >> $output_ref =3D \$new_output; >> } > > That last line should be $$output_ref =3D $new_output; > Yes, there are some incorrect docs out there that show the form you > used. Besides that, look closely at the line in error: =09my $new_output =3D "<h3>";#.$$output_ref."</h3>"; Perl will parse this as: =09my $new_output =3D "<h3>"; followed by =09# Comment... -- Ron Savage, ro...@de... on 31/10/2003. Room EF 312 Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia Phone: +61-3-9251 7067, Fax: +61-3-9251 7604 http://www.deakin.edu.au/~rons |
From: Tristan P. <tri...@ya...> - 2003-10-29 15:09:11
|
Dear H:T users, What is the best way to validate form input from a user? I currently validate all data in my forms (hidden or not) using regular expressions, however I think my character set is too restrictive and may be turning away a lot of customers. Can I simply turn this checking off, and use H:T's escape-html feature to avoid nasty characters? Looking for the best method, all comments welcome! Thanks! Regards, Tristan Petersen http://cambist.net/ __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |
From: Ron S. <ro...@de...> - 2003-10-29 03:52:57
|
On Tue, 28 Oct 2003 20:58:40 -0600 (CST), Karen J. Cravens wrote: Hi Karen > Basically, regardless of the way the server constructs it, what you > want > at the end of the day is a link that reads something like this: > > <a href=3D"http://something-something/x.cgi" target=3D"right"> Brilliant. Many thanx. Guess I'll have to release a patch to CGI::Explorer to take a 'target' option :-). -- Ron Savage, ro...@de... on 29/10/2003. Room EF 312 Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia Phone: +61-3-9251 7067, Fax: +61-3-9251 7604 http://www.deakin.edu.au/~rons |
From: Karen J. C. <si...@ph...> - 2003-10-29 02:59:52
|
On Wed, 29 Oct 2003, Ron Savage wrote: RS>However, the (correct) output always appears in the left frame. RS> RS>Any ideas? Basically, regardless of the way the server constructs it, what you want at the end of the day is a link that reads something like this: <a href="http://something-something/x.cgi" target="right"> If you look at the frame source in IE and you don't see that "target=" then as far as I know (which isn't necessarily that far, actually) no matter what hoops you jump through with redirects, your output's going to show up in the same frame the clicked link was in. (You can probably do something different with Javascript, but you should never count on that.) -- Karen J. Cravens si...@ph... |
From: Ron S. <ro...@de...> - 2003-10-29 02:47:00
|
Hi Folks Using IE 6. And, yes, I'm aware of this page, which discusses trying to redirect posts to posts: http://ppewww.ph.gla.ac.uk/~flavell/www/post-redirect.html Now for the problem: I have a frameset which basically looks like: =09=09=09<frame name=3D"left" src=3D"http://127.0.0.1/x-tree.cgi"> =09=09=09<frame name=3D"right" src=3D"http://127.0.0.1/x.cgi"> x-tree.cgi displays a tree of links via 'a href' (using CGI::Explorer, a Perl wrapper around xTree http://webfx.eae.net/dhtml/xtree/). x.cgi displays other stuff. x.cgi and x-tree.cgi are the same code, based on CGI::Application. Their calls to new() store 'left' or 'right'. I'd like, when one of those links in the left frame is clicked, for the output to appear in the right frame. My experiments have either: (1) centered around using just (in x-tree.cgi): =09=09$self -> header_props(-target =3D> 'right'); (2) or around (in x-tree.cgi): =09Construct $url =3D 'x.cgi/...' and =09=09$self -> header_type('redirect'); =09=09$self -> header_props(-url =3D> $url); =09=09return ''; =09and in x.cgi: =09=09$self -> header_props(-target =3D> 'right'); However, the (correct) output always appears in the left frame. Any ideas? -- Ron Savage, ro...@de... on 29/10/2003. Room EF 312 Deakin University, 221 Burwood Highway, Burwood, VIC 3125, Australia Phone: +61-3-9251 7067, Fax: +61-3-9251 7604 http://www.deakin.edu.au/~rons |
From: Puneet K. <pk...@ei...> - 2003-10-28 18:17:03
|
I realized the error of my ways... (Thanks Sam). I was doing something without realizing I was doing it. This matter is a non-issue now. Thanks to everyone who responded. Jeff Pelkey wrote: > Howdy, > > Actually all Windows platforms (I am assuming Server 2003 is the same) only > allow you to Get the ProcessID. Are you trying to kill the process or are > you trying to change a process flag or something? > > Why are you trying to change the PID? What does that allow you to do on > other O/S's? I have never considered this something you could or would > change. > > Thanx, Jeff. > Sam Tregar wrote: > On Mon, 27 Oct 2003, Puneet Kishor wrote: > > >>However, the following works fine on MacOS X >> >>my $template = HTML::Template->new( >> filename => index.tmpl, >> global_vars => 1, >> loop_context_vars => 1, >> filter => sub { $$ =~ s/<!--#.*?-->//g; } >> ); > > > Wow, that's twisted! Why are you modifying the PID of the process ($$)? > > >>but gives the following error on Windows XP >> >>HTML::Template->new() : fatal error occured during filter call: >>Modification of a read-only value attempted at >>D:/htdocs/perlpim/cal/index.cgi line 28. >> at D:/htdocs/perlpim/cal/index.cgi line 29 > > > I guess the PID is readonly on XP. > > -sam |
From: Jeff P. <jp...@gr...> - 2003-10-28 17:49:27
|
Howdy, Actually all Windows platforms (I am assuming Server 2003 is the same) only allow you to Get the ProcessID. Are you trying to kill the process or are you trying to change a process flag or something? Why are you trying to change the PID? What does that allow you to do on other O/S's? I have never considered this something you could or would change. Thanx, Jeff. >I guess the PID is readonly on XP. > >-sam CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information, the disclosure of which is governed by applicable law. If the reader of this e-mail is not the intended recipient(s), any unauthorized review, use, disclosure or distribution is prohibited. If you have received this message in error, please contact the sender by reply e-mail and destroy all copies of the original message immediately. |
From: Kenneth G. <la...@th...> - 2003-10-28 07:47:43
|
On Monday 27 October 2003 19:58, Pete Prodoehl wrote: > Sam Tregar wrote: > > On Sat, 25 Oct 2003, David Christensen wrote: > >>I searched the mailing list archive, and was surprised not to find any > >>messages regarding HTML editors. > > > > That's probably because most of the people on this list are on the > > Perl side of the fence. The HTML designers I work with use BBEdit, > > UltraEdit and occaisonly DreamWeaver. When I need to hack HTML I > > usually just use Emacs. > > > > -sam > > Yup, I avoid the wysiwyg editors, instead opting for jEdit, which is an > open-source, multi-platform, mondo-customizable text editor: > http://jedit.org/ quanta with the gimp and sodipodi is the closest open source gets to this kg |
From: Sam T. <sa...@tr...> - 2003-10-27 19:06:25
|
On Mon, 27 Oct 2003, Puneet Kishor wrote: > However, the following works fine on MacOS X > > my $template = HTML::Template->new( > filename => index.tmpl, > global_vars => 1, > loop_context_vars => 1, > filter => sub { $$ =~ s/<!--#.*?-->//g; } > ); Wow, that's twisted! Why are you modifying the PID of the process ($$)? > but gives the following error on Windows XP > > HTML::Template->new() : fatal error occured during filter call: > Modification of a read-only value attempted at > D:/htdocs/perlpim/cal/index.cgi line 28. > at D:/htdocs/perlpim/cal/index.cgi line 29 I guess the PID is readonly on XP. -sam |
From: Puneet K. <pk...@ei...> - 2003-10-27 17:36:09
|
The following works fine on both MacOS X (Perl 5.6.0) and Windows XP (Perl 5.8.0). my $f = sub { my $t = shift; $$t =~ s/<!--#.*?-->//g; }; my $template = HTML::Template->new( filename => index.tmpl, global_vars => 1, loop_context_vars => 1, filter => $f ); However, the following works fine on MacOS X my $template = HTML::Template->new( filename => index.tmpl, global_vars => 1, loop_context_vars => 1, filter => sub { $$ =~ s/<!--#.*?-->//g; } ); but gives the following error on Windows XP HTML::Template->new() : fatal error occured during filter call: Modification of a read-only value attempted at D:/htdocs/perlpim/cal/index.cgi line 28. at D:/htdocs/perlpim/cal/index.cgi line 29 Line 29 is filter => sub { $$ =~ s/<!--#.*?-->//g; } what gives? Thanks. |
From: Pete P. <pet...@cy...> - 2003-10-27 14:35:37
|
Sam Tregar wrote: > On Sat, 25 Oct 2003, David Christensen wrote: > > >>I searched the mailing list archive, and was surprised not to find any >>messages regarding HTML editors. > > > That's probably because most of the people on this list are on the > Perl side of the fence. The HTML designers I work with use BBEdit, > UltraEdit and occaisonly DreamWeaver. When I need to hack HTML I > usually just use Emacs. > > -sam Yup, I avoid the wysiwyg editors, instead opting for jEdit, which is an open-source, multi-platform, mondo-customizable text editor: http://jedit.org/ Pete |
From: Martijn v. d. B. <Mar...@as...> - 2003-10-27 09:26:41
|
Hi, On Sunday 26 October 2003 15:44, Puneet Kishor wrote: > While templates are supposed to be (almost) pure html, I want to > insert comments in the templates (for my benefit... all those loops > within loops get confusing after a while) that I don't want printed > in the browser. I use HTML::Clean to do this. Strips also the comments from JavaScript, empty lines, etc. (configurable). Regards, -- </Martijn> 'practice random acts of kindness and senseless acts of beauty' - A.H. - -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. |
From: Puneet K. <pk...@ei...> - 2003-10-26 17:06:56
|
a minor correction for the benefit of others who might use this trick -- > > On Sunday, October 26, 2003, at 10:30 AM, Cees Hek wrote: > >> .. >> >> or you could write a simple filter that strips out all your comments >> when you >> load the template: >> >> my $filter = sub { >> my $text_ref = shift; >> $$text_ref =~ s/\<\<\!\-\-.*?\-\-\>\>//g; >> }; >> >> my $template = HTML::Template->new(filename => $template_file, >> filter => $filter); >> >> no need to escape all those html chars. The following works for me -- # create new template my $template = HTML::Template->new( filename => $template, global_vars => 1, loop_context_vars => 1, filter => sub { $$ =~ s/<!--#.*?-->//g; } ); |
From: Puneet K. <pk...@ei...> - 2003-10-26 16:48:14
|
On Sunday, October 26, 2003, at 10:30 AM, Cees Hek wrote: > Quoting Puneet Kishor <pk...@ei...>: > >> While templates are supposed to be (almost) pure html, I want to >> insert >> comments in the templates (for my benefit... all those loops within >> loops get confusing after a while) that I don't want printed in the >> browser. Would be nice to have some kind of meta template comment tag >> that is stripped out while filling the templates on the server. >> Something like -- > > > There are a couple of ways to do this already: > > First, just use a TMPL_IF construct that is always false: > > <TMPL_IF NAME="comment"> > THis is a comment as long as the code never defines the variable > 'comment' > </TMPL_IF> > > or you could write a simple filter that strips out all your comments > when you > load the template: > > my $filter = sub { > my $text_ref = shift; > $$text_ref =~ s/\<\<\!\-\-.*?\-\-\>\>//g; > }; > > my $template = HTML::Template->new(filename => $template_file, > filter => $filter); > > > The second one is probably preferrable, but I would use something > besides <<! >> > as the delimiters, Since they are not valid HTML, and also they are > not easily > distinguishable from regular comments. Why not something like <!--SRV > Here is a > server side comment --> > > very nice... thanks for the tip. I will use <!--# this is a server side comment --> so my code editors will still colorize the comments as comments, it will remain valid html, and the # is, well, a recognizable server side comment. cool. |
From: Cees H. <ce...@si...> - 2003-10-26 16:31:11
|
Quoting Puneet Kishor <pk...@ei...>: > While templates are supposed to be (almost) pure html, I want to insert > comments in the templates (for my benefit... all those loops within > loops get confusing after a while) that I don't want printed in the > browser. Would be nice to have some kind of meta template comment tag > that is stripped out while filling the templates on the server. > Something like -- There are a couple of ways to do this already: First, just use a TMPL_IF construct that is always false: <TMPL_IF NAME="comment"> THis is a comment as long as the code never defines the variable 'comment' </TMPL_IF> or you could write a simple filter that strips out all your comments when you load the template: my $filter = sub { my $text_ref = shift; $$text_ref =~ s/\<\<\!\-\-.*?\-\-\>\>//g; }; my $template = HTML::Template->new(filename => $template_file, filter => $filter); The second one is probably preferrable, but I would use something besides <<! >> as the delimiters, Since they are not valid HTML, and also they are not easily distinguishable from regular comments. Why not something like <!--SRV Here is a server side comment --> Anyway, you have some options here to work with... Cheers, Cees |
From: Puneet K. <pk...@ei...> - 2003-10-26 14:49:09
|
While templates are supposed to be (almost) pure html, I want to insert comments in the templates (for my benefit... all those loops within loops get confusing after a while) that I don't want printed in the browser. Would be nice to have some kind of meta template comment tag that is stripped out while filling the templates on the server. Something like -- <!-- this is an html comment --> <b>Some html here</b> <<!-- this comment doesn't get printed in the html -->> <<!-- start loop foo -->> <tmpl_loop foo> <<!-- start loop bar -->> <tmpl_loop bar> <<!-- start loop baz -->> <tmpl_loop baz> <!-- today's blah gets printed in the browser --> <tmpl_var blah> </tmpl_loop baz> <<!-- end loop baz -->> </tmpl_loop bar> <<!-- end loop bar -->> </tmpl_loop foo> <<!-- end loop foo -->> |
From: Sam T. <sa...@tr...> - 2003-10-25 21:41:07
|
On Sat, 25 Oct 2003, David Christensen wrote: > I searched the mailing list archive, and was surprised not to find any > messages regarding HTML editors. That's probably because most of the people on this list are on the Perl side of the fence. The HTML designers I work with use BBEdit, UltraEdit and occaisonly DreamWeaver. When I need to hack HTML I usually just use Emacs. -sam |
From: David C. <dpc...@ho...> - 2003-10-25 19:52:47
|
htm...@li...: I searched the mailing list archive, and was surprised not to find any messages regarding HTML editors. I am rebuilding an e-commerce site using Perl, CGI::Application, HTML::Template, etc., and was wondering what experiences and/or recommendations people had for open-source HTML editors. I would like to find something WSIWIG that integrates well with the various Perl modules, to be used by graphic artists and other non-coders. TIA, David |
From: David W. <da...@ki...> - 2003-10-23 01:25:30
|
It give me great pleasure to announce the release of Bricolage-Devel 1.7.0, the first development release for what will eventually become Bricolage 1.8.0. In addition to all of the bug fixes included in the 1.6.x series, this version of the open-source content management system adds a number of significant new features. The most significant changes include: * Added multisite support. Now all stories, media, output channels, templates, categories, and workflows may be associated with different sites, and even have the same names in different sites. This simplifies the management of multiple Web sites with Bricolage. Story type and media type elements may be shared between sites. Funded by Portugal Telecom Multimedia. * Added document aliasing. Stories and media in a site may now be aliased and published in another site, as long as the elements on which they are based are shared between sites. Control over the content of aliased documents remains in the original site, thus ensuring the editorial integrity of the document for that site. Funded by Portugal Telecom Multimedia. * Added "$burner->sdisplay_element" method to Bric::Util::Burner. This is a "sprintf"-style version of "$burner->display_element". * Added the "YEAR_SPAN_BEFORE" and "YEAR_SPAN_AFTER" bricolage.conf directives. These directives enable control how many years before and after the current year to display in the list of years in the date and time select widget. The default values are 10 for each, meaning that if the current year is 2003, then the date span will be from 1993 to 2013. * Added "Email" action, which can be used to email the files generated by a publish to one or more email addresses. Funded by ETonline. * Callbacks were moved from Mason components to modules based on Params::Callback and managed by MasonX::Interp::WithCallbacks. This makes the UI layer more responsive and enhances maintainability. * Optimized performance of URI uniqueness checks by adding database tables to do the job, rather than constructing the URIs for all other documents in the same categories as the document being checked. This was the last major bottleneck affecting SOAP performance, as well as document editing in general. Funded by Kineticode. * Added "output_channel_id" parameter to the "list()" methods of Story and Media to enable querying for documents in output channels other than the primary output channel. * Added Keyword Management interface to centrally manage keywords. * Added HTML::Mason Custom tags support, allowing template developers to write code blocks that are context sensitive. * Added new page extension support to the burner, which allows template developers to set string extensions to use for successive file names, rather than the traditional use of numeric file name extensions for successive file names. * Added "Text to search" option in the Advanced search of Media and Stories to search for documents based on the contents of their field. * All preview links are now generated by a single widget. This widget adds the story or media URI to the "title" attribute of the link tag (which is modern browsers will automatically work as a roll-over tooltip), makes the story or media URI copyable (by relying on JavaScript to actually open a new window for the preview), and manages selecting an output channel in which to preview a story. * Made User Group Permissions UI wieldy with larger numbers of users by adding a select list to choose which type of Permission to look at. * Added "contrib_id" parameter to the "list()" methods of Bric::Biz::Asset::Business::Story and Bric::Biz::Asset::Business::Media to return a list of story or media documents associated with a given contributor. * Switched Bric::Util::CharTrans from using Text::Iconv to Encode, thus removing the dependency on a C library (libiconv). Note that this has changed the API of Bric::Util::CharTrans. Its "to_utf8()" and "from_utf8()" methods now always convert the argument passed in in place. They did this before for references, but now they do it for plain strings, as well. Also note that use of character translation also now requires Perl 5.8.0 or later. * Added MediaType, Site, and Keyword SOAP modules. * Added "element" attribute to Bric::Util::Burner so that "$burner->get_element" should always return the element currently being burned. * Added a "throw_error()" method to Bric::Util::Burner so that template developers can easily throw an exception that their users will see in the UI. * Moved category selection from Media and Story Profiles into their own separate components so that organizations with hundreds or thousands of categories don't have to load them into a dropdown list every time an asset is edited. The category "browser" uses an interface similar to 'Associate Contributors', which has the advantage of being searchable rather than looking through a "long list of all categories". This feature can be enabled via the new "ENABLE_CATEGORY_BROWSER" bricolage.conf directive. * Added list paging to Desks and My Workspace. * Added the ability to test templates without having to deploy them by using "template sandboxes" for each template developer. * Added Template Toolkit burner support. * Added support for installing and upgrading Bricolage with PostgreSQL on a separate host. * Added context-sensitive help for pages that were missing it. For a complete list of the changes, see the changes file at: http://sourceforge.net/project/shownotes.php?release_id=192790 ABOUT BRICOLAGE Bricolage is a full-featured, enterprise-class content management and publishing system. It offers a browser-based interface for ease-of use, a full-fledged templating system with complete HTML::Mason, HTML::Template, and Template Toolkit support for flexibility, and many other features. It operates in an Apache/mod_perl environment and uses the PostgreSQL RDBMS for its repository. A comprehensive, actively-developed open source CMS, Bricolage has been hailed as "Most Impressive" in 2002 by eWeek. Learn more about Bricolage and download it from the Bricolage home page, http://bricolage.cc/. Enjoy! David -- David Wheeler AIM: dwTheory da...@ki... ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: Th...@ja... Kineticode. Setting knowledge in motion.[sm] |
From: David W. <da...@ki...> - 2003-10-22 22:47:39
|
I'm pleased to announce the release of Bricolage 1.6.7. This maintenance release addresses a few issues discovered since the release of version 1.6.6. Some of the more important changes include: * Fixed "bric_soap" to accept a "--server" argument starting with "https", which is more friendly to an SSI environment. * The PostgreSQL admin username and password arguments were reversed during "make upgrade". * Added partial index to speed queries against the job table, and thus to speed distribution. * Updated slug RegExen. They were a bit too strict, and should be better now, allowing dots, dashes, and underscores. * Inactive alert types no longer trigger the sending of alerts. * Fixed "element_data_id" parameter to Bric::Biz::Asset::Business::Parts::Tile::Data to actually work. See below for a complete list of the changes. http://sourceforge.net/project/shownotes.php?release_id=192775 ABOUT BRICOLAGE Bricolage is a full-featured, enterprise-class content management and publishing system. It offers a browser-based interface for ease-of use, a full-fledged templating system with complete HTML::Mason and HTML::Template support for flexibility, and many other features. It operates in an Apache/mod_perl environment, and uses the PostgreSQL RDBMS for its repository. A comprehensive, actively-developed open source CMS, Bricolage has been hailed as "Most Impressive" in 2002 by eWeek. Learn more about Bricolage and download it from the Bricolage home page, http://bricolage.cc/. Enjoy! David -- David Wheeler AIM: dwTheory da...@ki... ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: Th...@ja... Kineticode. Setting knowledge in motion.[sm] |
From: Mark F. <mar...@ea...> - 2003-10-22 03:04:24
|
>From: "Sam Tregar" <sa...@tr...> > > Or, is it customary to ask the user and do gettext based > > upon their answer? > > Sorry, I don't. Here's what I'd do if I needed to find out: I did a lot of searching and reading. I think HTML::Template can be useful when serving multi-lingual pages that are relatively static. For something more dynamic, maybe due to changing error messages. I found that there is a Perl module Locale::Maketext[1] which does what "gettext"[2] while providing some interesting flexibility. For example, let's say I want to return "0 entries found," "1 entry found," or "2 entries found." With gettext I would have to have two lexicon elements to accomodate negative, singular and plural forms. I would not include the number with the text, therefore the number would always be emitted to the left regardless of language. (Other languages may be more natural to say "found 0 entries".) Locale::Maketext lets you specify numbers as parameters to the lexicon. It also has a method to determine negative, singular or plural and use the correct word in the lexicon. Also, being written in Perl, I suppose it could be used with mod-perl and made persistent. (Not sure). Anyway, I hope I didn't stray too far off-topic with this feedback. I think it could be useful to HTML::Template users because the resulting text from a Locale::Maketext call could be substituted into a templates. This way templates can be more easily used for multi-lingual purposes. Additionally, I also learned it's better to ask the visitor which language they prefer (rather than using the http header value). But, the http header value can be used to make a best-guess about the language to use to ask them which language they prefer. Also learned that UTF-8 encoding should be used regardless of the language unless it is found there is not enough support for the language, at which time you should maintain an association between language codes and more specific character sets for the specific language. [1] http://search.cpan.org/~sburke/Locale-Maketext-1.06/lib/Locale/Maketext.pod [2] http://www.gnu.org/software/gettext/gettext.html For why gettext is limited, read this amusing story: http://search.cpan.org/~sburke/Locale-Maketext-1.06/lib/Locale/Maketext/TPJ13.pod Thanks! Mark |
From: Gabor S. <ga...@pe...> - 2003-10-21 03:49:17
|
On Sun, 19 Oct 2003, Sam Tregar wrote: > On Fri, 17 Oct 2003, Gabor Szabo wrote: > > > Current status v2.6 > > ------------------- > > There are 57 (actually 60 but the script reports 57) tests. > > Based on the report of Devel::Cover the tests provide a 67.95% code > > coverage. > > That seems pretty low. Is that meant to suggest that 33% of lines of > Perl code aren't executed during the test run? Maybe you ran the > tests without TEST_SHARED_MEMORY and TEST_FILE_CACHE set? Yes I ran them without those flags so the actual test should cover more. I should have been more careful. I'll do that later and the adjust the original number. Besides the 67.95% is an average and Devel::Cover is declared to be alpha release. You can download the report from here: http://www.pti.co.il/download/ht-cover.tar.gz It already contains my tests so the average here is 68.3 but I think I'll create various reports and upload them so we can later see the progress. If there is :-) > > 2) use Test::More for these new tests. > > Why? That would add a new dependency for the module. I got enough > flak when I started using Test.pm! That's true and I was a bit worried about it but Test::More is already in 5.8.0 and based on a presentation of Schwern and chromatic I understand that nearly all the important modules already require it so it is quite likely that any user of H:T will already have it in older Perls as well. http://magnonel.guild.net/~schwern/talks/Test_Tutorial/Test-Tutorial.pdf But the reason to use it is that it has so much better facilities to write cleaner tests than Test had. > > 4) Change the code if necessary to make it easier (or possible) > > to test. > > I'd be surprised if this was necessary. HTML::Template presents a > nice black box and it's usually pretty easy to feed it a set of inputs > and examine the output. The part which is difficult to test is to emulate errors. That's what I meant but let's put the above on hold till I get my tests out as I also think that most likely it won't be necessary. > > > I have packaged the changes so far and it is available here: > > http://www.pti.co.il/download/HTML-Template-2.61_01.tar.gz > > Could you make this available as a patch with 'diff -Naur'? That > would make it easier to evaluate the changes at a glance. I will, but I think first I add some more tests. In any case the changes were so far: - the version number in Template.pm - added to Changes - META.yml was automatically added - MANIFEST - added the list of new files - Makefile.PL - prerequisite of Test::More - a couple of new files under t/ and tmpl/ Gabor |
From: Cees H. <ce...@si...> - 2003-10-20 03:56:56
|
Perhaps you are looking at the wrong tool to solve this problem. Personally I never use TMPL_VARs to fill out my forms. I use HTML::FillInForm to do it for me. This would solve your problem and simplify your templates (no need for the tmpl_if mess to select an option in a selection box). With HTML::FillInForm you just create your select list statically in the template (or dynamically with HTML::Template if you want). Then once you get your $template->output, send it to HTML::FillInForm and pass it either a hash of the form field values or just pass the CGI query object, and it will parse your HTML and fill out the form for you. This adds an extra step in your code, and will impact performance since HTML::FillInForm has to parse the HTML to fill in the form, but in most of my apps this is acceptable. A simple example follows: my $query = new CGI; my $template = new HTML::Template(...); my $fif = new HTML::FillInForm; my $html = $fif->fill(scalarref => \$template->output(), fobject => $query); Cheers, Cees Quoting Mark Fuller <mar...@ea...>: > > From: "Sam Tregar" <sa...@tr...> > > Are you saying you can't do this now? I've produced <select> boxes > > with HTML::Template. It requires a nasty pile of <tmpl_if> logic but > > it's doable. > > Hi Sam. Yes, I think "tmpl_if" will work. The problem I have is that my > templates will be organized by spoken language. The english ones in a "en" > directory. Spanish in "es" directory. My script will determine which > templates to access depending on the visitor's language preference. > > Now, in a template I might have an option box for "male or female". In > Spanish, "hombre or mujer." This language difference is kept in the > template, and an ordinal is used to communicate to the scripts what the > choice was. Regardless of language, "1" is a male, and "2" is a female. So, > in this case, it would defeat the strength of templates to call some other > device to emit the option box. I'd have to store the language text in a > MySQL table and pass it to the device that will create the option box. I'd > rather not do that since the text logically belongs in the template instance > for that language. > > So, yes, I could set a param name for "one" and "two" and "three". Which > ever is set to boolean true, that would be the option line to get the > "selected" attribute. But, that seems like a difficult way to do it. The > conditional test for string value (in template::expression) would be easier. > I could set a single param to "two" and in the template test for "one" or > "two" or "three". One param name with different values. It just seemed like > template::expression gave me *a lot* more things which, at this point, I > agree are undesireable. > > Now that I think about it, I believe I could set a param name for "one" and > "two" and "three" but instead of making them true and false (and using an if > statement) I could set the correct one to "selected" and just let each > variable be replaced by its value. Only one would have "selected" and it > would be emitted at the correct option line. > > Do you know if it would be more efficient to set one var and use a > conditional to determine which option select line to treat differently. Or, > set many vars and let them all be replaced (to null except one). > > Thanks, > Mark > > > > ------------------------------------------------------- > This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo > The Event For Linux Datacenter Solutions & Strategies in The Enterprise > Linux in the Boardroom; in the Front Office; & in the Server Room > http://www.enterpriselinuxforum.com > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |