Scald for contributors

This is a placeholder page for contributors/developers who want to extend Scald.

The rendering flow

See scald.api.php to understand the rendering flow and how each provider (type/transcoder/atom/context/player provider) interacts with the flow.

Render in a text field

Scald does not use filter because of its limited caching system. Instead it renders embedded atoms at the field level thanks to the MEE module (in the D6 version, MEE is also a CCK field module that provides a field type similar to text_with_summary in D7).

By default, embedded atoms are stored in SAS (Scald Atom Shorthand) format, which is better known as a "token." When the text field is being viewed inside an entity, it is sent to the Drupal filter system first. The filter system can retrieve the formatted text from the cache without an expensive filter process (like HTML corrector filters).Then hook_field_attach_view_alter() is used to convert SAS back to rendered markup (HTML or anything else). At this moment, access control is being used. If the current user has access to the "view" action, the atom is rendered or fetched from the Scald rendering cache.

The process is described as follow:

  1. Text field value is loaded from database.
  2. Converted text field value is filtered:
    1. Core filter caching system
  3. SAS is converted to rendered atom:
    1. Scald atom access control
    2. Scald internal caching system

Render in an atom reference field

Normal rendering flow.

Creating a Scald Provider

List of Providers hooks defined by Scald

How to change the render of an atom

When an atom is rendered, it is first transcoded (if possible and necessary), then rendered by a player. A player is configurable per

Guide maintainers

jcisio's picture