Drupal Views Nivo Slider - Display original image rather than Imagecache style - Drupal 6

The Views Nivo Slider which allows you to create views which display using the Nivo Slider.

An issue I have had as well as other people (albeit in Drupal 7) have found that the module forces you to use an Imagecache preset. With a slideshow you are generally going to upload the right size image and don't want additional processing to be done on the image from PHP GD or ImageMagick.

The following changes are required to allow you to select the original image rather than an ImageCache preset. Please note that these apply to Drupal 6 only.

In the views_nivo_slider_style_plugin.inc file, change the following:

<?php
$presets 
= array();
foreach (
imagecache_presets() as $p) {
?>

To:

<?php
$presets 
= array();
$presets[''] = t('Original image');
foreach (
imagecache_presets() as $p) {
?>

Then in the views_nivo_slider.module file change the following in the template_preprocess_views_nivo_slider_view_nivo_sliderfields function:

<?php
$img 
theme('imagecache' $presetname $image_url$title$title$attributesTRUE);
?>

To:

<?php
if ($presetname == '') {
  
$img theme('image'$image_url$title$title$attributesTRUE);
}
else {
  
$img theme('imagecache' $presetname $image_url$title$title$attributesTRUE);
}
?>

If you don't select an ImageCache preset then the image will be themed using the core theme_image() function otherwise it is passed on to theme_imagecache().

You will then need to update any existing views if you want to use the original image rather than an ImageCache preset.