Display custom HTML
You can write a CGI display plugin to generate static HTML to include on a page. You can choose to display custom HTML on some or all pages.
The CGI display plugin is executed on pages that matches a transaction ID. The CGI display plugin receives information on the user that is triggering the plugin.
To set the plugin point, type the name of the plugin in the CGI DISPLAY PLUGIN field on the Modules > Options page.
To display HTML on specific pages, include the transaction ID of the pages, each separated by a space. If you do not specify a transaction ID, the plugin will be executed on all pages, however this is not recommended as this will result in performance issues.
For example: custom-html.py F_LOGIN F_OPTION
will execute the CGI display plugin for pages that contain transaction ID F_LOGIN or F_OPTION.
Ensure that tags are specified in the m4 files of the CGI program you wish to invoke. Tags are denoted by the format % < tag > %
.
For example, if you want to include HTML in the Front-end that matches transaction ID F_OPTION , modify the psf.m4
file and locate the transaction ID F_OPTION . Insert a new tag in this section, or using an existing tag.
If adding a new tag to the m4 file, you must re-compile the skin files .
There is no shipped plugin in use with this plugin point.
Requirements
The CGI plugin is a console executable, which accepts information on standard input and writes results to standard output. See Writing plugins for general requirements.
Execution points
When a Bravura Security Fabric CGI program matches a transaction ID, it invokes a plugin to add HTML content. Each time the page is accessed, the plugin executes. See CGI plugin sequence of events for the general sequence of events.
Input
Input passed into the plugin is as follows:
"" "" = { "sessionid" = "<sessionid>" # ID of the current session "transid" = "<transid>" # The transaction ID of the current page "cginame" = "<cginame>" #The CGI running the plugin "viewer" "user" = { "id" = "<id>" # ID of the user requesting the page "name" = "<name>" # Name of the user requesting the page } "request" "" = { "key" = "<value>" # List of all of the values posted in the form "key2" = "<value>" } }
For example:
"" "" = { "sessionid" = "S9982e39d-a79c-4af0-be79-9da546819501" "cginame" = "psf" "transid" = "F_OPTION" "viewer" "user" = { "id" = "superuser" "name" = "superuser" } "request" "" = { ... "CGI_DISPLAY_PLUGIN_VALUE" = "custom-html.py" "DEFAULT_API_SESS_EXPIRY_SECONDS_VALUE" = "" "DEFAULT_EXPIRY_SECONDS_VALUE" = "999999" "DEFAULT_SCHEDULE_TIME_VALUE" = "01:00" "DIGITAL_SIGN_PLUGIN_VALUE" = "" "DISPLAY_ALIAS_SIMPLIFIED_VALUE" = "" "DISPLAY_GROUPID_PLUGIN_VALUE" = "" "DISPLAY_TIMEZONE_VALUE" = "" "FILTER_REQUEST_PLUGIN_VALUE" = "" "FILTER_USER_PLUGIN_VALUE" = "" "JS" = "true" "KEEP_USER_PLUGIN_VALUE" = "" "LANG" = "en-US" "RECORDS_PER_PAGE_VALUE" = "20" "SEARCH_MAX_RESULTS_VALUE" = "500" "SEARCH_NO_INIT_RESULT_VALUE" = "" "SESSDATA" = "<encrypted session data>" ... } }
Output
The output returns static information that is presented to the user.
Output passed from the plugin is as follows:
"" "" = { "retval" = 0 "replacement" "" = { "tag" = "<tag1>" #transid of tag1 "value" = "<html>" #html of tag1 } "replacement" "" = { "tag" = "<tag2>" #transid of tag2 "value" = "<html>" #html of tag2 } ... }
The value for HTML key content must be written as one line.
For example:
"" "" = { "retval" = 0 "replacement" "" = { "tag" = "REPLACEME" "value" = "<strong>Message of the day</strong><br>Please review new HR policies" } ... }