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");
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