Merge tags - Tag summary for Merge.
Connect to alternative database. Defaults are taken from the configuration file. If two parameters are given in the first token, the database type takes precedence.
Perform a non query SQL statement.
Perform a query. First row of result is immediately available. Query can be iterated with <$RLOOP> tags.
Reperforms the query.
</$RLOOP>
<$REND>
Performs a loop over fetched query elements. Last row remains valid after iteration. Iteration number can be limited.
Derferences a column from the current fetch.
Substitues for the number of the row currently fetched.
Fetches another row. Increments the index.
Returns the SQL state of the last statement.
Returns a boolean value of whether the last query yielded an empty set.
Destroy an engine. This is used if the DB_DATABASE configuration variable has been changed using the <$RCFGSET> tag to recreate the engine with the new parameters.
</$RITERATION>
Performs a counted loop.
<$RELSE> (optional)
<$REND_IF>
</$RIF>
</$RELSIF.'perl code'>
Perform the code if the perl code evaluates to true.
</$RWHILE>
<$REND_WHILE>
Perform a while loop.
Break out of a loop.
Jump to the next iteration of the loop.
</$RCOUNT>
Perform a classic variable iteration loop. All parameters are mandatory.
Exit a template in the middle.
Iterate over all request parameters; each time having the first variable contain the parameter name and the second contain the value.
Iterate over all the columns of a query result. each time having the first variable contain the column name and the second contain the data.
<$RPIC.F(char).'string'>
Replace all white spaces by the given char. e.g., <$RPIC.F(+).'Banana, a yellow energy bomb'> will yield: Banana,+a+yellow+energy+bomb and so on.
<$RPIC.R(find=replace, ...).'string'>
Replace tuples of string-to-find/string-to-replace in the given string. e.g., <$RPIC.R('na'='ta').'Banana'> will yield Batata and so on.
<$RPIC.N(width.fraction positions).'number'>
Left space pad the number, with a fixed number of decimal places.
<$RPIC.N(0<width>).'number'>
Left zero pad the number, with a fixed number of decimal places.
(Hint, the instruction is equal to printfing with %stringf)
<$RPIC.NZ(<format>).'number'>
Substitute a blank for zero. (Mnemonic: zero suppress)
<$RPIC.NF(<format>).'number'>
After formatting the number, add commas.
Z and F may be combined.
<$RPIC.A(<width>).'alphanumeric string'>
Left space pad the number to achieve a width. (Right justify)
<$RPIC.A(-<width>).'alphanumeric string'>
Right space pad the number to achieve a width. (Left justify)
<$RPIC.AC(<format>).'alphanumeric string'>
Capitalize string.
<$RPIC.AS(<format>).'alphanumeric string'>
Convert string to lower case. (Mnemonic: Small)
<$RPIC.AS(<format>).'alphanumeric string'>
Convert string to 'proper' case, ie, first and only first letter of each word capitalized.
<$RPIC.AW(<format>).'alphanumeric string'>
Trim redundant spaces, ie, convert bulk spaces to one space.
<$RPIC.AR(<format>).'alphanumeric string'>
Trim right spaces.
<$RPIC.AL(<format>).'alphanumeric string'>
Trim left spaces.
L, R and W may be combined, and all combinations may be combined with either C, S or P.
Evaluates the code. If true, yields the first string, otherwise the second.
</$RMAIL>
Send email, utilizing SMTP connection to localhost.
</$RPERL>
Embed perl code. print()
may be used.
<$RPERL.B>
<$RPERL.C>
Documentation soon.
Add a server side comment.
Send a string to the log file.
Include a template in compile time.
Include an external web page in run time.
</$RSOURCE>
Generate an Anchor for a source view for a template. e.g, <$RSOURCE.'<$RTEMPLATE>'>Click here to view the source for this template</$RSOURCE>
Dereferences a local variable, or a CGi variable. (Precedence to the former).
Set a variable to the result of a perl code segment. CGI variables may be overwritten.
<$RINC.variable-number>
Modify a variable.
<$RPGET.variable>
Store and retrive session variables. Must be configured in the configuration file manually.
Copy a persistent variable to a local variable, for faster retrieving. Memory variables work much faster than session variables.
Copy a regular variable to a persistent variable of the same name.
Erases all session variables.
Retrieve a variable from Merge configuration.
Forge a temporary value instead of a configuration variable. Does NOT change the configuration file!
Retrieve a cookie.
<$RCOOKIESET.name='perl expression',minutes>
<$RCOOKIESET.name='perl expression',non numeric>
Set a cookie using a HTTP-EQUIV <META> HTML tag. The notations are used for setting a permanent cookie, a cookie with an expire date, and a temporary cookie that will disappear when the browser exits.
These tags are impleneted only if the merge database exists.
IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT These tags are to be used with the Merge security backend which is not written yet. IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT
Logs in. Tag outputs a boolean value to notify if login was successful or failed.
Check if the user has permission to a specific realm/key.
Change password for the logged in user.
Add a new user. Use with CAUTION! Any user running the page could create a user with this tag. If Merge is running on a user shell machine, configuration and templates should be readable to the web server but not world readable! Pages using <$RADDUSER> *must* be protected.
Remove a user.
<$RPART.'user','group'>
Add a user to a group and remove a user from a group, accordingly.
<$RGRANT.G.'group','realm'>
Grant a permission over a realm to a group or a user.
<$REVOKE.G.'group','realm'>
Revoke a permission over a realm from a group or a user.
Require users of a specific template to have access for at least one of the templates in the list. (Comma separated)
Yield the username of the currently logged in user.
Yield the real name of the currently logged in user.
Yield the tag string of the currently logged in user.
Attach a template to a subsite.
Detach a template from a subsite.
=head1
<$RDATE,'number of days ahead'>
Return the date as a YYMDHmS string. For example: 199912312359 is December 31, 1999, at one minute before midnight. The second parameter gives the date for a few days ahead, or beyond, if given negative.
<$RMONTH.'date'>
<$RYEAR.'date'>
Return the corresponding part of the date given.
<$RDATEDIFF.H.'earlier date','later date'>
<$RDATEDIFF.M.'earlier date','later date'>
<$RDATEDIFF.S.'earlier date','later date'>
Return the difference between dates, in days, hours, minutes and seconds, correspondingly.
Give the last day of month related to the specific date.
Add the gievn number of days, then the given number of months and years to the date. Returns a new date.
<$RUTC2DATE.'UNIX epoch time'>
Convert between a date string and a universal UNIX time.
</$RSUBMIT>
Create the HTML code for a POST form pointed at the same merge template it is called from. An optional paramater is passed to the onSubmit attribute; a typical value would be 'return function()' where function returns a boolean value.
Create a HIDDEN input tag, for the parameter with the corresponding name, based on the values the server side parameter with the same name has. Useful to transfer input fields among pages.
Iterate over multiple input form fields.
The name of the Merge CGI.
The name of the current template.
<$RGLOB.D.'iterator variable'='base directory'>
Iterate over a directory. Produces either files only or directories only, accordingly.
Iterate over a subtree of files.
Divert the output into a named buffer. Buffers are store in temporary files and do not overlap between processes. Subsequent diverting is appended to the existing buffer.
<$RDUMP.'buffer name'>
Dump the named buffer.