File/program/modules/snapshots/snapshots_view.php

Description

/program/modules/snapshots/snapshots_view.php - interface to the view-part of the snapshots module

This file defines the interface with the snapshots-module for viewing content. The interface consists of this function:

    snapshots_view(&$output,$area_id,$node_id,$module)

This function is called from /index.php when the node to display is connected to this module. Internally all the work is done in the Snapshot class. This class is also used in the module that aggregates different nodes into a single HTML-document.

Classes
Class Description
 class SnapshotViewer this class implements methods to display snapshots
 class SnapshotViewerInline this class implements methods to display snapshots
Functions
snapshots_view (line 62)

display the snapshots from the directory linked to node $node_id

this routine is only a helper to create a new SnapshotViewer instance which is where the real work is done.

in general there are three different variants (depends on configuration of 'variant'):

  • 1 (thumbs): show the title, the introduction and thumbnails of all snapshots
  • 2 (first): show the first snapshot from the series full-size
  • 3 (slideshow): automatically rotate through all snapshots (uses javascript)
The default is 1 (thumbs).

The 4th variant is used in asynchroneous updating of the list of images. Calls to this variant originate in slideshow.js.

  • return: TRUE on success + output via $theme, FALSE otherwise
bool snapshots_view (object &$theme, int $area_id, int $node_id, array $module)
  • object &$theme: collects the (html) output
  • int $area_id: identifies the area where $node_id lives
  • int $node_id: the node to which this module is connected
  • array $module: the module record straight from the database

Documentation generated on Tue, 28 Jun 2016 19:11:58 +0200 by phpDocumentor 1.4.0