Building the Fires List Data View

A fires list data view working example is running at the following address: Open or create a new node and paste the code below into the landing page editor by clicking the pencils where you want the view to display. Paste and save. [[QUERY_STRING:search]]     [[LOAD_DATAFEED:FireList.csv|,]] [[COLUMN_DMS2GPS:Latitude]] [[COLUMN_DMS2GPS:Longitude]] [[COLUMN_DATE2UNIX:Date]] [[VIEW_DATAFEED]] [[INITIALIZE:perpage|100]] [[INITIALIZE:sort_order|”{DESCENDING}”]] [[QUERY_STRING:sort_order]] [[INITIALIZE:sort_column|Total]]… Read More »


[[COLUMN_DATE2UNIX:columnname]] Converts all the values in the $columnname view column array from string to unix timestamp (the number of seconds since January 1 1970 00:00:00 UTC) so that it may be properly sorted and reformatted in the report.  Input is required to be in an english date format. [[COLUMN_DATE2UNIX:ReportDate]]  


[[STYLE]] Creates html <style> container for your CSS styling commands. [[END_STYLE]] same as html </style>. Example: [[STYLE]] .TerraDctl_view_table{border:5px #444 solid;padding:0px;margin:0px;} .TerraDctl_view_skin{border:2px #000 solid;padding:5px;margin:5px;background-color:#28517f;} .pagination_links{border:1px #444 solid;margin:2px;padding-top:0px;padding:3px;text-decoration:none;background-color:#ccf;font-family:verdana;font-size:1.4em;} .pagination_page_number{border:1px #000 solid;margin-right:6px;margin-left:2px;padding-top:0px;padding:3px;color:#ccf;background-color:#444;font-family:verdana;font-size:1.4em;} .odd{background-color:ccf;} .even{background-color:#c9ce6b;} [[END_STYLE]]  


[[TABLE:id|class|style]] [[TABLE:table1|view_table|background-color:#fff;]] This shortcode is the equivalent to the html table tag but is much easier to read and involves slightly less typing.: <table id=”table1″ class=”view_table” style=”background-color:#fff”> Use [[END_TABLE]]  or </table> to close table container.


[[VIEW_PAGINATE:page|perpage]] Paginates view before displaying. page (string, integer or php$ variable) Page of view being displayed. perpage (string, integer or php$ variable) Number of entries or records to be displayed on each page. Example: For displaying page 3 with 10 entries per page. (records 31-40) [[VIEW_PAGINATE:3|10]]


[[VIEW_SEARCH:regexvar]] regexvar(variable name) Name of the variable containing a regular expression string which must be true before row is selected into view.   Example regular expressions: Washington|Oregon Washington{OR}Oregon Washington{AND}Oregon (Washington)(Oregon) ((Washington|Oregon)(red|blue)) The first and second expressions select every row with any variable content matching Washington or Oregon. The third and fourth expressions select every row with… Read More »


[[VIEW_SELECT:criteria]] criteria(boolean) a logical expression which must be true before row is selected into view.   Example boolean expressions: ($_name==’Washington’)OR($_name==’Oregon’) ($_id > 1)AND($_id < 3) Filters current view by boolean selection criteria.  Add a dollar sign and underscore $_ before the variable/field names when writing boolean expressions using field variables.. [[LOAD_DATAFEED:csv_datafeed.txt|,]] [[VIEW_DATAFEED]] [[cr]][[cr]]Output Before Selection:[[cr]][[cr]] [[VIEW_DISPLAY]]… Read More »


[[VIEW_DISPLAY]] Outputs the current view using the view template stored in view.tpl at each node level for formatting the rows. Example: the data file csv_datafeed.txt contains: name,id,color,size Washington,1,blue,big Oregon,2,”green”,small California,3,red,huge The file, view.tpl contains: Name: %name%<br />Id: %id%<br />Color: %color%<br />Size: %size%<br /><br /> The Code: [[LOAD_DATAFEED:csv_datafeed.txt|,]] [[VIEW_DATAFEED]] [[cr]][[cr]]Before Sorting by color:[[cr]][[cr]] [[VIEW_DISPLAY]] [[VIEW_SORT:color]] [[cr]][[cr]]After… Read More »


[[VIEW_DATAFEED]] Populates the current datafeed variables and their values to an associative view matrix ($TerraDctl_view) where it’s rows may be more easily sorted, paginated and displayed. The view matrix is created with element labels corresponding to the datafeed’s column names within each row. Use after LOAD_DATAFEED . Test the $TerraDctl_view matrix with a php variable… Read More »


[[VIEW_SORT:columnname]] Sorts the current view ascending by selected column name. The view ($TerraDctl_view)  variable contains an associative array of fields for each row which is populated upon each datafeed view refresh.  To refresh the view array, save the datafeed first or use the VIEW_DATAFEED shortcode before, otherwise view may not display. columnname (string value or… Read More »


[[SAVE_DATAFEED:filename]] Saves the last loaded datafeed’s current state as a delimited datafeed file  named filename using the same delimiter. Delimiter may be modified by initializing the variable delimiter. Datafeed fields and values must first be either already loaded from source or otherwise initialized into variable memory. [[INITIALIZE:delimiter|\t]] {tab delimited} [[SAVE_DATAFEED:datafeed_saved.txt]] Saves the current state of… Read More »


CSV Deserializer and Datafeed Loader. [[LOAD_DATAFEED:filename|delimiter]] A datafeed is any csv or tab delimited text file with 3 or more fields per line. Other delimiters may also be used. filename (string) may either be php$ variable or string value. delimiter(string) is the separator between the fields in each row. Example: the data file csv_datafeed.txt contains:… Read More »


[[SAVE_DATASET:setname|delimiter]] Data set must already be created or loaded into variable storage memory. See: [[LOAD_DATASET]] setname (string) may either be php$ variable or string value. delimiter(string) is the separator between the pair’s key name and it’s assigned value.   Use the below code to automatically save  to the specified dataset any associated variables’ current or… Read More »


[[LOAD_DATASET:setname|delimiter]] A dataset is any text file with only one key/value pair per line. setname (string) may either be php$ variable or string value. delimiter(string) is the separator between the pair’s key name and it’s assigned value. Example: the data file inventory.txt contains: color,blue size,large name,huckleberry instock,22 units,lbs Use the below code to automatically load… Read More »

View API

VIEW API currently under development. You may use JSADSERVER API for embedding views in web pages using javascript. {nodepath}/api/view/&?selection={regex}&format={default or javascript} All General Purposes™ Nodes™ have an internet address.  For example, the address for this sample node is: Your addresses should be different. It does not matter.  All node urls have the view api… Read More »


[[JS:source]] Includes JavaScript content and functions to node from any available external source which may be either local file or remote absolute URL. This feature alone will save you a lot of typing if you are accustomed to coding with html script tags for all your external inclusions. Examples: [[JS:menu.js]] [[JS:]] [[INITIALIZE:domain|]] [[INITIALIZE:path|promotions/campaign3/ad4]] [[INITIALIZE:script|api/jsadserver]] [[INITIALIZE:source|http://$domain/$path/$script/]]… Read More »


[[WAIT:seconds]] seconds Specifies time interval for the server to wait before continuing the script execution from this point. Useful for throttling script execution of resource intensive scripts and to prevent timeouts when anticipating slow turn over due to limits on resource.   Example: Please wait a minute. [[WAIT:60]] Thank you for waiting a minute.


[[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]](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: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 »