Re: [htmltmpl] Images with height/width of 90/120???

2006-02-16 Thread Carl Franks
ame => $test_tmpl); > > print "Content-type: text/html\n\n"; > print $template->output; > > > test.tmpl > ---- > > > > > > > -Original Message- > From: [EMAIL PROTECTED] > [mai

Re: [htmltmpl] Images with height/width of 90/120???

2006-02-16 Thread Carl Franks
It'd be more helpful if you could include the code + template that you used. On 16/02/06, David Murchie <[EMAIL PROTECTED]> wrote: > > > I can't believe this is really happening but it appears that any img > embedded in my html template that has dimensions of 120w x 90h is "dropped" > from the te

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-03 Thread Carl Franks
If you make sure die_on_bad_params => 1 is set in your HTML::Template constructor, then any variable which isn't set in the template, or is misspelt will cause the page to die - the designer can then tell what's wrong by simply looking at the error message. Carl On 02/12/05, Boon Chew <[EMAIL PR

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Carl Franks
> e.g. > > > a TMPL_LOOP doesn't take a hash, it takes an array-ref of hash-refs that would be my @loop = ( {name => 'a'}, {name => 'b'}, ); $tmpl->param( students => [EMAIL PROTECTED] ); If you knew that already, give an example of what sort of data you want to put in, and what you want

Re: [htmltmpl] Problem in TMPL_VAR Display : String containing space is not displayed

2005-11-07 Thread Carl Franks
On 07/11/05, Rakhi Verma <[EMAIL PROTECTED]> wrote: > > Hi, > I am facing some problem with the output of TMPL_VAR VALUE when > the VALUE text contains space charater e.g "abc efg". > When the template is output the is not replaced with the VALUE > text i have specified. > Only the value

Re: [htmltmpl] need to define html::template from the following hash

2005-11-04 Thread Carl Franks
You can't change a tempate according the the_value_ of a variable, however you could change your hash structure from hash1=>{ type =>"text", ... }, hash2=>{ type=>"dropdown", ... } To something more like hash1=>{ text => 1, ... }, hash2=>{ dropdown => 1, ... } And then in the te

Re: [htmltmpl] option to turn ESCAPE=HTML on by default

2005-10-18 Thread Carl Franks
On 18/10/05, Philip Tellis <[EMAIL PROTECTED]> wrote: > Oh well, "Perl is designed to make the easy jobs easy, without making > the hard jobs impossible." > > I'd hoped that it was also, "... make impossible jobs pretty hard" touché :) A new option to allow HTML::Template to load up HTML::Parser

Re: [htmltmpl] option to turn ESCAPE=HTML on by default

2005-10-18 Thread Carl Franks
On 18/10/05, Philip Tellis <[EMAIL PROTECTED]> wrote: > I want both to be on by > default. There can only be 1 _default_, by definition > It makes sense therefore to do this: > > html_escape => 1, js_escape => 1, foo_escape => 0 > Of course, it's pretty hard to figure out which TMPL_VARs need to

OT: Re: [htmltmpl] Re: Html-template-users digest, Vol 1 #552 - 2 msgs

2005-09-05 Thread Carl Franks
Well, it was more of a mental list, but here's what I asked of my last host before going with them. Does the size of the mysql database count towards the normal diskspace allowance? If not, is there a max size for the database? Is spam-assassin installed/supported? fastCGI? Is it possible to up

Re: [htmltmpl] Re: Html-template-users digest, Vol 1 #552 - 2 msgs

2005-09-05 Thread Carl Franks
Arka, Going back through the murky mists of my memories, several years ago to my first encouter with CGI, I came across a IE - apache specific problem. It was a perl CGI running on apache with SSL. Occasionally, but not every time, there was an error message which only occured with IE. I didn't k

Re: [htmltmpl] Using HTML::Template to prefill in values

2005-01-10 Thread Carl Franks
Micheal, You've got the right idea there, that's generally how it's done and yes, it's a bit of a pain. One other option is to fill the template without the form selections, then use HTML::FillInForm to set the form parameters. Another option if you're just dealing with date / time select menus

Re: [htmltmpl] Question about page anchors (bookmarks) in H::T

2004-12-02 Thread Carl Franks
Hi Brad, You don't need to create an explicit "top of page" anchor. Use the implicit top link and it'll do what you want. Carl >>> Brad Cathey <[EMAIL PROTECTED]> 01/12/2004 16:17:18 >>> Hello all, I have placed a simple anchor (bookm at the top and "Top of Page" link at the bottom of a .tmpl

Re: [htmltmpl] Problem accessing directories through .tmpl files

2004-11-25 Thread Carl Franks
Sharad, The paths to your image files (and css, js, etc) are relative to the CGI script. The folder that the .tmpl file is in is irrelevant. Also filesystem paths are irrelevant: it's the website paths you need to know. e.g. if the CGI is at "/cgi-bin/sample/display.pl" Then the image files must

Re: [htmltmpl] using __DATA__ section as template in module

2004-10-04 Thread Carl Franks
{ my $tmpl = HTML::Template->new (filehandle => *DATA); $tmpl->param(bar => 'works'); print $tmpl->output; } 1; __DATA__ foo baz - Carl >>> ken <[EMAIL PROTECTED]> 04/10/2004 11:43:16 >>> Carl Franks wrote: > > >>> <

Re: [htmltmpl] using __DATA__ section as template in module

2004-10-04 Thread Carl Franks
>>> <[EMAIL PROTECTED]> 02/10/2004 23:41:36 >>> > >Anyone ideas on what is going on? Any suggestions welcome. > >Thanks in advance, >-Ken Hi Ken, Try this instead (below), noticed that I pass the DATA fileglob (*DATA) directly to HTML::Template->new Carl #!/usr/bin/perl use strict; use warnin

[htmltmpl] Re: RFC: template helper module

2004-09-24 Thread Carl Franks
sterday that it would probably be best somewhere under HTML:: I'm toying with HTML::Menu::DateTime I'm also currently adding examples for Template::Toolkit to the POD. Thanks, Carl Franks --- This SF.Net email is sponsored by: YOU BE THE

RE: [htmltmpl] print several vars in one loop

2004-09-23 Thread Carl Franks
er line by switching on 'loop_context_vars' and doing something like, or to create a table with 2 columns TMPL_UNLESS> Carl Franks --- This SF.Net email is sponsored by: YOU BE

[htmltmpl] RFC: template helper module

2004-09-22 Thread Carl Franks
pp that I'll be releasing soon. Many thanks, Carl Franks =head1 NAME HTML::Template::Dropdown::Date =head1 SYNOPSIS use HTML::Template::Dropdown::Date; my $menu = HTML::Template::Dropdown::Date->new ( date => '2004-02-26', noSelect => 1, emptyFirst

Re: [htmltmpl] language support

2004-08-24 Thread Carl Franks
An alternative that I use: In the template file, use a simple VAR tag, Store all the different language's text in a database or text files. In the CGI, load the appropriate language based on input parameters or cookie value, my $lang = $cgi->param('lang') || 'en'; my $gui = load_gui ($lang); T

Re: [htmltmpl] Question about syntax

2004-08-11 Thread Carl Franks
> > > >This works well if you are using an (X)HTML editor that >specifically recognized HTML and nothing else. This will just >tell it to skip over you TMPL_VAR tags. Would also be better if >you put your templates through some kind of validation before >using them. Of course, it only works w

Re: [htmltmpl] Is HTML::Template pure Perl?

2004-08-03 Thread Carl Franks
Yeah, that's why I said "probably": I knew there'd be something I'd missed or didn't know about. "There's More Than One Way To Do It" Cheers, Carl >>> Sam Tregar <[EMAIL PROTECTED]> 03/08/2004 04:25:45 >>> On Mon, 2 Aug 2004,

Re: [htmltmpl] Is HTML::Template pure Perl?

2004-08-02 Thread Carl Franks
to change environment variables, in which case you could use the 'use lib' command, eg: use lib "/home/dan/lib"; Hope this helps, Carl Carl Franks Web Developer Computer And Media Services Level 8 Ninewells Hospital Faculty of Medicine, Dentistry & Nursing University of Dundee

Re: [htmltmpl] RFC: external caching

2004-05-12 Thread Carl Franks
> I think I'd write that: > > use Storable qw(freeze); > $cache = freeze($t); > > HTML::Template works fine with Storable - that's how the file_cache > and shared_cache work. > > -sam > That didn't even cross my mind! I think that's exactly what I'll do. The code I had written used Storab

Re: [htmltmpl] Coding up a three column table...

2004-05-12 Thread Carl Franks
One way to do it might be: use strict; use Data::Dumper; my $cols = 3; my @foo = ({one => 1, ein => 1},{two => 2, zwei => 2}, {three => 3, drei => 3}, {four => 4, vier => 4}); my @bar; for (my $n=0; $n<=$#foo; $n+=$cols) { my @row; for (1..$cols) { push @row, $foo[$n+($_

[htmltmpl] RFC: external caching

2004-05-12 Thread Carl Franks
Hi all, I've coded and tested a new feature for the 'new' and 'output' methods and would like people's feedback on whether it might be accepted. This feature request allows a parsed template structure to be output as a scalar ref, which can be fed back to the new method again. Effectively this

[htmltmpl] RFC:- HTML::Template::Dropdown::Date

2004-02-24 Thread Carl Franks
te::Dropdown::Date->new ( date => '2004-04-01', lessYears => 2, plusYears => 0 ); $template->param (startDay => $start->dayMenu()); print header(), $template->output(); ### Thanks, Carl Franks --- SF

RE: [htmltmpl] Re: bounce messages

2004-02-20 Thread Carl Franks
>Die E-Mail-Adresse <[EMAIL PROTECTED]> an die Sie eine Mail geschickt haben, >hat sich geändert. Bitte benutzen Sie zukünftig <[EMAIL PROTECTED]> >statt <[EMAIL PROTECTED]>. Die von Ihnen gesendete Mail wurde an den >richtigen Empfänger weitergeleitet. The email address you sent to <[EMAIL PROT