Here are the main reasons why I've chosen Drupal over dedicated photoblogging scripts:
- User and access management (as I want my friends to be able to access some "friends only" images)
- Email notifications for new content + various RSS feeds (general / per tag / ...)
- Text blog
- Better functionality, flexibility and extendibility
- RSS aggregator to link to my friends' news
- Nice and clean urls
- and... I'm quite familiar with Drupal code and themes (and this was probably the main reason)
After drawing a concept it was not very difficult to assemble photoblog on Drupal. But I made 3 differently setup installations before this final one was released. And I had to make several php code snippets and module code modifications to make the whole thing work the way I want.
Another task was the custom theme. My idea was to create quite dark theme as I like to look at the pictures against the dark background. I think, this way you can feel the vibe better, and it requires less concentration from you. The worst (the less enjoyable at least) part in theme creation process was restyling default drupal.css classes for admin area. I wanted them to match the general darker theme layout instead of quite bright one offered by default drupal.css.
List of modules used
Asterisk(*) denotes modules provided in default Drupal distribution.
- aggregator*
- block*
- blog*
- captcha
- codefilter
- comment*
- contact*
- drupal*
- graphstat
- help*
- image
- menu*
- node*
- page*
- path*
- pathauto
- ping*
- poormanscron
- search*
- simple_access
- statistics*
- subscriptions
- system*
- tagadelic
- taxonomy*
- taxonomy_xml
- upload*
- user*
- watchdog*
- watermark
I was not using image_gallery module as all the "galerizing" functions are performed by the theme and taxonomy (it is at least more flexible).
Custom code:
watermark module
I didn't like the quality of images produced by this module after the watermark is applied to the image. Image quality was too jpegy - 66. It is ok for any news or blog posts but it's not enough for photo dedicated site. So I added the quality argument (which was missing) to it. Around line 235 there is a code:
if (!imagejpeg($im, $image_path)) {
Which I changed to:
if (!imagejpeg($im, $image_path, 95)) {
The composite jpeg (image with applied watermark) quality produced by the watermark module is 92 now. Which is fine.
Random image on front page (random full node)
Here is the code (php code snippet) which I used in my mission:
<?php
$list_length = 1;
$sql = "SELECT node.type, node.nid FROM node WHERE node.type = 'image' AND node.status = 1 ORDER BY RAND() DESC LIMIT $list_length";
$result = db_query($sql);
while ($anode = db_fetch_object($result)) {
$output .= node_view(node_load(array('nid' => $anode->nid)), $teaser = FALSE, $page = TRUE, $links = TRUE);
}
print $output;
?>
PHP handling for Drupal 4.7 in mission described here: http://drupal.org/node/57650
Tag cloud block code
The reason why I didn't use the block provided by tagadelic module was that module posts only 12 most used tags (taxonomy terms). But I needed all of them for full navigation.
Here is the code (php code snippet) which I used for tag cloud block:
<?php
$vocs[] = 4; // id of the vocabulary of which you want to display a tag cloud
$output = theme('tagadelic_weighted',tagadelic_get_weighted_tags($vocs));
print $output;
?>
That's all. It was not very complicated task to make a nice and feature rich photoblog powered by Drupal.
Hi Andrey,
I was checking out Drupal sites and came across your's by chance. You have done an amazing job with all aspects of the site. The design is clean and simple with a few nice additional touches, the navigation and layout is done well and best of all it's Drupal! Thanks for sharing the site "recipe," it's good to see hear how you did it. This is exactly what the community needs more of, showcasing the variety of ways Drupal can be used, extended, and themed so well. I've been planning to move my old, never updated photo site (Exhibit Engine) to Drupal, but haven't yet (too busy with work.) This is great inspiration to get on it!
Thanks for sharing your photos, you have an eye for some unique angles that each tell an intriguing story. Keep up the good work.
Regards,
Kd
PS: Maybe I'm missing something, but I didn't see a way to navigate through the images (back, next, etc.) while on the enlarged photo detail page. It might be nice to add a way to navigate through them quickly by clicking the image or having some type of back/next.
The simple navigation links for full images are here now. (Here is how-to at drupal.org).
Sweet, thanks for the link. Looking good!
Kd
The random image php snippet has been updated to show only published nodes (images). It's handy to match exactly published content for random image when you have some scheduled ones for the future (there for not yet published but submitted).
Hi Andrey,
Awesome web site, awesome theme and functionality. Congratulations and thanks for sharing.
I was wondering, what module or snippet do you use to crop the thumbnails or get them to show all in the same size and how do you upload them? Do you have a way for mass uploading.
Thanks
Pedro
Thanks for compliments.
I used image_exact module to create uniform thumbs. It was not my target to make square thumbs exactly (although you can do even this). But I had to normalize thumbnails for film (and pro digital) 2:3 image proportion as well as 3:4 which more common for small digital cams and computer displays. Thumbnails are 3:4 now.
And... mass upload is missing for now unfortunately. Acidfree module can supposedly do it (and much more) but I don't like it that much.
thanks for the random image and tag cloud code. keep them coming!
thanks for the random image and tag cloud code. keep them coming!
Hi There,
You did such an amazing job with your site. I'm a newbie and trying to learn Drupal fast. I was hoping you can you explain a little bit more on how your created your photo gallery? As you mentioned you used both the theme and taxomony to develop the gallery.
thanks,
joseG
Taxonomy -> Pretty usual way. Just a list of (image) nodes for certain term (driven with tagadelic module).
Theme -> Any image node teaser is styled via CSS to have exactly thumbnail size width then float left.
That's it.
Thank you!
I'm very impressed with your drupal photoblog site. I know nothing about php code. Where should I add those code? Thanks in advance!
The various RSS feeds is why I chose Drupal. It is so convenient!
John
free psp downloads
thanks for the random image and tag cloud code. Looking good!
This has piqued my interest. maybe i'll stop using wordpress and give this a shot.
I've been using Drupal for a while and at first, it seems like a pretty daunting task to get decent image and image gallery support working, but after playing around with it for a while, it really isn't that bad. Great post! very informative!
Hey Andrey!
I'm actually getting ready to use Drupal for the first time on a new project and I've been spending some time looking at sites using Drupal. You've done a great job with yours, I love everything about it!
-Jen