summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximageinfo_cache.module17
1 files changed, 15 insertions, 2 deletions
diff --git a/imageinfo_cache.module b/imageinfo_cache.module
index c6e6d4c..20d49fd 100755
--- a/imageinfo_cache.module
+++ b/imageinfo_cache.module
@@ -316,10 +316,13 @@ function imageinfo_cache_theme_registry_alter(&$theme_registry) {
* @param $getsize
* If set to TRUE, the image's dimension are fetched and added as width/height
* attributes.
+ * @param $absolute
+ * A Boolean indicating that the URL should be absolute. Defaults to TRUE.
+ *
* @return
* HTML img element string.
*/
-function imageinfo_cache_theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) {
+function imageinfo_cache_theme_imagecache($presetname, $path, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE, $absolute = TRUE) {
// Only run if we are going to get the width and height from the file.
if ($getsize) {
$imagecache_path = imagecache_create_path($presetname, $path);
@@ -365,7 +368,7 @@ function imageinfo_cache_theme_imagecache($presetname, $path, $alt = '', $title
// Run original theme function.
$function = variable_get('imageinfo_cache_theme_imagecache_callback', IMAGEINFO_CACHE_THEME_IMAGECACHE_CALLBACK);
- return $function($presetname, $path, $alt, $title, $attributes, $getsize);
+ return $function($presetname, $path, $alt, $title, $attributes, $getsize, $absolute);
}
/**
@@ -633,6 +636,16 @@ function imageinfo_cache_check_file($file, $op) {
}
}
+/**
+ * Given a node, get all files associated with it.
+ *
+ * Currently this only works with images stored in filefields.
+ *
+ * @param $node
+ * Node object.
+ * @return
+ * An array of info from the files table.
+ */
function imageinfo_cache_get_node_files($node) {
$fields = filefield_get_field_list($node->type);
$files = array();