Imagecache v2 api changes - Fatal error: Call to undefined function _imagecache_get_presets()
Alan D. - June 8, 2008 - 02:53
| Project: | Teaser Thumbnail |
| Version: | 5.x-1.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Just helping someone on the forums and recommended this
Edit teaserthumbnail.module, about line 20
<?php
// We build a clean array of the presets namespaces to store the preset
// itself and not its key
$presets = _imagecache_get_presets();
?>to
<?php
// We build a clean array of the presets namespaces to store the preset
// itself and not its key
$func = (function_exists('imagecache_presets')) ? 'imagecache_presets' : '_imagecache_get_presets';
$presets = $func();
?>Fully untested, as I haven't a D5 local install with the required modules

#1
does this solution work for someone ?
with this fix i can go on teaser thumbnail settings page but all settings are empty...
#2
same problem here, every field is empty
#3
I never used Imagecache 2 but will have a look at the new api soon. I've got already to upload the latest version with view support and will make sure to make it follow by an Imagecache 2 compatible version.
#4
change (line 22):
$presets = _imagecache_get_presets();$presets_clean = array();
foreach($presets as $preset) {
$presets_clean[$preset] = $preset;
}
to:
$presets = imagecache_presets();$presets_clean = array();
foreach($presets as $preset) {
$presets_clean[$preset[presetname]] = $preset[presetname];
}
#5
This is fixed but not committed yet: I need first to finish the views support.
#6
The latest version is being committed: support for ImageCache 2, as well as Views and RSS.
#7
#8