GD_Library

[[GD_Library]](beta) GDLIB is a library for graphical dynamic web development with functions to create PNG or JPEG images on the fly. It allows your code to draw images with lines, arcs, text and multiple colors. You may program scripts to do lots of image manupulation operations such as cut and paste from other images, flood… Read More »

PDF_Library

[[PDF_Library]](beta) [[PDF_library function:var1|var2]] Macro Parameters: library function: Name of PDF Library function to be used. var1: variable name to be used to contain resulting status if any. var2: variable or string containing ‘php style’ pdf function parameters. These parameters are defined separately for each pdf function and may be seen by referencing links in the… Read More »

HEADER_TYPE

[[HEADER_TYPE:content_type]] Specifies the type of content to be output by your script. Note that all header modifying commands must be placed or poked in to the active index template as specified at the top of body.tpl. Parameter: content_type(string) Examples: [[HEADER_TYPE:text/html]] [[HEADER_TYPE:$type]] Your custom nodes are capable of streaming any of the following data content types:… Read More »

IF_FILE_FRESH

[[IF_FILE_FRESH:filename,interval]] Check for freshness of last modified content from a file whose name is stored in the variable location labeled as filename. Parameters: filename (string) may either be php variable or string value in quotes. interval (string or numerical expression) is the time period in seconds before an unmodified file becomes stale. Executes the following… Read More »

IF_FILE_STALE

[[IF_FILE_STALE:filename,interval]] Check for freshness of last modified content from a file whose name is stored in the variable location labeled as filename. Parameters: filename (string) may either be php variable or string value in quotes. interval (string or numerical expression) is the time period in seconds before an unmodified file becomes stale. Executes the following… Read More »

Lesson 10: Read The Data File

This example uses the [[READ_FILE]] shortcode to load the data into a variable for printing to the screen. Create a node and paste one of the following code samples into it’s landing page editor.  Goto the node’s address and test with browser. [[READ_FILE:comments.txt|content]] [[PRINT:content]] or [[INITIALIZE:filename|”comments.txt”]] [[READ_FILE:$filename|content]] [[PRINT:content]]

Lesson 07: Handling Form Data

If a script being executed has form data posted in it’s request headers, this data may be automatically assigned to variables using the [[POST]] shortcode. [[POST:First_Name]] [[POST:Last_Name]] Hello [[PRINT:First_Name]], [[PRINT:Last_Name]] To combine the form and the handler into the same script we may use the [[IF_SUBMITTED]]  with the [[ELSE]]  and [[END_IF]] shortcodes to add flow… Read More »

Lesson 03: Variable Computations

Variable computation example. Outputs: 3 Create a node and paste this following code into it’s landing page editor. Goto the node’s address and test with browser. [[INITIALIZE:var1|1+2]] [[PRINT:var1]] Note: To bring variables within the calculations, add a dollar sign before each. You may also use parenthesis for algebraic expression grouping. [[INITIALIZE:var1|2]] [[INITIALIZE:var2|4]] [[INITIALIZE:var3|$var1+$var2]] [[INITIALIZE:var4|$var3/2]] The… Read More »

FILE_EDITOR_HTML

[[FILE_EDITOR_HTML:label|filename]] Parameters: label (string with no spaces) filename (string containing relative path to file)   The example below embeds a rich text item html snippet file editor on the node landing page which can allow the user to edit the file ../datafile.txt which is located in the node’s parent folder. Paths are relative to the… Read More »

EDITOR_RICH_TEXT

[[EDITOR_RICH_TEXT:name|contentvar|height|bgcolor|skincolor|version]] Creates editable rich text area.  Use in place of editbox for html editing.   Parameters: name (string) content (string) text content to be edited. height (integer) bgcolor  six digit hex rgb value following hash tag. ex: #ffffff means white. skincolor (string) six digit hex rgb value following hash tag. ex: #666666 means dark grey…. Read More »

GET_LAST_IMAGE

[[GET_LAST_IMAGE]] Gets filename of last modified image file and places the value into a variable called “LAST_IMAGE’ for later use. This is useful because the last modified file is not always an image. Example 1: [[GET_LAST_IMAGE]] Last Modified: [[PRINT:LAST_IMAGE]][[cr]] [[hr]] Example 2: [[GET_LAST_IMAGE]] <img src=”[[=LAST_IMAGE]]” /> This shortcode is useful for building a node to… Read More »

AUTO_REFRESH

[[AUTO_REFRESH:seconds]] seconds:   Integer value of time interval  between refreshes in seconds. example: [[AUTO_REFRESH:60]] The above shortcode example will cause the browser to automatically refresh the web page to the most current data every minute. Useful for creating dashboard report nodes requiring auto refreshing iframe to closely monitor latest data collection. This method can also be… Read More »