Can't get the preprocess functions in the template.php to show the debug lines

Events happening in the community are now at Drupal community events on www.drupal.org.
pkcho's picture

I'm trying to implement the Dynamic Display Block with OP 1.6, but for some reason I can't get the debug lines to display no matter which drupal_set_message lines I uncomment. If I can't see the debug lines, I can't change the field names in the DDblock preprocess function to get it to work.

Can someone help me with what I'm doing wrong?

Thank you.

Comments

Found an alternative method

pkcho's picture

I needed to get the field names for the view that I had set up for the Dynamic Display Block. The method prescribed in the DDBlock tutorial says to uncomment the Drupal Set Message lines so the debug lines would display showing the field names. This did not happen for me for whatever reason in OP 1.6.

I learned that the Views preview shows the field names as well, when I plugged these in to the correct places in the DDBlock preprocess function, it worked.

Just in case, this information comes in handy for someone else.

Try using the

Adam S's picture

Try using the <pre>print_f($variable)</pre> php function. Here is some code which I pulled that should work. The OpenPublish community is going to have to choose which ddblock to use. It's not such a bad idea to use on of the ones that are commercial and only offer the CSS to override it unless someone wants to help me make a custom OpenPublish ddblock rotator?

You will need to install the imagefield crop widget. http://drupal.org/project/imagefield_crop The CCK import code below will not have the correct crop size for the views-slideshow.css I gave. That will need to be tweaked and the imagecache presets will need to be tweaked too. I think that I might have just saved a step and bypassed using imagecache in the views because I'm cropping each image anyway. You will have to check.

Add regions[homepage_rotator] = Home Page Rotatorto openpublish_theme.info file in the regions area.

I created two <div> tags in the homepage.tpl.php file. One to encapsulate the homepage-newsrotator and one to encapsulate the that and the two left columns.

       <div id="homepage-leftside">
          <div id="homepage-newsrotator">
                <?php if ($show_messages && $messages): print $messages; endif; ?>
               <?php print $homepage_rotator;?>
            </div>
           
            <div>
              <div id="homepage-left">
                <?php print $homepage_left; ?>
              </div>
              <div id="homepage-center">
                <?php print $homepage_center; ?>
              </div>
             </div> <!-- /two leftside columns -->
   
        </div> <!-- /leftside -->

Here is some CSS to put in the style.css file

#homepage-leftside {float: left; width:625px;}
#homepage-newsrotator {width: 625px;}

Here is the CSS to /custom/module/ddblock/upright50/ddblock-cycle-upright50.css
This is the free one which is different than the one I used on my site. However, I did first modify this one with the pager on the bottom and it should fit if my memory serves me correctly.

