{{tpl:CommentIfMe}}

The tpl:CommentIfMe tag returns a value if the comment is written by the post author, in a tpl:Comments loop context. To determine if the comment author and the post author are the same person, the tag tests that:

  • the comment author's e-mail address is the same as the post author's e-mail address (the one set up in his user profile)
  • and the comment author's website URL is the same as the post author's website URL (the one set up in his user profile).

Important:

Every character counts, such as a final slash in the end of the website URL.

Attributes

return

This attribute defines what value will be returned in case of success.

  • return="me" will display me only if the comment is written by the author of the post.

Example

<p{{tpl:CommentIfMe return=" class=\"me\""}}> ... </p>

In this example, the comment will have an extra CSS class me if its author is the same as the post author; this CSS class will allow a special design for it.

Wiki powered by Dokuwiki.