HTML Macros and Macro Syntax
- Added and confirmed code to properly recognize syntax like %=SET|x=%=HubApp.CGIAPP=%=%
(e.g. no space after 'x=')
- Added support for '//' to be recognized as a comment when found at the beginning of a line. This feature will
be enabled by default for all webapps. Should you require otherwise set WebApp.whComments to false.
- Enhanced the HTML Tag parser to support all variations of parameters for controlled HTML. This
removes a long-standing shortcoming and gives you the utmost in HTML Tag parameter flexibility.
Experiment with this chunk
Macros for Branding
What is Branding? Branding is a revolutionary concept owned by HREF Tools Corp that adds state to static
websites by adjusting links and performing macro expansion on the fly, on static pages.
Other New Macros
%=Bounce=%,%=HREF=%, WebMail, now allow HTTP and HTTPS interchangably
- INCLUDE Macro
fixed/unchanged: use %=include|c:\autoexec.bat=% to include the listed file
- SENDFILE Macro
fixed/unchanged: use %=flush|=%
to clear the output buffer of any headers or leading text that might have snuck in, then send an arbitrary file.
include a "Content-Type: xyz" line (and a blank line thereafter) in the file if you are sending a custom binary
file and dont know the mime type ahead of time. use %=sendfile|c:\temp\temp.gif,image/gif=% if you're
sending a binary file and you know the type beforehand.
- AutoLoad/BodyLoad Macros
autoload.htm with all the clues for these important macros.
- Page Macro: Bug Fixed
Sending Page-Macros from within WebAction components (but not WebPage.OnExecute/OnSection)
were ineffective as the EAbort exception was not re-raised by the WebAction.Execute mechanism. This
has been corrected.
In addition, regardless of where you used 'Writeln' to trigger a page-change, the macro would only work
every other time. This was a bit of a puzzler at first sight as 'Writeln' works by bending pointers in the RTL,
but it's been resolved as well.
Bottomline is: %=Page|..=% and raising EAbort now reliably works in all the combinations that I could
think of testing at the time.
- 'Checked' Bug introduced in 1.05,1.06, fixed in 1.07
Two variations of problems involving the Checked macro were introduced in the experimental 1.05/1.06
builds. One would create HUGE session var files, the other would cause problems resetting checkmarks
Support for other Markup Tags
- WebHub can now recognize Cold Fusion and Frontpage Bot Syntax. This functionality must be enabled by
setting the desired syntax option in WebApp.OtherTags. If alternate tags are enabled, the
WebApp.OnOtherTag event is called with the unexpanded tag. Use routines from ucstring, uchtml, uttaglst
to process the value, use WebApp.CompareTo to expand webhub individual macros. Set the 'Send'
parameter to false if you don't want the tag to be passed through.
- new event type: TOnOtherTag= procedure(Sender:TWebOutputApp;const
Value:String;Send:boolean;Kind:TOtherTag) of object;
- To test, actviate OtherTags and try this code with a frontpage or cold-fusion file:
- procedure TfmWebAppMainForm.htWebAppOtherTag(Sender: TWebOutputApp;
const Value: string; Send: Boolean; Kind: TOtherTag);
- Uses: map frontpage bots to action components; map cold-fusion commands to webhub commands; either
is simpler now.