Closed (fixed)
Project:
Image
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2004 at 01:50 UTC
Updated:
2 Oct 2004 at 23:20 UTC
Jump to comment: Most recent file
It would be handy to have a block that contains a list of image galleries.
Attached is a patch that provides a simple list of top-level taxonomy terms that are in the image vocabulary, and link to the corresponding gallery.
If nobody objects, I will commit this change to the contrib cvs repo.
A nice enhancement would be to optionally enable sub-taxo terms in the image vocab hierarchy.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | imagemodulev1.108.patch | 850 bytes | jasmeetc |
| image.patch | 1.89 KB | mrowe |
Comments
Comment #1
(not verified) commentedI achieved more or less the same with by adding a user definen block with the following PHP content:
$albums = taxonomy_get_children(0, variable_get("image_nav_vocabulary", ""));
$albums = _image_album_properties($albums);
$image_nav_vocabulary = taxonomy_get_vocabulary(variable_get("image_nav_vocabulary", ""));
foreach ($albums as $tid => $album) {
if(strpos($album->name,"QQ") === FALSE) $output .= "
";
}
return $output."
" ;
I do not display galleries whose name start with QQ. That can be used for:
- images used in articles. Going to websitename/image I can easily find those images.
- when working on a gallery
- to put a gallery out of sight for a certain period of the year
Comment #2
jasmeetc commentedI changed the theme_image_block code to display a random thumbnail along with the galleries list. Just thought that this snipet might be useful to somebody.
function theme_image_block($albums) {
thumb_path."\">";
$sql = "SELECT n.nid, n.title, n.teaser, n.body, i.thumb_path FROM {node} n, {term_node} t, {image} i WHERE i.personal = 0 AND n.moderate = 0 ORDER BY RAND() LIMIT 1";
$result = db_query($sql);
$image = db_fetch_object($result);
$output = "nid."\">
$output .= "
";
- " . l($album->name, "image/tid/" . $album->tid) . "
foreach ($albums as $album) {
$output .= "
";
}
$output .= "
";
return $output;
}
Comment #3
jasmeetc commentedOops the last comment is all screwed. I have attached the patch. It is pretty simple and displays eandom thumnail in the block. Also, if you click on the thumbnail, it goes to the correct node.
Hope that helps.
Comment #4
Tarlbot commentedWhere can I find the 1.008 version of the image.module that I can apply the patch attached to comment #2 to? Assume I know nothing about CVS.
Comment #5
killes@www.drop.org commentedThis appears to be in the cvs version.
Comment #6
(not verified) commented