PDA

View Full Version : Addon: Comments layout from template files


Dennis
08-09-2006, 05:39 PM
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 (http://www.pixelpost.org/v1/index.php?x=downloads&details=182)

Please leave comments and/or suggestions.

GeoS
08-09-2006, 06:36 PM
Please register at dev area (http://pixelpost.org/v1/) and add your addon also there.

Dennis
08-09-2006, 06:41 PM
Please register at dev area (http://pixelpost.org/v1/) and add your addon also there.

Yeah, I've already done that.

GeoS
08-09-2006, 07:28 PM
Cool, thx :)

Dennis
08-28-2006, 07:10 AM
27 downloads so far and stil no problems. I guess it's working, although I would love to hear about blogs who are using it.

Vernon.Trent
08-28-2006, 03:08 PM
downoaded ;) thx

I'll keep an eye on it in a smooth moment and give you some feedback.

Dennis
08-29-2006, 05:11 PM
Thanks vernon, I had a look around your site and loved your work. I also really liked this sentence: amateurs worry about equipment, professionals worry about money, masters worry about light, I make pictures...

blinking8s
10-09-2006, 09:51 AM
i must have missed this...gravatar support...yes!

Dennis
10-09-2006, 10:43 AM
i must have missed this...gravatar support...yes!

Well, the gravatar support was thrown in as a bonus. The most important feature is the styling of the comments to your own liking. :)

Dennis
10-14-2006, 06:05 AM
I've updated the addon. It now fully supports the use of the database and settings can be changed through the Addon section in the Admin panel.

You can get it here (http://www.pixelpost.org/v1/index.php?x=downloads&details=182)

blinking8s
10-14-2006, 08:43 AM
awesome...ill check it out tomorrow

DikkieBurger
10-15-2006, 09:38 AM
Great addon! Works for me. :cool:

oswegan
02-22-2008, 06:24 PM
Can you explain what you mean by this:

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.

Are these completely new templates that must be created??

Dennis
02-23-2008, 07:35 AM
Yes, those are the template files needed by the addon. They contain the HTML to show your comments.