This, that and the other (may contain nuts)

Domino Blog Template - Highlighting Author Comments

Steve Castledine  December 5 2006 06:07:00 AM
Image:Domino Blog Template - Highlighting Author Comments
The Lotus Notes blog template allows us to highlight comments entered by the content author's. I have this setup on this site (see right).

To do this is quite straightforward. First of all we need to tell the system the email address's of the content authors. Then we setup an alternative "Item Template" for the system to use for these authors.

Setup email address of author


So that the database can handle multiple authors, you need to add profile documents for each author of the system under the section "Configuration" - "User Profiles". Each User profile has a field for an email address. The system will use that email address to check against comments to decide whether to format as an "Author" comment.

To save some processing when the website is displayed, some of this is done when you create content. So if you add an email address after content is created it will not pick up this address.

Image:Domino Blog Template - Highlighting Author Comments

Create a secondary "Comment Item Template"


Each comment's formatting within the site is controlled by the default comment "Item Template". From the default blog template we need to copy the default document ("Comment Item") and give it a name such as "Author Comment Item".

Image:Domino Blog Template - Highlighting Author Comments
We then edit this template to create a unique look for comments that are added by the author. I have used the following html. You can be more creative and not so lazy as I have included the style information directly in the html.


<div style="border:1px dashed black;background-color:#ADD8E6;margin-bottom:10px;">
<div class="commentbody"><$DXCommentNumber$>) <strong><$DXCommentSubject$></strong></div>
<div class="commentauthor"><strong><$DXCommentAuthor$></strong> <$DXCommentCreation$></div>
<div class="commenttext"><$DXCommentText$></div></div>


Telling the system to use the new "Author Comment Item" template


We now need to tell the system to use the new template we created above. We do this within the configuration document under tabs "Templates" - "Comments" - "Comments". We use the field "Author Comment List Template" to select the new template we created.

Image:Domino Blog Template - Highlighting Author Comments

Final Result

After we completed the above, if we use the email address specified in our user profile document when we add comments, we will see results like this:

Image:Domino Blog Template - Highlighting Author Comments
Comments

1Tanny O’Haley  4/9/2007 2:03:51 PM GMT -6  Domino Blog Template - Highlighting Author Comments

How can I use a different style for odd and even comments?

What if I want to use different styled comments for each author. Of course since I'm the blog owner, my comments should be the most prominent, then selected friends, then user comments. Right now I do this by using the commenter's name in the class of the comment container. You can see this at Eric Mack's blog. Eric's comments have a green title, I as a close friend have a gray title and user comments have no title. The problem with using the commenter's name as a class is that class names aren't allowed to have spaces in them. If a user with the name of Eric leaves a comment on Eric's site, it will have a green title on his comment too. Which is wrong, since he wouldn't be Eric Mack.

2Steve Castledine  4/10/2007 4:35:42 AM GMT -6  Domino Blog Template - Highlighting Author Comments

The use of < $DXAltLine$ > can get you alternate row styles. This tag just places the text "alt" in every other comment.

So using two styles would give you this affect like this:

class="comment< $DXAltLine$ >" (no spaces)

3Pete  9/12/2008 6:15:58 AM GMT -6  Domino Blog Template - Highlighting Author Comments

hi,

i followed your tutorial:

-added the item template

-change the configuration to use the newly created author comment item

- added an email address

but for some reason author comments are still displayed as regular comments

what could be the reason for that?

pete

4Kane Nelson  9/14/2008 9:03:04 PM GMT -6  Domino Blog Template - Highlighting Author Comments

Steve me too as above, i followed your tutorial as stated and i still have all comments being displayed as normal comments ?!

Are we missing something ? do i need to add the authors who's comments i want listed as such into the properties of the item template/author area ?

Pls help

Cheers

5Steve Castledine  9/22/2008 5:17:39 AM GMT -6  Domino Blog Template - Highlighting Author Comments

HI Pete/Kane

It does not go back and update the email addresses of old posts for this to work. It will only start to work for new posts (as when you create them it looks up your email address and saves with the document).

6Tom Dobrucky  9/23/2008 9:47:34 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Hi can someone direct me to this tutorial?

Thanks

7Steve Castledine  9/23/2008 10:27:00 AM GMT -6  Domino Blog Template - Highlighting Author Comments

H Tom - I think people meant the document they were reading and commenting on

8Tom Dobrucky  9/23/2008 10:40:56 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Oh gotcha! Thanks for the quick reply! So if I may. I don't know if this is the right place to ask this, but I updated the left side bar replacing the current code with code I got from somewhere else and then saved the document but when I refresh the page nothing changes. It never updates what am I doing wrong?

9pete  9/26/2008 9:52:52 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Hi Steve,

i've tried it with adding a new post but the author comments looks still the same.

when i add a new blog post i just have to type in the email address for "Author" correct?

pete

10Steve Castledine  10/1/2008 7:45:29 AM GMT -6  Domino Blog Template - Highlighting Author Comments

@Tom - have you got any more detail? Perhaps email me.

11Steve Castledine  10/1/2008 7:47:19 AM GMT -6  Domino Blog Template - Highlighting Author Comments

@Pete You need to have setup the alternative html for the author line - as in the article. You also need a profile setup - which contains your notes name and an email address. Then when you create content and you add a comment (using that email address) then that line in the comments will switch to using the alternative "author" html. Does that make sense?

12charles Colin  10/1/2016 5:17:09 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Of course because I'm the blog proprietor, my commentary be supposed to be the the preponderance well-known, then chosen associates, then consumer commentary. { Link }

13Mark Wahlberg Contraband Jacket Getmyleather  12/2/2016 12:32:39 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Steve Castledine,your data is very helpful for me. I really your way of elaborating. Thanks for such an very informative blog.

14cheap  2/13/2017 1:27:46 AM GMT -6  buy cheap viagra

Deixa a urina azul san for men useing mathed approved { Link } , for sale ireland.

15cheap  2/13/2017 1:28:06 AM GMT -6  buy cheap viagra

A risk knows a adult who gets Fred and the { Link } , for woman sees that The President is a principle.

16viagra_online  2/17/2017 1:50:03 AM GMT -6  viagra online

Low Cost { Link } , - Buy Viagra Online For Full Customer Satisfaction!

17Robert  2/17/2017 1:53:37 AM GMT -6  Robert

A big thank you for your article.Thanks Again. Great.

18Robert  2/17/2017 2:03:05 AM GMT -6  Robert

A big thank you for your article.Thanks Again. Great.

19clashrealmer  4/18/2017 5:45:30 AM GMT -6  Domino Blog Template - Highlighting Author Comments

Free gems for everyone.