/[drupal]/contributions/modules/slideshowpro/slideshowpro_plugin_style_xml.inc
ViewVC logotype

Contents of /contributions/modules/slideshowpro/slideshowpro_plugin_style_xml.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu Feb 26 19:40:00 2009 UTC (9 months ago) by alexb
Branch: MAIN
CVS Tags: HEAD
File MIME type: text/x-php
#300810 danielb: upgrade to Drupal 6.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Views file for Slideshow Pro integration XML style plugin.
7 *
8 * Contains class to be discovered by the views module.
9 */
10
11 /**
12 * Style plugin to render slideshowpro xml.
13 */
14 class slideshowpro_plugin_style_xml extends views_plugin_style {
15
16 function option_definition() {
17 $options = parent::option_definition();
18 $options['title_caption'] = array('default' => '', 'translatable' => TRUE);
19 return $options;
20 }
21
22 function options_form(&$form, &$form_state) {
23 $form['title_caption'] = array(
24 '#type' => 'checkbox',
25 '#default_value' => !empty($this->options['title_caption']),
26 '#title' => t('Use image title as SSP caption and hide SSP title'),
27 '#description' => t("Check this box if you would like to use the image title as caption. The image title will show up in SSP's caption area, the SSP title will be hidden."),
28 );
29 }
30
31 /**
32 * Return an array of additional XHTML elements to add to the channel.
33 *
34 * @return
35 * An array that can be passed to format_xml_elements().
36 */
37 function get_channel_elements() {
38 return array();
39 }
40
41 function render() {
42 if (empty($this->row_plugin)) {
43 vpr('views_plugin_style_default: Missing row plugin');
44 return;
45 }
46 $rows = '';
47
48 // This will be filled in by the row plugin and is used later on in the
49 // theming output.
50 $this->namespaces = array();
51
52 // Fetch any additional elements for the channel and merge in their
53 // namespaces.
54 $this->channel_elements = $this->get_channel_elements();
55 foreach ($this->channel_elements as $element) {
56 if (isset($element['namespace'])) {
57 $this->namespaces = array_merge($this->namespaces, $element['namespace']);
58 }
59 }
60
61 foreach ($this->view->result as $row) {
62 $rows .= $this->row_plugin->render($row);
63 }
64
65 return theme($this->theme_functions(), $this->view, $this->options, $rows);
66 }
67 }

  ViewVC Help
Powered by ViewVC 1.1.2