Social Features

dmBridge supports social features such as comments, ratings, and tags.

How the social features work

By clicking "Submit," the visitor posts form data to the template engine, which processes it and attempts to save it onto the CONTENTdm® server via the HTTP API. The template engine then refreshes the view with a status ("flash") message depending on whether or not the posting was successful.

The HTML forms for entering the data are rendered onto the object view web template by methods in the ObjectDraw class (commentsSection(), ratingsSection(), or taggingSection()).

How social data is stored

CONTENTdm® does not have a facility for storing social data. dmBridge, therefore, stores it in its own data store. See Installing the Data Store for more information.

Comments

Users can post comments for any object, but comments that are posted to a compound object page will be ascribed to the compound object itself - not the compound object page - and will appear on all pages of the compound object. The reason for this is that some compound objects have many pages and ascribing a comment to just a single one might cause it to get "buried." This behavior is currently not configurable.

In order for comments to work, a data store must be available. Once this condition is met, a commenting section can be included within an object view template (object/single.html.php and object/compound.html.php) using the ObjectDraw::commentsSection() method. This method will handle all aspects of generating the comment form and list of comments. You are free to style them however you wish, however.

dmBridge will post status messages to the flash in response to certain types of user input to this form - for example, when validation has failed or when the comment has been successfully posted. Therefore, when including comments in the template, it is a good idea to also include a call to Draw::formattedFlash() in a conspicuous place in the template as well, in order to provide feedback to the user as to what has just happened in response to their input.

Ratings

The ratings feature allows users to rate objects on a configurable numeric scale.

The ratings feature can be included within an object view template (object/single.html.php and object/compound.html.php) using the ObjectDraw::ratingsSection() method. This method will handle all aspects of generating the rating form.

Ratings can be disabled on a per-template set basis by simply removing any calls to ObjectDraw::ratingsSection() from the templates. It is not currently possible to disable ratings on a per-collection basis.

Tagging

Social tagging allows users to ascribe words or brief phrases ("tags") to objects to facilitate finding and gathering based on a flat (non-hierarchical) taxonomy.

The social tagging section can be included within an object view template
(object/single.html.php and object/compound.html.php) using the ObjectDraw::taggingSection() method. This method will handle all aspects of generating the tag input form. dmBridge will post status messages to the flash in response to certain types of user input to this form - for example, when validation has failed or when the tag has been successfully posted. Therefore, when including social tagging in the template, it is a good idea to also include a call to Draw::formattedFlash() in a conspicuous place in the template as well, in order to provide feedback to the user as to what has just happened in response to their input.

Social tagging can be disabled on a per-template set basis by simply removing any calls to ObjectDraw::taggingSection() from the templates. It is not currently possible to disable tagging on a per-collection basis.