From 97797082e61ad8195a2990653dc2332c72569b5e Mon Sep 17 00:00:00 2001 From: mrded Date: Thu, 1 Nov 2012 11:09:38 +0000 Subject: [PATCH] Possibility to do not choose image preset --- views_nivo_slider.module | 4 ++-- views_nivo_slider_style_plugin.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/views_nivo_slider.module b/views_nivo_slider.module index a824e45..8447684 100644 --- a/views_nivo_slider.module +++ b/views_nivo_slider.module @@ -191,10 +191,10 @@ function template_preprocess_views_nivo_slider_view_nivo_sliderfields(&$vars) { 'attributes' => $attributes, ); - $img = theme('image_style', $params); + $img = (!$presetname) ? theme('image', $params) : theme('image_style', $params); if ($link) { - $img = '' . $img . ''; + $img = l($img, $link, array('html' => TRUE, 'attributes' => array('class' => 'views-processed'))); } $vars['content'] = $img; diff --git a/views_nivo_slider_style_plugin.inc b/views_nivo_slider_style_plugin.inc index 7d7d8e6..b61cf40 100644 --- a/views_nivo_slider_style_plugin.inc +++ b/views_nivo_slider_style_plugin.inc @@ -38,7 +38,7 @@ class views_nivo_slider_style_plugin extends views_plugin_style { parent::options_form($form, $form_state); unset($form['grouping']); - $presets = array(); + $presets = array('' => t('None (original image)')); foreach (image_styles() as $p) { $presets[$p['name']] = $p['name']; } -- 1.7.10.2 (Apple Git-33)