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:
<br>
in file node.tpl.php:
<br>
(example)
+ <div class="albums"><?php if (($node->type == "image") &&
+ (user_access('access albums')))
+ print '( ' . t('albums:') . ' ' . $albums . ' )';?></div>
<br>
in file phptemplate.engine:
<br>
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),
<br>
xtemplate:
<br>
in file xtemplate.xtmpl:
<br>
...
<!-- BEGIN: node -->
...
+ <!-- BEGIN: album -->
+ <span class="taxonomy">{albums}</span>
+ <!-- END: album -->
<br>
in file xtemplate.engine:
<br>
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");
+ }
...
<br>
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_1.module | 33.45 KB | cubano |
Comments
Comment #1
Tobias Maier commentedHello,
you made three issues all with the title "Photo album" a lot of text in them but nothing which discribes what you are changing...
then if you offer a patch the first status is "patch (code needs review)" after all people interested in this topic told you there opinion one of the more experienced people changes the status.
also take a look at http://drupal.org/patch we dont accept complete modules just patches for the existing code.
It is also usefull to make the patch CVS compatible (and develop it on the cvs version)
cya tobias
Comment #2
cubano commentedHi Tobias. I had cleared this already with Moshe but I also wrongly assumed that these modules would go semi-automatically from here to the cvs repository. I am waiting for my (approved) cvs account so those modules here will replace the existing ones.
Cheers,
Jesus