View Single Post
  #1  
Old 08-09-2006, 05:39 PM
Dennis's Avatar
Dennis+ Offline
Team Pixelpost
 
Join Date: Jul 2006
Posts: 2,394
Send a message via MSN to Dennis
Addon: Comments layout from template files

What is it?

This add-on enables the use of external HTML-files for displaying the comments. I've found the original internal solution with <LI> not sufficient enough to handle my needs, so I wrote this add-on.

It reads two HTML templates with HTML for a single comment in which the following tags can be used:

NEW TAGS (comment template!):

<IMAGE_COMMENT_GRAVATAR> // support for gravatars (please see the custom_comments.php for more options).
<IMAGE_COMMENT_DAY> // shows the day the comment was posted as a number.
<IMAGE_COMMENT_MONTH> // shows the month the comment was posted as a three letter month (e.g. AUG).
<IMAGE_COMMENT_YEAR> // shows the year the comment was posted as a number.
<IMAGE_COMMENT_NAME> // shows the name of the person who made the comment (either as a link to homepage or text).
<IMAGE_COMMENT_MESSAGE> // shows the message or the default "there's no message." from the selected language file.

The HTML files have to be located in the current template and are named as:

custom_comment_template.html // Displayed when there are comments for a picture.
custom_no_comment_template.html // Displayed when there are NO comments for a picture.

In order to replace the original comments with the new custom comments please use the following tag in your main template:

<IMAGE_CUSTOM_COMMENTS> // the full comment list with HTML from the template files.

There are multiple settings which can be altered in the PHP file (e.g. filenames templates, gravatar defaults). In the next version I would like to add the settings to the database but for now this will do.

Version info
Version 0.1, see it in action @ http://foto.schonhose.nl

Installation
Just copy the file in the Addons folder. That's it!
Be sure to make the two template files in your current template folder.

Download
Download it here

Please leave comments and/or suggestions.

Last edited by Dennis; 08-19-2006 at 09:02 AM.
Reply With Quote