/*!
* Dynamic display block module template: upright50 - Cascading Style Sheet
* Copyright(c) 2008 - 2009 P. Blaauw All rights reserved.
* Version 1.1 (11-FEB-2009)
* Licenced under GPL license
* http://www.gnu.org/licenses/gpl.html
*/
div.ddblock-cycle-upright50 div.container{background-color:#fff;width:616px; height:357px; border: solid 2px #1F1F1F; border-bottom: none; margin-bottom:20px;}
div.ddblock-cycle-upright50 div.container-inner{height:320px;position:relative;}
div.ddblock-cycle-upright50 div.slider{float:left;width:616px;}
div.ddblock-cycle-upright50 div.slider div.slide-title-inner h2 {font-size: 2em; color: #FFFFFF}
div.ddblock-cycle-upright50 div.slider-inner{background:transparent url(../images/transparent_bg.png) repeat scroll 0 0!important;height:303px;overflow:hidden;position:relative;visibility:hidden;}
div.ddblock-cycle-upright50 div.slide{display:none;height:100%;left:0;position:absolute;top:0;}
div.ddblock-cycle-upright50 div.slide-inner img{height:303px;margin:0 !important;padding:0 !important;width:615px;}
div.ddblock-cycle-upright50 div.slide-text{background:transparent url(../images/transparent_bg.png) repeat scroll 0 0!important;position:absolute; text-align:justify}
div.ddblock-cycle-upright50 div.slide-text-horizontal{height:85px;left:0;width:625px;}
div.ddblock-cycle-upright50 div.slide-text-vertical{height:303px;width:200px;}
div.ddblock-cycle-upright50 div.slide-text-top{top:7px;}
div.ddblock-cycle-upright50 div.slide-text-right{bottom:0;right:30px;}
div.ddblock-cycle-upright50 div.slide-text-bottom{bottom:7px;}
div.ddblock-cycle-upright50 div.slide-text-left{bottom:0;left:30px;}
div.ddblock-cycle-upright50 div.slide-text-inner{padding:10px;}
div.ddblock-cycle-upright50 div.slide-title{float:left;}
div.ddblock-cycle-upright50 div.slide-title-vertical{width:170px;}
div.ddblock-cycle-upright50 div.slide-title-horizontal{float:left;width:158px;}
div.ddblock-cycle-upright50 div.slide-title h2{margin:-5px 0 10px 0;padding:0; font-size: 2.1em; color: #FFFFFF; text-align: left; font-weight: bolder;}
div.ddblock-cycle-upright50 div.slide-title-inner{color:white;font-weight:bold;}
div.ddblock-cycle-upright50 div.slide-body-vertical{width:175px;}
div.ddblock-cycle-upright50 div.slide-body-horizontal{float:left;width:290px;}
div.ddblock-cycle-upright50 div.slide-body-inner{color:white;}
div.ddblock-cycle-upright50 div.slide-body-inner p{margin:0 8px 0 0;padding:0;}
div.ddblock-cycle-upright50 div.slide-read-more{width:110px;}
div.ddblock-cycle-upright50 div.slide-read-more p{padding:0;margin:0;}
div.ddblock-cycle-upright50 div.slide-read-more a{background:url(../images/readmore.png) no-repeat;border:none;bottom:5px;color:#fff;font-size:14px;font-family:times New Roman;margin:0;padding:4px 0 4px 19px;position:absolute;text-decoration:none;text-align:left;width:100px;}
div.ddblock-cycle-upright50 div.slide-read-more-horizontal a{right:-17px;}
div.ddblock-cycle-upright50 div.slide-read-more-vertical a{right:5px;}
div.ddblock-cycle-upright50 div.slide-read-more a:hover{background:url(../images/readmore-hover.png) no-repeat;text-decoration:underline;}
div.ddblock-cycle-upright50 div.slide-read-more-horizontal a:hover{right:-17px;}
div.ddblock-cycle-upright50 div.slide-read-more-vertical a:hover{right:5px;}
div.ddblock-cycle-upright50 div.custom-pager{width:616px;}
div.ddblock-cycle-upright50 div.custom-pager-inner{height:51px;}
div.ddblock-cycle-upright50 div.custom-pager .custom-pager-item{float:left;}
div.ddblock-cycle-upright50 div.custom-pager .custom-pager-item-inner{width:204px;}
div.ddblock-cycle-upright50 div.custom-pager a{background-color:#363636;color:#ffffff;display:block;float:left;font-family:Tahoma,Arial,sans-serif;font-size:.9em;font-weight:bold;opacity:0.7;height:50px;line-height:50px;opacity:0.7;text-align:left;text-decoration:none;width:204px;}
div.ddblock-cycle-upright50 div.custom-pager a.activeSlide{background-color:#282828;color:#fff;opacity:1;}
div.ddblock-cycle-upright50 div.custom-pager a:hover{background:#363636;color: #ffffff;opacity:1;}
div.ddblock-cycle-upright50 div.custom-pager a:focus{outline:none;}
div.ddblock-cycle-upright50 div.custom-pager img{border:1px solid #999999;height:30px;margin:3px !important; padding:0 !important;vertical-align:middle;width:40px;}
div.ddblock-cycle-upright50 div.spacer-vertical{display:block;float:left;height:50px;width:2px;background-color:#1F1F1F;}
div.ddblock-cycle-upright50 div.spacer-horizontal{clear:both;height:2px;background-color:#1F1F1F;}

Here is the CCK I use:

$content['type']  = array (
  'name' => 'Frontpage rotator item',
  'type' => 'ddblock_news_item',
  'description' => 'News item used for a Dynamic display block slideshow.',
  'title_label' => 'Title',
  'body_label' => '',
  'min_word_count' => '0',
  'help' => '',
  'node_options' =>
  array (
    'status' => false,
    'promote' => false,
    'sticky' => false,
    'revision' => false,
  ),
  'language_content_type' => '0',
  'upload' => '1',
  'scheduler' => 1,
  'scheduler_touch' => 1,
  'old_type' => 'ddblock_news_item',
  'orig_type' => '',
  'module' => 'node',
  'custom' => '1',
  'modified' => '1',
  'locked' => '0',
  'xmlsitemap_node_type_priority' => '0.5',
  'nodewords_edit_metatags' => 1,
  'nodewords_basic_use_teaser' => 1,
  'content_profile_use' => 0,
  'comment' => '2',
  'comment_default_mode' => '4',
  'comment_default_order' => '1',
  'comment_default_per_page' => '50',
  'comment_controls' => '3',
  'comment_anonymous' => 0,
  'comment_subject_field' => '1',
  'comment_preview' => '1',
  'comment_form_location' => '0',
  'flatcomments_remove_reply_link' =>
  array (
    'reply' => false,
  ),
  'better_formats_allowed' =>
  array (
    1 => false,
    2 => false,
    3 => false,
    4 => false,
    5 => false,
  ),
  'better_formats_defaults' =>
  array (
    'node-3' =>
    array (
      'format' => '0',
      'weight' => '-25',
    ),
    'node-4' =>
    array (
      'format' => '0',
      'weight' => '-24',
    ),
    'node-5' =>
    array (
      'format' => '0',
      'weight' => '-23',
    ),
    'node-2' =>
    array (
      'format' => '0',
      'weight' => '-22',
    ),
    'node-1' =>
    array (
      'format' => '0',
      'weight' => '-21',
    ),
    'comment-3' =>
    array (
      'format' => '0',
      'weight' => '-25',
    ),
    'comment-4' =>
    array (
      'format' => '0',
      'weight' => '-24',
    ),
    'comment-5' =>
    array (
      'format' => '0',
      'weight' => '-23',
    ),
    'comment-2' =>
    array (
      'format' => '0',
      'weight' => '-22',
    ),
    'comment-1' =>
    array (
      'format' => '0',
      'weight' => '-21',
    ),
  ),
);
$content['fields']  = array (
  0 =>
  array (
    'label' => 'Pager item text',
    'field_name' => 'field_pager_item_text',
    'type' => 'text',
    'widget_type' => 'text_textfield',
    'change' => 'Change basic information',
    'weight' => '-4',
    'rows' => 5,
    'size' => '20',
    'description' => 'Used for the text of a pager_item.',
    'default_value' =>
    array (
      0 =>
      array (
        'value' => '',
        '_error_element' => 'default_value_widget][field_pager_item_text][0][value',
      ),
    ),
    'default_value_php' => '',
    'default_value_widget' => NULL,
    'group' => false,
    'required' => 1,
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '14',
    'allowed_values' => '',
    'allowed_values_php' => '',
    'op' => 'Save field settings',
    'module' => 'text',
    'widget_module' => 'text',
    'columns' =>
    array (
      'value' =>
      array (
        'type' => 'varchar',
        'length' => '14',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' =>
    array (
      'weight' => '-4',
      'parent' => '',
      'label' =>
      array (
        'format' => 'above',
      ),
      'teaser' =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' =>
      array (
        'format' => 'trimmed',
        'exclude' => 0,
      ),
      4 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
  1 =>
  array (
    'label' => 'Read more link',
    'field_name' => 'field_slide_link',
    'type' => 'text',
    'widget_type' => 'text_textfield',
    'change' => 'Change basic information',
    'weight' => '-3',
    'rows' => 5,
    'size' => '30',
    'description' => 'Copy and paste the link for the redirect of the Read More button',
    'default_value' =>
    array (
      0 =>
      array (
        'value' => '',
        '_error_element' => 'default_value_widget][field_slide_link][0][value',
      ),
    ),
    'default_value_php' => '',
    'default_value_widget' =>
    array (
      'field_slide_link' =>
      array (
        0 =>
        array (
          'value' => '',
          '_error_element' => 'default_value_widget][field_slide_link][0][value',
        ),
      ),
    ),
    'group' => false,
    'required' => 1,
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '',
    'allowed_values' => '',
    'allowed_values_php' => '',
    'op' => 'Save field settings',
    'module' => 'text',
    'widget_module' => 'text',
    'columns' =>
    array (
      'value' =>
      array (
        'type' => 'text',
        'size' => 'big',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' =>
    array (
      'label' =>
      array (
        'format' => 'above',
        'exclude' => 0,
      ),
      'teaser' =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      4 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      2 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      3 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'token' =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
  2 =>
  array (
    'label' => 'Slide text',
    'field_name' => 'field_slide_text',
    'type' => 'text',
    'widget_type' => 'text_textarea',
    'change' => 'Change basic information',
    'weight' => '-2',
    'rows' => '5',
    'size' => 60,
    'description' => 'Used for the text on a slide.',
    'default_value' =>
    array (
      0 =>
      array (
        'value' => '',
        'format' => '2',
        '_error_element' => 'default_value_widget][field_slide_text][0][value',
      ),
    ),
    'default_value_php' => '',
    'default_value_widget' =>
    array (
      'field_slide_text' =>
      array (
        0 =>
        array (
          'value' => '',
          'format' => '2',
          '_error_element' => 'default_value_widget][field_slide_text][0][value',
        ),
      ),
    ),
    'group' => false,
    'required' => 1,
    'multiple' => '0',
    'text_processing' => '0',
    'max_length' => '',
    'allowed_values' => '',
    'allowed_values_php' => '',
    'op' => 'Save field settings',
    'module' => 'text',
    'widget_module' => 'text',
    'columns' =>
    array (
      'value' =>
      array (
        'type' => 'text',
        'size' => 'big',
        'not null' => false,
        'sortable' => true,
        'views' => true,
      ),
    ),
    'display_settings' =>
    array (
      'weight' => '-3',
      'parent' => '',
      'label' =>
      array (
        'format' => 'above',
      ),
      'teaser' =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
      'full' =>
      array (
        'format' => 'hidden',
        'exclude' => 0,
      ),
      4 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
  3 =>
  array (
    'label' => 'Image',
    'field_name' => 'field_image',
    'type' => 'filefield',
    'widget_type' => 'imagefield_crop_widget',
    'change' => 'Change basic information',
    'weight' => '-1',
    'file_extensions' => 'jpg jpeg png gif',
    'progress_indicator' => 'bar',
    'file_path' => 'newsrotator/[site-date-mm]-[site-date-yyyy]',
    'max_filesize_per_file' => '',
    'max_filesize_per_node' => '',
    'max_resolution' => '1000x1000',
    'min_resolution' => '460x263',
    'custom_alt' => 0,
    'alt' => '',
    'custom_title' => 0,
    'title_type' => 'textfield',
    'title' => '',
    'use_default_image' => 0,
    'default_image_upload' => '',
    'default_image' => NULL,
    'collapsible' => '2',
    'resolution' => '460x263',
    'enforce_ratio' => 1,
    'croparea' => '200x200',
    'description' => 'Image to be used for the Slide image and Pager image.',
    'group' => false,
    'required' => 1,
    'multiple' => '0',
    'list_field' => '0',
    'list_default' => 1,
    'description_field' => '0',
    'op' => 'Save field settings',
    'module' => 'filefield',
    'widget_module' => 'imagefield_crop',
    'columns' =>
    array (
      'fid' =>
      array (
        'type' => 'int',
        'not null' => false,
        'views' => true,
      ),
      'list' =>
      array (
        'type' => 'int',
        'size' => 'tiny',
        'not null' => false,
        'views' => true,
      ),
      'data' =>
      array (
        'type' => 'text',
        'serialize' => true,
        'views' => true,
      ),
    ),
    'display_settings' =>
    array (
      'weight' => '-2',
      'parent' => '',
      'label' =>
      array (
        'format' => 'above',
      ),
      'teaser' =>
      array (
        'format' => 'image_plain',
        'exclude' => 0,
      ),
      'full' =>
      array (
        'format' => 'image_nodelink',
        'exclude' => 0,
      ),
      4 =>
      array (
        'format' => 'default',
        'exclude' => 0,
      ),
    ),
  ),
);
$content['extra']  = array (
  'title' => '-5',
  'revision_information' => '2',
  'comment_settings' => '3',
  'menu' => '0',
  'path' => '4',
  'attachments' => '5',
  'nodewords' => '1',
);

Here is the views

$view = new view;
$view->name = 'news_items';
$view->description = 'News items used for a Dynamic display block slideshow.';
$view->tag = 'slideshow';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => 'Title',
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_pager_item_text_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_pager_item_text_value',
    'table' => 'node_data_field_pager_item_text',
    'field' => 'field_pager_item_text_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_slide_link_value' => array(
    'label' => 'Read more link',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_slide_link_value',
    'table' => 'node_data_field_slide_link',
    'field' => 'field_slide_link_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_slide_text_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'plain',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_slide_text_value',
    'table' => 'node_data_field_slide_text',
    'field' => 'field_slide_text_value',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_image_fid' => array(
    'label' => '',
    'link_to_node' => 0,
    'label_type' => 'widget',
    'format' => 'image_nodelink',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_image_fid',
    'table' => 'node_data_field_image',
    'field' => 'field_image_fid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'body' => array(
    'label' => 'Body',
    'exclude' => 0,
    'id' => 'body',
    'table' => 'node_revisions',
    'field' => 'body',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'changed' => array(
    'order' => 'DESC',
    'granularity' => 'second',
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'status' => array(
    'operator' => '=',
    'value' => 1,
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'status',
    'table' => 'node',
    'field' => 'status',
    'relationship' => 'none',
  ),
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'ddblock_news_item' => 'ddblock_news_item',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'time',
  'results_lifespan' => '3600',
  'output_lifespan' => '3600',
));
$handler->override_option('title', 'News item slideshow');
$handler = $view->new_display('block', 'News item slideshow', 'block_1');
$handler->override_option('block_description', 'News item slideshow');
$handler->override_option('block_caching', '8');

Here are the templete_preprocess() for the template.php

/*!
* Dynamic display block preprocess functions
* Copyright (c) 2008 - 2009 P. Blaauw All rights reserved.
* Version 1.6 (01-OCT-2009)
* Licenced under GPL license
* http://www.gnu.org/licenses/gpl.html
*/

/
* Override or insert variables into the ddblock_cycle_block_content templates.
*   Used to convert variables from view_fields to slider_items template variables
*
* @param $vars
*   An array of variables to pass to the theme template.
*
*/
function openpublish_preprocess_ddblock_cycle_block_content(&$vars) {
  if ($vars['output_type'] == 'view_fields') {
    $content = array();
    // Add slider_items for the template
    // If you use the devel module uncomment the following line to see the theme variables
    // dsm($vars['settings']['view_name']); 
    // dsm($vars['content'][0]);
    // If you don't use the devel module uncomment the following line to see the theme variables
    // drupal_set_message('<pre>' . var_export($vars['settings']['view_name'], true) . '</pre>');
    // drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
    if ($vars['settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add slide_image variable
          if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
            // get image id
            $fid = $result->node_data_field_pager_item_text_field_image_fid;
            // get path to image
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') && is_array(imagecache_presets()) && $vars['imgcache_slide'] <> '<none>'){
              $slider_items[$key1]['slide_image'] =
              theme('imagecache',
                    $vars['imgcache_slide'],
                    $filepath,
                    check_plain($result->node_title));
            }
            else {         
              $slider_items[$key1]['slide_image'] =
                '<img src="' . base_path() . $filepath .
                '" alt="' . check_plain($result->node_title) .
                '"/>';    
            }         
          }
          // add slide_text variable
          if (isset($result->node_data_field_pager_item_text_field_slide_text_value)) {
            $slider_items[$key1]['slide_text'] =  check_markup($result->node_data_field_pager_item_text_field_slide_text_value);
          }
          // add slide_title variable
          if (isset($result->node_title)) {
            $slider_items[$key1]['slide_title'] =  check_plain($result->node_title);
          }
          // add slide_read_more variable and slide_node variable
            if (isset($result->node_data_field_pager_item_text_field_slide_link_value)) {
             $slider_items[$key1]['slide_read_more'] =  l('Read more...', $result->node_data_field_pager_item_text_field_slide_link_value);
              $slider_items[$key1]['slide_node'] = $base_path . 'node/' . $result->nid;
         }
        }
      }
    }   
    $vars['slider_items'] = $slider_items;
  }

/

* Override or insert variables into the ddblock_cycle_pager_content templates.
*   Used to convert variables from view_fields  to pager_items template variables
*  Only used for custom pager items
*
* @param $vars
*   An array of variables to pass to the theme template.
*
*/
function openpublish_preprocess_ddblock_cycle_pager_content(&$vars) {
  if (($vars['output_type'] == 'view_fields') && ($vars['pager_settings']['pager'] == 'custom-pager')){
    $content = array();
    // Add pager_items for the template
    // If you use the devel module uncomment the following lines to see the theme variables
    // dsm($vars['pager_settings']['view_name']);    
    // dsm($vars['content'][0]);    
    // If you don't use the devel module uncomment the following lines to see the theme variables
    // drupal_set_message('<pre>' . var_export($vars['pager_settings'], true) . '</pre>');
    // drupal_set_message('<pre>' . var_export($vars['content'][0], true) . '</pre>');
    if ($vars['pager_settings']['view_name'] == 'news_items') {
      if (!empty($vars['content'])) {
        foreach ($vars['content'] as $key1 => $result) {
          // add pager_item_image variable
          if (isset($result->node_data_field_pager_item_text_field_image_fid)) {
            $fid = $result->node_data_field_pager_item_text_field_image_fid;
            $filepath = db_result(db_query("SELECT filepath FROM {files} WHERE fid = %d", $fid));
            //  use imagecache (imagecache, preset_name, file_path, alt, title, array of attributes)
            if (module_exists('imagecache') &&
                is_array(imagecache_presets()) &&
                $vars['imgcache_pager_item'] <> '<none>'){
              $pager_items[$key1]['image'] =
                theme('imagecache',
                      $vars['pager_settings']['imgcache_pager_item'],             
                      $filepath,
                      check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value));
            }
            else {         
              $pager_items[$key1]['image'] =
                '<img src="' . base_path() . $filepath .
                '" alt="' . check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value) .
                '"/>';    
            }         
          }
          // add pager_item _text variable
          if (isset($result->node_data_field_pager_item_text_field_pager_item_text_value)) {
            $pager_items[$key1]['text'] =  check_plain($result->node_data_field_pager_item_text_field_pager_item_text_value);
          }
        }
      }
    }
    $vars['pager_items'] = $pager_items;
  }   
}

Marine job board with Drupal 7 at http://windwardjobs.com

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: