Notes
Quick Reference Open in a new tab
Publisher
The Publisher AddOn enables the publishing of packages from the developent area of a site into prodction.
All text files in the package (page and sub pages) are translated before publishing. References to Development are removed so a path /MyPage becomes /MyPage
Deletions are not processed immediately, but placed in a deletions script file to run later.
QuickReference
The Publisher AddOn enables the publishing of packages from the developent area of a site into prodction.
All text files in the package (page and sub pages) are translated before publishing. References to Development are removed so a path /MyPage becomes /MyPage
Deletions are not processed immediately, but placed in a deletions script file to run later.
Special files
- development-translation.sjs - This is an optional script that will translate the contents of files. The script is passed the contents of each text file as the variable data and is expected to return the transformed version.
- publish-config.json - Can contain a list of files to exclude eg. { excludedFiles: 'do-not-publish.me' }
- do-not-release.txt - Marks a page as not to be published. Should contain text stateing the reason
- process-deletions.sjs - A script that is generated with files to be deleted after publishing
- release-notes.html.fragment - Notes generated during the release are saved here
×
Quick Reference Open in a new tab
SQL
QuickReference
Server Side
Include DB.sjs on your sjs file
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 );
Create a Simple DB Insert
var sql = {
action: "insert",
table: "my_table",
data: {
column_a: "value a",
column_b: "value b"
}
};
DB.execute( SQL );
Create a Simple DB Insert that returns a column
var sql = {
action: "insert",
table: "my_table",
data: {
column_a: "value a",
column_b: "value b"
},
returnColumn: "column_c"
};
var returnedColumn = DB.execute( SQL );
Create a Simple DB Delete
var sql = {
action: "delete",
table: "my_table",
where: {
column_a: "value a",
column_b: "value b"
}
};
DB.execute( SQL );
Create a Simple DB Upsert
var sql = {
action: "upsert",
table: "my_table",
data: {
column_a: "value a",
column_b: "value b",
column_c: "value c",
column_d: "value d"
},
where: {
column_a: "value a",
column_b: "value b"
}
};
DB.execute( SQL );
Create a Simple DB Query
var sql = {
query: "select column_c, column_d from my_table where a = { {valueA} } and b = { {valueB} }
data: {
valueA: "value a",
valueB: "value b"
}
};
DB.execute( SQL );
×
Quick Reference Open in a new tab
Tagging
Update
/OpenForum/AddOn/Update Sevice API Version 0.1.9
Get Actions
Action getUpdate
Parameters
| Name | Description |
| pageName (required=true) | {{parameter.description}} |
| ignoreChanges (required=false) | {{parameter.description}} |
Example Get Request
/OpenForum/AddOn/Update?action=getUpdate
Example Response
Example Error Response
Post Actions
Action upsertToJSONList
Parameters
| Name | Description |
| row (required=true) | {{parameter.description}} |
| indexName (required=true) | {{parameter.description}} |
| pageName (required=true) | {{parameter.description}} |
| fileName (required=true) | {{parameter.description}} |
Example Post Request
/OpenForum/AddOn/Update?action=upsertToJSONList
Example Response
Example Error Response
×
Quick Reference Open in a new tab