Gallery2:Modules:comment - Gallery Codex
Personal tools

Gallery2:Modules:comment

From Gallery Codex

Comments Module

Let visitors and users add comments to the items of your Gallery.

Description

With this module, registered users and guest visitors can add comments to your images and albums. You can restrict the permissions if you want to require users to register with your Gallery before they are allowed to add comments.

Features

  • Let visitors and users add, view, edit and delete comments to images and albums
  • Define who is allowed to do what with fine grained permissions
  • Add the show comments block to your photo pages to show the comments below the image
  • In Gallery 2.2, add the add comment block to your photo pages to show a form for adding new comments
  • View all comments for an item or for a whole album tree with the View Latest Comments link in the item actions link list
  • Add CAPTCHA protection to prevent comment spam (configure in Site Admin / Captcha)
  • See the number of comments per item in the album overview below each thumbnail

Usage

  • Install and activate the module in site admin -> plugins
  • Configure some settings in site admin -> comments
  • Add the show comment block to your photo pages in site admin -> themes -> matrix (or for any other active/used theme)
  • Define (optionally for each album/item) who is allowed to add / view / edit / delete comments by browsing to your albums and configuring it in Edit Permissions. To define the same settings for the entire gallery, select Edit Permissions for the top level album.
  • Now you and the visitors can add comments with the add comment link from the item actions link list and view comments below images
  • With G2.1.1 you will have to ability to add a comment box below the photo as well as view comments.

Known Issues

  • Add Comment block + Captcha for guest comments + acceleration turned on in Site Admin / Performance: this combination may produce "ERROR_FORGED_REQUEST" when guests try to add comments.

Customization of themes

add a comment link:

    <a href="{g->url arg1="view=comment.AddComment" arg2="itemId=`$theme.item.id`"}">{g->text text="Add Comment"}</a>

add a view comments link:

   <a href="{g->url arg1="view=comment.ShowAllComments" arg2="itemId=`$theme.item.id`"}">{g->text text="Show Comments"}</a>
advertisements