Server-Side Usage:
// Get the Alert API
var Alert = js.getObject("/OpenForum/AddOn/Alert","Alert.sjs");
// Add an alert
Alert.addAlert("ServerHealth", "heartMonitor", 60000, 300000);
// Trigger an alert
Alert.trigger("ServerHealth");
// Send heartbeat
Alert.beat("ServerHealth");
// Get alerts by tag
var alerts = Alert.getAlerts("production");
Anonymous Session provides the ability to offer tokens to store assets against like Zoom call ids.
You can also combine them with passwords as an extra security step.
Quick Reference
Anonymous Session provides the ability to offer tokens to store assets against like Zoom call ids.
You can also combine them with passwords as an extra security step.
The content editor is a two panel editor. It is intended for pages that just contain text and images rather than those that are part of a web application.
Content Editor - Quick Reference
The content editor is a two panel editor. It is intended for pages that just contain text and images rather than those that are part of a web application.
Editor Panels
The two panels can be resized by dragging the separator between them.
The left hand panel gives an over view of the page being edited at the top, a list of pages to edit in the middle and a view of the image library at the bottom.
The right hand panel gives a view of the page content for editing. At the top is the title as shown on the browser tab and below are the sections of the page.
Adding Blocks
Above and below each page section are + buttons that will add content either above or below existing elements of content. There are also up and down buttons to move the content up and down the sections in the page.
On clicking + you are presented with a list of blocks that can be added to the page.
For simple formatted text and images, the WYSIWYG block allows you to enter text and type set it adding text styles, links and lists etc.
Images
To add an image into the WYSIWYG panel, find the image in the image library in the left hand pane or select to upload one. Drag the image into the WYSIWYG content block. Click on it to set any alternative text or its placement in the text.
A number of other block types are available that add either configurable page elements or page layouts.
Preview and Publish
To see how your page will look once published, click on Preview at the top of the left hand pane. This will save the page to a space for unpublished pages and make the page visible in another browser tab. Saving the page once the preview has been opened will automatically update the preview tab.
Once you are happy with your page, click Publish and the page will be published to the live area of your website.
New Pages
To create a new page select Create A New Page. In the popup window, enter the new pages title and optionally select a category. Select Create New Page and a new page will be added to the list and the editor for the page opened.
The data transformer is intended take text from the input and transform it, then place it in the output. No data is shared or sent to our server unless you choose to save it. To do this you will need to have an Electric Llama Company account
To perform a data transformation, you have to do all the hard work, by writing Javascript in the code editor at the bottom of the screen.
The text in the input editor is made available as the variable input and the text in the output can be set by setting the output variable.
A number of useful transformer examples are given below to get you started.
If you have an Electric Llama Company account, you can save any transformers you have written for later use, alternatively each text editor has a download to desktop option.
You can drag and drop files into any of the editors on the transformer page.
Data Transformer - Quick Reference
The data transformer is intended take text from the input and transform it, then place it in the output. No data is shared or sent to our server unless you choose to save it. To do this you will need to have an Electric Llama Company account
To perform a data transformation, you have to do all the hard work, by writing Javascript in the code editor at the bottom of the screen.
The text in the input editor is made available as the variable input and the text in the output can be set by setting the output variable.
A number of useful transformer examples are given below to get you started.
If you have an Electric Llama Company account, you can save any transformers you have written for later use, alternatively each text editor has a download to desktop option.
You can drag and drop files into any of the editors on the transformer page.
Examples
The Data Transformer has a few helper functions to make common actions easier.
These functions are provided by an instance of the DataTransformer or DT for short.
Often input data is based on a record per line.
DT.toLines( data, rowSeparator ) converts the data to an array of lines of text.
Returns a string array
If you don't supply data, it defaults to input
If you don't supply rowSeparator, it defaults to new line
DT.linesToString( lines, separator ) converts an array of lines to a string
lines should be an array of strings
If you don't supply separator, it defaults to new line
DT.forEachLine( fn, data) apply a function to each line of text in the data.
Returns an array of strings
If you don't supply data, it defaults to the input
DT.toTable(data, rowSeparator, cellSeparator);
Returns an array of arrays
If you don't supply rowSeparator, it defaults to new line
If you don't supply cellSeparator, it defaults to tab
Publisher promotes any /... page hierarchy to production by copying it without the /Development prefix so work-in-progress stays isolated.
Every text-based attachment is rewritten so `"/"` links become live paths, and optional rules in `development-translation.sjs` can further transform each file.
Practice publishes generate release notes plus a deletions script preview without touching the live site; the real publish copies files and appends removal commands into `process-deletions.sjs` for manual execution.
QuickReference
(
Publisher promotes any /... page hierarchy to production by copying it without the /Development prefix so work-in-progress stays isolated.
Every text-based attachment is rewritten so `"/"` links become live paths, and optional rules in `development-translation.sjs` can further transform each file.
Practice publishes generate release notes plus a deletions script preview without touching the live site; the real publish copies files and appends removal commands into `process-deletions.sjs` for manual execution.
Actions
Check for Page Differences – Compares timestamps and hashes between the /Development tree and its published counterpart so you can see what will change.
Reverse Publish – Copies the published page back into /Development to recover live edits or restart from a known-good state.
Publish Page (practice) – Runs the full translation/diff pipeline, writes detailed release notes, but skips copying so you can verify the impact.
Publish Page (for real) – Performs the same checks and then copies the files, applies path rewrites, generates release notes, and refreshes the published page.
Special files
development-translation.sjs – Optional script invoked per text file; receives the file contents as `data` and must return the transformed string.
publish-config.json – JSON blob for exclusions, e.g. `{"excludedFiles":"do-not-publish.me"}`; also expands the standard exclusion list.
do-not-release.txt – Presence blocks publishing and should describe why the page is locked.
process-deletions.sjs – Auto-generated script listing live files to delete after you verify them; run manually once you are satisfied.
release-notes.html.fragment – Captures the accordion-style log of each publish run for auditing.
Usage tips
Publish from the root /... page you want to release; sub pages are handled automatically.
Always inspect the practice-mode release notes before running the real publish so you catch unexpected deletions or TODO markers.
Keep the generated deletions script in source control (or review it) before executing so you have an audit trail of removed files.
var DB = js.getObject("/OpenForum/AddOn/SQL","DB.sjs");
DB.setAlias("your database name");
// Create a new DB object for each database you need access to
Create a Simple DB Select
var sql = {
action: "select",
table: "my_table",
columns:
"column_a", "column_b"
};
var rows = DB.execute( SQL );
Create a DB Select that returns all columns
var sql = {
action: "select",
table: "my_table"
};
var rows = DB.execute( SQL );
Tag and categorize OpenForum pages for better organization and discovery
Key Features
Add tags to pages
List all tags
Find pages by tag
Tag cloud generation
Remove tags from pages
Tag management interface
Search by multiple tags
Tagging Quick Reference
Tag and categorize OpenForum pages for better organization and discovery
Key Features
Add tags to pages
List all tags
Find pages by tag
Tag cloud generation
Remove tags from pages
Tag management interface
Search by multiple tags
Server-Side Usage:
// Get the Tagging API
var Tagging = js.getObject("/OpenForum/AddOn/Tagging","Tagging.sjs");
// Add tag to page
Tagging.addTag("/MyPage", "tutorial");
// Add multiple tags
Tagging.addTags("/MyPage", "tutorial", "beginner", "javascript");
// Remove tag from page
Tagging.removeTag("/MyPage", "tutorial");
// Get all tags for a page
var tags = Tagging.getTags("/MyPage");
// Find pages with tag
var pages = Tagging.findPagesWithTag("tutorial");
// Get all tags in system
var allTags = Tagging.getAllTags();
// Get tag cloud (tags with counts)
var tagCloud = Tagging.getTagCloud();
Client-Side Usage:
// Add tag to page
JSON.post('/OpenForum/AddOn/Tagging/Add', null,
'pageName=/MyPage&tag=tutorial')
.onSuccess(function(result) {
console.log('Tag added');
}).go();
// Get tags for page
JSON.get('/OpenForum/AddOn/Tagging/Get', null,
'pageName=/MyPage')
.onSuccess(function(tags) {
console.log('Tags:', tags);
}).go();
// Find pages by tag
JSON.get('/OpenForum/AddOn/Tagging/Find', null,
'tag=tutorial')
.onSuccess(function(pages) {
console.log('Pages with tag:', pages);
}).go();
// Get tag cloud
JSON.get('/OpenForum/AddOn/Tagging/Cloud')
.onSuccess(function(tagCloud) {
console.log('Tag cloud:', tagCloud);
}).go();
Tag Cloud Format
{tag: "tutorial", count: 15},
{tag: "javascript", count: 12},
{tag: "beginner", count: 8}
Configuration