Description
--------------------
Personal image albums.
Prerequisites
--------------------
- folksonomy.module from Contrib
- image.module
Tech Notes
--------------------
Each image is a node. Albums comprise of all images within the same realm
and with the same "tag". Realm and tag are components of the folksonomy
module. For the purposes of this module, each person has his own "realm"
where his tagspace is independant of all others.
Images can have more than one entry im the folksonomy table and thus appear
in many different albums (think "tags" in Flickr) of the same user. No UI
exposes this yet.
To see the tag "albums" below "categories" for an image, the theme has to be
modified as follows:
phptemplate:
in file node.tpl.php:
(example)
+ <div class="albums"><?php if (($node->type == "image") &&
+ (user_access('access albums')))
+ print '( ' . t('albums:') . ' ' . $albums . ' )';?></div>
in file phptemplate.engine:
function phptemplate_node($node, $main = 0, $page = 0) {
if (module_exist('taxonomy')) {
$taxonomy = taxonomy_link('taxonomy terms', $node);
}
else {
$taxonomy = array();
}
+ if (module_exist('album')) {
+ $albums = album_link('album', $node);
+ }
+ else {
+ $albums = array();
+ }
$links = link_node($node, $main);
$vars = array(
'title' => $node->title,
...
'taxonomy' => $taxonomy,
+ 'albums' => theme('links',$albums),
xtemplate:
in file xtemplate.xtmpl:
...
<!-- BEGIN: node -->
...
+ <!-- BEGIN: album -->
+ <span class="taxonomy">{albums}</span>
+ <!-- END: album -->
in file xtemplate.engine:
function xtemplate_node($node, $main = 0, $page = 0) {
global $xtemplate;
...
if (module_exist("taxonomy") &&
($taxonomy = taxonomy_link("taxonomy terms", $node))) {
$xtemplate->template->assign("taxonomy", theme_links($taxonomy));
$xtemplate->template->parse("node.taxonomy");
}
+ if (module_exist("album") && ($albums = album_link('album', $node))) {
+ $xtemplate->template->assign("albums", theme_links($albums));
+ $xtemplate->template->parse("node.album");
+ }
...
To Do
---------------------
- slideshow
- expose more power of folksonomy
- allow for zip file uploading of albums
- get image captions from IPTC headers
- show images with same tag across all users
- block with recent images
- simpler batch edit
- add "previous" and "next" functionality
Author
---------------------
Moshe Weitzman
Modified by cubano, Jesus del Valle
| Comment | File | Size | Author |
|---|---|---|---|
| album_0.module | 32.45 KB | cubano |