Re: Strip <HTML>,<BODY> and similar from the beginning

From: Date: Mon, 12 Mar 2001 16:40:32 +0000
Subject: Re: Strip <HTML>,<BODY> and similar from the beginning
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-380@lists.php.net to get a copy of this message
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <OE147SQ0pZD5dH1hqjA00002133@hotmail.com> X-OriginalArrivalTime: 12 Mar 2001 16:39:58.0526 (UTC) FILETIME=[1370C5E0:01C0AB13] I can live with it. No problems :) Maybe I'll go for HTML comments anyway. Jim Hardlindong also suggested ASP tags, but they will only cause me too much work. If I'm using comments, I can just click on that comment block, and the contents of the tag will pop up for me to edit it (in the 'properties' dialog). ASP tags requires me first to click on the tag and click on 'Edit' in the dialog. But comments are longer (4/3 chars instead of 2/2. Are there any other good things with ASP tags that I haven't thought of? Thanks for the quick response, both of you. // Victor. ----- Original Message ----- From: "Monte Ohrt" <monte@ispi.net> To: "Victor" <victorious81@hotmail.com> Cc: <smarty@lists.ispi.net> Sent: Monday, March 12, 2001 5:29 PM Subject: Re: [smarty] Strip <HTML>,<BODY> and similar from the beginning > This is an application-specific hack that won't make it into the > distribution. Unless we can figure out a cleaner way to accomodate this, > you'll have to live with your hack. I think using a delimiter syntax > that Dreamweaver likes is the cleanest way. How does Dreamweaver handle > other programming language templates? > > Victor wrote: > > > > > You can put > > > > > > preg_replace('<head>', '', $template_contents); > > > preg_replace('</head>', '', $template_contents); > > > > > > ...etc in Smarty_Compiler.class.php, in function > > > _compile_file($filepath, $compilepath), after the line > > > $template_contents = preg_replace("!{$l.... blabla > > > > Perfect! Just the sort of solution I wanted. But does check if it's an included file, > > or does it do that for all files? Well, it's easier for me to test it. > > > > But I'll have to add support for <html><body ..... > (long tag>, > > </html>, > > ---<BR> > > You are currently subscribed to smarty as: monte@ispi.net<BR> > > To unsubscribe send a blank email to $subst('Email.Unsub')<BR> > > Visit Smarty's homepage at > > http://www.phpinsider.com/php/code/Smarty/ > > </BODY>,<meta>, <link ...> etc, etc.. > > > > *I* think this function should be included in the original dist. Maybe inactivated by > > default, but it should be easy to turn it when needed. > > > > Thanks! > > // Victor > > -- > Monte Ohrt <monte@ispi.net> > http://www.ispi.net/ >

« previous php.smarty.general (#380) next »