Closed (fixed)
Project:
Views Galleriffic
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2009 at 14:44 UTC
Updated:
28 Oct 2009 at 01:24 UTC
Find a better way, hopefully using views, to get filepath. Current way is not elegent and forces the reliance on imagecache.
The Galleriffic plugin requires a filepath for the slide and thumbnail.
<ul class="thumbs noscript">
<li>
<a class="thumb" href="path/to/slide" title="your image title">
<img src="path/to/thumbnail" alt="your image title again for graceful degradation" />
</a>
<div class="caption">
(Any html can go here)
</div>
</li>
... (repeat for every image in the gallery)
</ul>
The view wasn't giving me this info so I had to hack around to get it to output the filepath:
if($object->fieldtype == 'imagefield') {
$object->filepath = db_fetch_array(db_query('SELECT filepath FROM {files} WHERE fid = %d' , $object->raw));
$object->imagecache = str_replace("_default","",$object->imagecache);
$object->imagecache = str_replace("_linked","",$object->imagecache);
$object->raw = imagecache_create_url($object->imagecache, $object->filepath['filepath'], $bypass_browser_cache = FALSE);
}
This is a bad solution and should be fixed.
Comments
Comment #1
1kenthomas commentedCan you explain the difference between 6.x-6.x and ...1.x?
I am not getting correct filepaths from this method and am diagnosing, want to make sure I'm on the "newest."
Comment #2
acouch commentedthey are the same repository. the 6.x-6.x was created in the interface when I first submitted and am not sure how to change the cvs. once i get a partial release that won't be visible. if anyone knows how to correct that i would appreciate an explanation!
Comment #3
acouch commentedI am getting the FID from the row and looking up the correct path which is not as good as making a handler but works.