/program/modules/aggregator/aggregator_view.php - interface to the view-part of the module
This file defines the interface with the aggregator-module for viewing content. The interface consists of this function:
This function is called from /index.php when the node to display is connected to this module.
display the aggregated information from the nodes linked to this aggregator
his routine grabs information from other, existing pages, and partially shows the this information followed by a 'read more...' link to the corresponding full page. Two types of pages are currently recognised:
Note about the styling of aggregated nodes
The aggregator can be completely styled using a mix of id's and classes. Here is a rough sketch, assuming an aggregator with a non-empty header, non-empty introduction, a single snapshots node and two htmlpage modules. This all takes place within the #content div. Note that the various id's are numbered sequential within the page. Currently the DIVs .aggregator_htmlpage_clear and .aggregator_snapshots_clear are empty and unused.
retrieve the configuration information for this aggregator
retrieve a list of modules suitable for aggregation keyed by module_id
this selectively retrieves the module records for the modules we support. The information is used to determine which nodes to process and we also need a module record for the inline slideshow.
construct an array with the node records to aggregate
this routine converts the comma delimited list of node numbers to an array of node records, ready for further processing.
retrieve an array with node records straight from the database
this routine constructs a list of 0, 1 or more node records based on the $node_id provided by the caller. The node records are retrieved from the database.
This routine takes care of the showstoppers like embargo and expiry and also access permissions to the area. We can not be sure if the user actually has access to a page until we are have checked to area in which the node $node_id resides. This is an extra test compared to above.
construct an array with node records using cached tree in current area
this routine constructs a list of 0, 1 or more node records based on the $node_id provided by the caller. The node records are retrieved from the cached tree in &$tree (from $theme->tree).
This routine takes care of the showstoppers like embargo and expiry but not the area because we already have access to this area otherwise we would not be here in the aggregator module in this area.
construct a title, summary and readmore prompt for an htmlpage page
this routine uses a heuristic approach to snip N paragraphs from the actual text in the html-page. Because we cannot be sure that stripos() is available we resort to first changing any '<P' to '<p ' and subsequently searching the string until the N+1'th '<p '. The offset we calculate this way should contain exactly N paragraphs. Obviously this assumes (dangerous...) that the htmlpage page_data actually contains paragraphs. However, if not enough '<p strings are found, the complete page is used. Heuristics...
construct a title, inline slideshow and readmore prompt for a snapshots page
this routine uses the SnapshotViewerInline class to generate a rotating inline slideshow. This leans very heavily on JavaScript. If JavaScript is not enabled, that class has a fall-back showing the first N images statically. Graceful degradation...
Documentation generated on Tue, 28 Jun 2016 19:08:05 +0200 by phpDocumentor 1.4.0