📜 ⬆️ ⬇️

Create a photoblog on Drupal 6

Why all the same Drupal? - Initially, I opted for Wordpress, since the multiplayer CMS does not interest me, I decided to try Wordpress. It was in 2008. But at that time (perhaps now something has changed) I could not find a single module or several modules that would satisfy the following simple requirements (in order of importance):
  1. grouping photos by album, with the possibility of adding a description to the album
  2. upload multiple photos to an album with a minimum number of clicks
  3. album grouping by category
  4. showing albums in the form of topics with a description and a preview of several photos on the main page
  5. direct link to any album
  6. Comments of visitors for the album and a separate photo (with pre-moderation)
  7. output size control

But with Drupal we managed to implement all this, and this topic is about it.



First I stopped at the Brilliant Gallery module, which is still used for old albums. The module allows you to show all photos located in a specific folder on the server in the body of the note. The module allows you to sort the image alphabetically or randomly. It is possible to cache images using Drupal. In addition, you can control the size of icons and full-size images, the choice of Ajax plug-in for viewing.
The note itself consists of a small line with data for the module:
  [bg | girls / bonya ||||| black || no] 

As you can see, the options are formed for each album separately, and when you change the theme, changing the background color is not so easy, you need to edit each album separately.
Other disadvantages of the module:

As you can see, the module does not solve all the tasks.
')
I continued searching, and installed Image , which allows you to upload individual photos into the appropriate categories (one picture may belong to several categories). But I don’t know how to group photos into albums. A useful feature was the appearance of the "random picture" block. I note that for Anonymus the picture is the same all the time, if you enable block caching. If you enable only page caching, then the picture will be the same for when updating the same page, but different for different pages.
This module also did not solve the tasks.

And finally, I got to the most powerful module album photos , which can do everything you need and other useful things.
It was possible to vote for each individual photo (like / dislike), but for this you need the Voting API , with which you can also organize surveys of visitors.
Module features:


The task is solved and you can go to the site improvements for themselves.

To display full-size images from the main and album pages, set Lightbox2 (In the settings for album photos, you can select other ajax viewers)

For comments installed Ajax and Ajax Comments

DHTML Menu is useful for simplifying and speeding up navigation.

The most difficult task was the choice of the interface theme. I used this pleasant and high-quality theme for a long time, having slightly edited CSS and Deco pictures. But the photos look better on a black background (in my subjective opinion), so I recently switched to Decayed . The theme had problems with the menu and a large skull in the upper right corner. After a little CSS editing and background theme problems were fixed.

I took pictures for one iPhone resource and got more than 3,000 visitors from there per day. The hoster began to complain about the high consumption of resources and at times turned off access to the site. I thought about caching and stopped on boost , since the main (almost all) traffic to the site is generated by anonymous users. The module is very powerful, but requires access to .htaccess - it is necessary for hosting to support this and cron, otherwise the cache will not be automatically cleared. If hosting does not support creating tasks for cron, then you can use a little trick - sitename / cron.php can be pulled from any server.

UPD: the purpose of the article is to show a possible solution of the task set by means of Drupal and discuss the advantages and disadvantages of the stated approach with the Habro community, learn about other solutions
UPD2: there are already other interesting solutions in the comments
UPD3: The result can be seen here bb.org.ua (Decayed theme) and here mike.pp.ua (the old version with the Deco theme, hosted at hosting.ua, but as you can see, they restored virtual hosting and everything works)

Source: https://habr.com/ru/post/90444/


All Articles