Friday, July 4, 2008
Several new API methods and properties have been released, and email notifications can now be customized at the site level using a scripted page (for programmers only). If you don't have programming skills (or time on your hands) and would like your email notifications customized, please contact sales with the details of what you'd like changed for pricing.
Attachment Class Changes
A new versionedName property provides access to the version-specific file name of the attachment. For example, a file named image.jpg might have two different versions: image.1.jpg and image.2.jpg. The generic image.jpg name returned by the "name" property always returns the most recent version. View the Attachment class documentation.
Page Class Changes
All the "can" properties, such as page.canEdit, page.canComment, page.canAttach and page.canView have been implemented as methods that accept an option user argument. This allows a script to test access for users other than the current user. For testing with the current user, the no-argument properties should be used instead as they are more efficient. Here's an example of testing whether each user can view a page:
var somePage = site.getPage('SomePage');
var users = site.users;
for (var i in users) {
if (somePage.getCanView(users[i]) {
// do something if user has access
}
}
View the Page class documentation.
Util Class Changes
A new httpPost method was added that provides scripts with the ability to make POST requests in addition to GET requests. Rather than using a query string appended to the URI argument, the httpPost methods accept a two-dimensional array of name/value pairs.
Remote SSL connections are now supported with httpsGet and httpsPost methods. These work exactly like their non-SSL counterparts, but the port defaults to 443 and the connection is secure.
View the Util class documentation.
Server Class Changes
The server implicit object now includes a "method" property that returns the HTTP method used to make the current request. Typically, this will return either "GET" or "POST".
View the Server class documentation.
Customized Email Notifications
We have implemented the standard email notification code as a scripted page that can be installed into your site to over-ride our normal notification process. The process that runs on our servers to send out email notifications can be configured to delegate to a scripted page on your site to send the standard 2 hour, 24 hour and 168 hour (weekly) notifications. We're happy to provide you with the starting point that performs the standard notifications for your modification. Please note that support for your modifications is billable as custom development. To get the script installed in your site, open a support ticket at the help desk.