[!]********************************************************
** FILE: euca_ext_rev2.2.inc
** By: Euca Design Center
** Description: EDC's standard library of functions for Extending WebDNA
** How To Use: can be "[included]'ed" into the top
of any WebDNA template,
or can be added to your "FunctionDefs/"
directory to be used as a pre-parse script for
global access.
** REQUIREMENTS: WebDNA 6.x and above
** function naming convention prefix "euca_"
** Change History:
Jul 1 2010 Fixing to be more compatible with the new fastCGI version.
- euca_global_id now creates the global ID in the root of where
this file is (called by default)
Mar 24 2009 Initial revision: Donovan
****************************************************[/!][!]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: euca_list
** Description: List all function names availabe in this
Library.
** Input: none
** ouput: function names
[/!][function name=euca_list]
[return][grep search=%09&replace=][grep search=[%0D%0A]&replace=
]
euca_libversion - the version number of this library.
euca_list - List all function names available in this library
euca_getdomain - returns the domain name only of the template you are on
euca_dtstamp - Tom Duke's, date and time stamp in seconds since epoch.
euca_dateback - retreive the date back from euca_dtstamp [raw][euca_dateback dtstamp=%3Cdt in seconds%3E][/raw]
euca_timeback - retreive the time back from euca_dtstamp [raw][euca_timeback dtstamp=%3Cdt in seconds%3E][/raw]
euca_global_id - ever have problems with relational id's breaking when deleting records? never again! read the description in the .inc file for a detailed description.
euca_301redirect - immediately innitiat a 301 (permanent) redirect. Bugs: currently only works on certain platoforms and web servers.
euca_vardisplay - put this tag in your template at the bottom of the page (or where appropriate) to see all applicable vars and their values.
[/grep][/grep][/return]
[/function][!]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: euca_libversion
** Description: returns the version number of this library
** ouput: number
[/!][function name=euca_libversion]
[return]2.2[/return]
[/function][!]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: euca_getdomain
** Description: returns the domain name only ("www.yourdomain.com")
of the template you have accessed
** Input: none
** ouput: domain name
[/!][function name=euca_getdomain]
[return][ListMIMEHeaders name=host&exact=F][url][value][/url][/ListMIMEHeaders][/return]
[/function][!]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: euca_dtstamp
** Description: returns a date and time stamp in the form of seconds since (WebDNA) epoch
** Input: none
** ouput: date/time stamp
** credits: Tom Duke
[/!][function name=euca_dtstamp]
[return][math]((([math]{[date %m/%d/%Y]}[/math])-1)*86400)+([math]{[time]}[/math])[/math][/return]
[/function][!]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FUNCTION Name: euca_dateback
** Description: returns the euca_dtstamp back to a human readable date
** Input: date and time stamp in seconds since epoch
** params: dtstamp= (required)
** ouput: human readable date
** credits: Tom Duke
** example: [euca_dateback dtstamp=