yvExtensions  English    Donate  Forum   

yvComment 

Download yvComment   v.2.1.0 for Joomla! 2.5, last changed: February 10, 2013. What's New
Download yvComment: JoomlaCode.

Contents

yvComment logoShort description

This page covers the latest version of yvComment.
Today the page is a work in progress of updating old description to yvComment v.2.XX and Joomla! v.2.5.
For the information on stable version of yvComment v.1.XX for Joomla! v.1.5 please see the page: yvComment for Joomla! 1.5 page

yvComment is Joomla! 1.5 - 2.5 native Commenting solution, it is well documented and free.
It has two required parts (i.e., extensions): component + plugin. It also has a lot of optional extensions, including Module, Community Builder plugin, Content Subscription plugin and 35 Language packs, so the resulting solution may be very simple or more complex - it's up to you.
yvComment supports Captcha (secret word) extensions, Smileys, BBCodes, WYSIWYG editor, Community Builder, JNews and many content plugins and tools designed to work with Articles of Joomla! (e.g. GeSHi). yvComment allows users to add Comments to Articles (and optionally Comments to Comments also). Comments may be stored in the same database table used by content (where they are treated as a special type of Article), or in their own table.

yvComment is very deep integrated into the Joomla! core, which it tries to extend and not to duplicate.

Terms of use: Copyright (C) 2007-2013 Yuri Volkov, Moscow, Russia.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Demo sites: You may wonder how yvComment looks and works Smile. Sorry, there is no yvComment sandbox yet Smile, but I found some sites, that use yvComment (some links may be broken...): theconference.ca; russiancarolina.net; costas.nl; joomlafare.com. In addition to above, you may find some more using search engines, e.g. Search for yvComment v.2.01 in Google. You may also look at the screenshots on this page.

Reviews: You may also want to know, what other users think about yvComment. Please see reviews in Joomla! Extensions Directory.

 Your contribution is needed!

Troubleshooting and 'Before you begin'

Attention! You should follow instructions, presented below,
in the order, in which they are presented.

Good luck and let's go!

Upgrading existing installation of yvComment

The best way to be notified about yvComment updates is using Joomla Extensions Directory (somehow...).

Some time ago I thought, that you may monitor packages in JoomlaCode, but I've noticed, that I don't receive any notifications from it by email... In JoomlaCode: Please register in JoomlaCode, log in, and you will have an option to "Monitor package" (e.g. 1_yvComment package or your language pack...), see the screenshot.

If you're not upgrading existing installation of yvComment, please skip this section.

The only reliable way to upgrade existing installation of yvComment is to uninstall it (uninstall both component and plugin), and then install new version (as it is described below). To upgrade language pack, you have to uninstall this language pack only and then install newer one.

Please note, that yvComment doesn't delete any comments during uninstallation, so you won't lose any comment. And, of cause, yvComment won't delete any of your (added by user) custom files, e.g. your custom template (see template override).

These are "yvComment plugin" parameters, that are not preserved during upgrade, and you have to set them again after installation. To speed up setting of parameters (and to be sure, that you didn't forget something...), I recommend to open yvComment plugin parameters in new window of your Internet browser before uninstall, leave it open, and use information from this window as a reference for setting parameters of newer version. After uninstallation of old version, installation and configuring of newer one, please close this "reference window". And don't press any buttons on it!

You may also try to use at your own risk an alternative
"Method to upgrade any Joomla extension without having to uninstall it first". The method allows you to preserve all settings of the previous version of the extension.

Installation and configuration

In a case of any problem during installation, please refer to the Troubleshooting section above.

1. Installation and configuration of Joomla! and it's extensions (BBCodes, Captcha etc.)

  1. It is recommended to have Joomla! 1.6.3 or newer, because yvComment is not tested to work with earlier builds of Joomla!.
  2. If you want to see yvComment in a Language other than English, you should start from install 'full' language pack of Joomla! for this language for Administrator interface, downloading it e.g. from Joomla! Accredited Translations.
    Attention! You should install Administrator Language pack even if you need other language for the frontend (Site) only.
    Only after this you can succesfully install yvCommentLanguagePack for that language.
  3. To have Smileys support in yvComment, please install (and configure, and enable! - for this and all other extensions, mentioned in this section) yvSmiley extension.
  4. To have BBCodes support in yvComment, please install yvBBCode extension.
  5. To have Avatars (and Gravatars) of authors of comments (including avatars of guests...), please install ... Oops, no compatible Avatar plugins yet :-(.
  6. To have Captcha (secret images) support in yvComment, please install one of these compatible extensions: Please note, that yvComment uses Captcha extension for posting comments by unregistered users (i.e. guests) only.
    yvComment has an option ("Use Captcha"="Raw image captcha") for Captcha plugins that work like these plugins, developed for Joomla! 1.5:
    1. BigoCaptcha (see the topic "Bigo Captcha")Bigo Captcha image
    2. "OSTWigits - Captcha", see see the topic "JEDOSTWigits - Captcha image

    Unfortunately both these extensions where not adapted for Joomla 1.6 (and higher...). So currently I can not point you to any ready to use alternative Captcha for yvComment.

    To be honest, it's not a big deal to update above mentioned packages for Joomla! 1.6. It's far more hard to support them... Maybe some new developer will make this job for the community, starting from any of these GPLed extensions?!

  7. To have Community Builder (CB) support, you have to install "Community Builder" extension v.1.7+, of course Smile.
  8. As of Joomla! v.1.7 Joomla!'s core doesn't have OpenID support (see "Shall we keep OpenId in 1.6 ?"). So OpenID support is dropped from yvComment also.
  9. To allow Authors to subscribe to email notifications about new or updated Comments on their Articles (and optionally Comments also):
    1. Install JNews. Create new List (called e.g. "Comments on my Articles") and look up its 'listid' (integer number) for future reference. (TIP: See the value of the 'listid' query parameter in the URL of the list) Acajoom will be responsible for the subscription management.
    2. Install "Content Subscription - JNews" plugin (it is in yvComment JoomlaCode project now though technically it is not dependent on yvComment) and set its "List ID of the 'Comments on My Articles' List" parameter to the 'listid' found at the previous step.
      The plugin is very simple: the only task it does is to look up the Author in the configured Acajoom List to decide if the Author (Joomla! User) is subscribed to the List.

2. Installation of yvComment extensions

  1. Download these three yvComment extensions: yvCommentComponent, yvCommentPluginOne and yvCommentModule:
  2. Install yvComment extensions. It is required to install both "yvComment Component" and "yvComment Plugin". "yvComment Module" and "yvComment Plugin 2" (for the Second type of Comments) are optional and may be installed at any time later.
  3. yvComment distribution packages contain English language files only. If you need additional language(s), download yvCommentLanguagePacks from JoomlaCode and install them. (yvCommentLanguagePacks should not be enabled!)
You may wonder, why do you have to install more than one yvComment package, if you want e.g. "comment plugin only". The short answer is: this is the irony of the Joomla! architecture (or you may call it a "feature"). All these components, plugins and modules were invented for different types of extensions, but in real life even a good "commenting plugin" has to be all of them to meet user needs.

Now you may continue to the "Preparing for configuration" below.

3. Preparing for configuration

Before going to the configuration, you have to make some additional steps in Joomla! Administrator interface (back-end):

  1. If you need an easy way to distinguish Comments (of Articles) from Articles themselves (and from other content, e.g. News etc.), you have to create Category specially for comments (later you will select them in yvComment Plugin parameters). This Category shouldn't be used for any other content, i.e. for (other types of) Articles, to avoid confusion. Articles (that are being commented) may belong to ANY category, except to created on this step. So: Read more about "Use designated Category for comments" option below.
  2. If you plan to enable guests (visitors, unregistered users...) to post comments:

Now you may continue to the "Step-by-step configuration" below.

4. Step-by-step configuration of yvComment plugin

  1. yvComment has three types of parameters: those that are global for the whole yvComment solution (component + plugin + module), those that are specific to the yvCommentPlugin, and those that are specific to the yvCommentModule.
  2. Let's deal with first two types in this section (the last one is described in the "Configuring yvComment module" section below). You get to these parameters this way: Administrator interface->Extensions->Plugin Manager->yvcomment. You will see something similar to the picture to the right. The instructions which follow are divided into two parts.


    Part 1 of 2: Global yvComment solution parameters.

  3. Sample values of yvComment Plugin Parameters. Part 1 of 5."Use Content Table". By default, yvComment stores Comments in the same database table that stores Articles. In effect, Comments become just another kind of Joomla! Article (i.e. content).
    Some people feel that since they expect a lot of Comments, these should be stored in a separate database table, though I don't recommend this since the database table is quite capable of handling all Comments and you will lose many interesting features (e.g. making comments linkable, capability to have comments on comments etc.).
    At any rate, if you want to have your comments in their own database table, set "Use Content Table" option to "No".
  4. "Use designated Category for comments"
  5. If you have opted to "Use designated Category for comments", you MUST set the "Category for comments" - select the Category, created earlier specifically for Comments, from the lists.
  6. "List of Categories IDs of Articles which may, or may not, contain comments" It is possible to limit Comments to certain Articles and block this capability for others. If that is desired, the IDs of the permitted Categories can be listed here -- e.g., 1, 22, 15 -- and for all other Categories the Comment facility will not be enabled. Leave this field blank if you want to enable Comments to be added to any Article in any Category.
    If you want to enable Comments on Comments
    you MUST ensure that "Category for comments" may contain comments.
     
  7. "List of IDs of Articles which may, or may not, contain comments". In addition to the previous options based on Categories you have this option to deal with individual Articles. This gives you maximum flexibility in defining which Article may, and which may not, be commented.
    (Please note: if an Article already has Comments, and later you try to disable commenting on this Article, those existing Comments on this Article will still exist and will still be visible to users. Unless you go to the back-end and delete those comments individually)
    IDs of Categories and Articles are logically joined,
    using the logical operator 'or').
     
  8. "Exclude Categories and Articles, selected above (No - include)" - normally leave this without a check mark (checked off, in effect).
    You may need to use a check mark to turn it on in situation like this:
    You decided, that you want to have Comments for all categories of your site, except for the two categories with IDs 2 and 4.
    To achieve this, you have to check this mark on AND type 2, 4 in the "List of Categories IDs of Articles which may, or may not, contain comments" field.
  9. Sample values of yvComment Plugin Parameters. Part 2 of 5. "Use CSS file". yvComment comes with four style files, and here you may select one of the four or you may opt not to use any of them at all: selecting 'No' option -- and, hence, instead use your custom CSS file.
    It should be added that if you have a sense of beauty, you may contribute some new style to be included in the yvComment package.
  10. "Subject of comments" When this option is set to 'Hide', users don't see subject (title) of Comments and don't have to write them. In this case, adding a Comment to the database, yvComment sets the title of the Comment to the first 40 characters of its text (And you will see the title in e.g. Joomla! Article manager).
  11. "Comment Linkable" (only for "Use Content Table"="Yes"). This is important if you want to enable users to comment on Comments. The link here leads to the article view of comment, where users may see and/or add comments on this Comment.
  12. "Author mentioned by". This feature enables you to select if you want to see 'Username' of the Author of a Comment (or Article) (default) or the 'Name'. Both Name and Username are taken from 'User details' (see Joomla!'s "User Manager").
    Please note, that currently Joomla! core can show only 'Name' for the Author of the Article, so this feature is ahead of the Joomla!'s core.
  13. "Author Name Linkable". If enabled, the name of the Comment's author becomes a link to his (or her) Web page.
  14. "Execute content plugins" - enabling this option allows you to use (in theory, all) content plugins with yvComment, just like for Articles. This option is disabled ('No') by default to prevent possible incompatibility with content plugins. This option was successfully tested with these plugins:
  15. Sample values of yvComment Plugin Parameters. Part 3 of 5. "Allow comments on comment" global option for yvComment (only for "Use Content Table"="Yes") has these values:
  16. "Editor" This option allows you to choose the editor for the text of the Comment (i.e., the editor the user uses to add or edit Comments):
  17. "Minimum period between posts of one user, seconds". The parameter, just like "Minimum period between posts of any guest, seconds" serves as the security measure against spam. But the main purpose of this parameter is to avoid duplicated posts in a case user managed to click the "Post" button twice Smile for the same comment. Default setting is 60 seconds.
    If you keep getting the same message: "Posts must be more than NN seconds apart. Maybe you've hit the 'Post' button twice? ID=NNN" please check your Comments and Articles: it looks like you have at least one Article/Comment, created "In the future" (e.g. for test purposes) and its ID is that "NNN". In this case you must delete that "Future article" or set the "Minimum period between posts of one user, seconds" parameter to "0" (empty field won't work!)
  18. "Auto close comments after specified number of days". Setting this option disables the addition of new comments to old articles, but it doesn't prevent registered users from correcting or updating their outdated information in old entries. There is an image Comments are closed to show, that Comments are closed, if in fact they are closed, to the article view of the plugin, near number of comments. I couldn't decide, where to put it, but I felt, that this image should be somewhere.
  19. "Immediately publish comments". This "Global moderation option" allows you to control, if you want comments, created by users, to be visible to all visitors of the site just after they are added.

    Publishers and Administrators of the site  see unpublished Comments in the front-end (after they log on to the front-end Smile) in the same list that contains all Comments on an Article). Since they may edit and publish ANY Comments, these will become visible to other users of the site only after the 'Published' option of the Comment is set to 'Yes'. And, of course, Publishers and Administrators may delete comments altogether.

    In the back-end menu "Components->yvComment->List of Comments" lists of Comments may be filtered by the "State" of the Comments - just like for all articles (including comments...) in the menu->'Content'->'Article Manager'.

    Finally, please note: in any case guests are not allowed to edit any comments (neither their own, nor comments of other guests).

  20. "List of Usernames to notify of new or updated comments". This parameter allows you to have an email notification feature about new or modified comments for Admins and Publishers: 
  21. "Notify Authors about comments on their Articles" option allows email notifications of Authors of Articles (and of Comments).
    Optional compatible Content Subscription extension is needed to allow subscription per User (per Author). Without that "Content Subscription extension" all Authors are subscribed (or NO Authors are subscribed) depending on the settings below.
  22. "Delete to Trash" option makes 'comments deletion' much like 'Article Trash' in the Article Manager. If this option is set to 'Yes', comments are not deleted from database, until an Administrator deletes them from the 'Article Trash'. This option works only if Comments are set to use the Content table.
  23. Sample values of yvComment Plugin Parameters. Part 4 of 5. "Allow guests to add comments". If you want to let everybody see comments, but want to restrict addition of comments to registered users only, set this option to "No".

    If you allow guests to add comments:
    1. Specify 'Username of Guest' (e.g. guest), created earlier. This user, (specified by Username), will become the Author of all comments, created by guests. Setting this option is required for consistency with "general Articles" of Joomla!: every article has to have an Author (from the list of registered users).
    2. "Check guest name" ('Yes' by default). The default setting enables yvComment to determine whether the guest's alias ("Your name" field of the "Add your comment" form) is part of any registered user's name.
    3. If you want to allow a guest to add a link to his or her Web page to the Comment, you have to set the "Allow guests to link to a site" option to do this. This link is stored in the "metadata" field of the comment.
      Please note that, due to the known bug in the Joomla! core at this time, if you edit an existing Comment from the back-end using Joomla!'s "Article Manager", this link to the guest's webiste would be erased. So don't use "Article Manager" in the back-end to edit Comments, made by guests, in conjunction with this option. We're lucky, that this bug doesn't exist for editing Comment with Joomla!'s Editor from the front-end! See bug No. 8709 and  Topic: Extending metadata of Articles (Poor implementation of content metadata saving).
    4. "Minimum period between posts of any guest, seconds". This is security measure against spam: even if some spam-bot generate different guest aliases, this parameter will allow to control maximum rate of "spam comments". Default setting is 30 seconds.
    5. If you want, and it is highly recommended, to protect your site from spam with a Captcha (a special image that contains data the user must input when submitting a Comment and which serves as a guard against automatic spamming), you have to:
      1. Download and install compatible Captcha extension.
      2. Configure this plugin and don't forget to enable it!
      3. Set the "Use Captcha" option of yvComment plugin according to the Captcha extension installed.
      4. You may also want to enable the "Delay loading captcha image" option. This option delays loading the captcha image until the user starts to type the text of Comment (or clicks in the comment text box). The purpose of this is to speed up page loading and lessen the load on the server. Most users will be discouraged from commenting if they have to wait on starting their Comment for the captcha image to load. (Thanks to Jan Tångring for this contribution).

    Part 2 of 2: Parameters that are specific to the yvCommentPlugin.

  24. Sample values of yvComment Plugin Parameters. Part 5 of 5. There are three options which need to be set with respect to the position of Comments: "Position of comments in Article view", "Position of comments on the Frontpage" and "Position of comments in other views". This allows flexible customization of the plugin (Unfortunately, Joomla! doesn't allow configuring plugins differently for different menu items/articles, so this, not very elegant decision, was taken).
    Each option has four possible values. Three are simple: "Inside Article box", "Below Article box" (default) and "Hide".
    The fourth, "Defined by Article template", is for advanced usage. This is for people who are creating their own templates for the Joomla! site, for those who want to have full control of the places where the HTML text of the yvComment plugin ("Output of yvComment") will be inserted.
    When this value is selected, yvComment plugin doesn't add "Output of yvComment" to the predefined place of the page (e.g. it doesn't append its output to the text of the article). Instead, it creates a new attribute of the article: 'comments', - and writes "Output of yvComment" there. (The 'comments' attribute is not stored in the database)
    To place this "Output of yvComment" onto the page something like this should be added to the article's template (the example below is for 'frontpage' and 'blog' views):
    <?php if (isset($this->item->comments)) : ?>
    	<?php echo $this->item->comments; ?>
    <?php endif; ?>
    
    E.g., if you want to customize position comments on the frontpage, please insert the above code in the file 'components/com_content/views/frontpage/tmpl/default_item.php' just before line:
    <span class="article_separator">&nbsp;</span>

    or (for 'article' view):
    <?php if (isset($this->article->comments)) : ?>
    	<?php echo $this->article->comments; ?>
    <?php endif; ?>
    Please note, that for "Defined by Article template position" yvComment's templates should be customized also. E.g. you may want to delete additional DIVs around 'Add your comment' text to place it in line with 'Read more...' on the frontpage. You may also decide not to have yvComment for some views of your content.
    There is another, very interesting usage of the "Hide" value of the "Position of comments in Article view" option, that doesn't require creation of custom templates:
    You may have comments of the Article in the Module (yvComment module) rather than 'inside/below' the Article! See section "Comments of the Article in the Module" for more details.
  25. The three options: "What to show on article page/frontpage/other page" have these values: The options allow you to have, for example:
  26. The "Show 'Please register'" option was added after many questions about how to add this capability. If set to 'yes', yvComment shows, inarticle view, the message 'Please register or login to add your comments to this article' - if addition of comments is allowed for this Article, but not allowed for this User.
  27. "Position of 'Add your comment' form". There are four 'positions' now:

    - the last two values allow you to 'hide' the form from the page where list of comments of the Article is shown. When these positions are chosen, instead of the whole Comment form, the user sees one 'Add your comment' button only, that leads to the separate page.

  28. Enable plugin (in 'Details' box to the left set "Enabled" option to 'Yes').
  29. You may configure, if Comments are visible to unregistered users, by setting "Access level" parameter. Please note, that access level of Comment is set the same as access level of the commented (parent) Article during creation (editing) of the Comment.
  30. Save the new configuration of the yvComment Plugin.

5. Configuring yvComment module

Sample values of yvComment Module Parameters. The yvCommentModule offers the same Views as in yvCommentPlugin and in Joomla! "Menu Item Manager".

yvComment module is by default configured to act as a "Latest comments" module (View name: "List of Comments", Layout name: "003 (Like 'Latest News')"), but you may set other views and layouts.
A great feature of Joomla! modules is that you may create any number of modules, based on the "yvComment" module (having the same 'mod_yvcomment' type), each having different settings.

  1. "View name". yvComment has three views now, each view gives you, in fact, different "yvComment module":
  2. "Layout name" is the name of the "Template file" that comes with yvComment. Each yvComment View comes with three layouts, and here you may select one of the three or you may opt to create your own layout with a new name - just select the 'Custom layout' option and type the name of your custom layout in the 'Custom layout' parameter.
    1. "Default" - this is most 'verbose' layout. Is used for the list of comments in the yvCommentPlugin.
    2. "002 (Latest comments)" - Simple layout (see yourself...)
    3. "003 (Like 'Latest News')" -
    4. "Custom layout" - select this option if you want to use your custom layout. In this case you have to type the name of your layout in the "Custom layout" parameter.
    You may use any existing layout as a starting point for your Custom template.
    You may also create your own custom layout using the name of an existing layout (the same 'Template override' feature of Joomla! as for component and plugin).
  3. "Max characters in the text of comment" limits the number of characters in the text for long titles (comments).
  4. "Filter list by" option allows you to have a very flexible module, one that shows 'Latest comments' within current context (Whole site, Category, Article). For example, it may show you on the frontpage, say, the 5 latest comments from the whole site, and if you navigate to the 'Category blog', the same module will show you 'Latest comments' on the Articles in this category.
  5. "Module title is dynamic" option changes the title of the module according to what the 'scope' of Comments on current page is. Works if the "Filter list by" option was set to some "auto" mode.
  6. "Limit results to previous" allows user to see not only "All" items in the list, but filter out results for 1 day, week, month, year (just like in the search form of Joomla! forums and in phpBB3 in general).
  7. Enable module (in 'Details' box to the left set 'Enabled' option to 'Yes').
  8. Save the new configuration of this yvComment Module.
If you need another "yvcomment module": in the menu "Extensions->Module Manager" press "New" button, select "yvcomment" module and press "Next" button. Then give some new title to this newly created module, configure it, as you wish, set module position and Save module.

6. Installation and configuration of yvComment CB plugin

Sample values of yvComment CB Plugin Parameters.To install yvComment CB plugin (file yvCommentCBPlugin_X.XX.XXX.zip) in the menu select "Components->Community Builder->Plugin management" and on the "CB Plugin Manager" page click "Install Plugin" link. "Publish" the "CB yvComment" plugin.

To configure "Comments" tab (of User's profile) click "Tab Management" link in the top CB menu. On the "CB Tab Manager" page configure "Tab" that has "CB yvComment" in the "Plugin" column. Parameters of the Tab, that are related to yvComment (see picture to the right), are the same as for yvComment module (see above).

CB doesn't know about comments as a special type of content. This is why it shows all user's comments on the "Articles" tab also. To fix this (to filter out comments from other content) into the "getDisplayTab" function of the "components/com_comprofiler/plugin/user/plug_cbmamboauthortab/cb.authortab.php" after these lines:

		$query		.=	"\n WHERE a.created_by=". (int) $user->id .""
					.	"\n AND a.state = 1 "

insert this code ( it is being injected inside an SQL-building statement):

;			
// 2010-05-19 Inserted by yvolk to fix CB v.1.2:
//   don't show comments in the 'Articles' tab
if (!class_exists('yvCommentHelper')) {
	$path = JPATH_SITE . DS . 'components' . DS . 'com_yvcomment' . DS . 'helpers.php';
	if (file_exists($path)) {
	  require_once ($path);
	}
}
if (class_exists('yvCommentHelper')) {
	$yvComment = &yvCommentHelper::getInstance(1);
	$yvComment2 = &yvCommentHelper::getInstance(2);
	if ($yvComment->Ok()) {
		if ($yvComment->UseDesignatedCategoryForComments()) {
			$query .= ' AND (a.catid<>' . $yvComment->getCategoryForComments() . ')';    
		} else {
			$query .= ' AND (a.parentid=0)';    
		}
		if ($yvComment2->Ok()) {
			// Hide comments of the Type 2
			if ($yvComment2->UseDesignatedCategoryForComments()) {
				$query .= ' AND (a.catid<>' . $yvComment2->getCategoryForComments() . ')';    
			} else {
				$query .= ' AND (a.parentid=0)';    
			}
		}
	}
}
$query		.= ''

7. Configuring other extensions

  1. You may try (test) to add comments in the front-end - these new comments will appear in the "Latest News" module. If this is not what you want:
    in Administrator interface go to the "Extensions->Module manager"->"Latest News" module and set "CategoryID" parameter to "1" (filter the list: "1" is ID of the "News" section). - So comments won't appear in the list of the "Latest News" any more Smile.
  2. If you want to have a "Latest Comments" module, create another module of the mod_latestnews "module type":
    - In the menu "Extensions->Module Manager" press "New" button,
    select "Latest News" module and press "Next" button.
    - Then give the "Latest Comments" title to this newly created module, set "Category ID" parameter to the ID of "Comments" category, set module position and Save module.

8. Styles and layout customization, localization (translation)

Style sheets

By default, yvComment uses one of four simple CSS files (components/com_yvcomment/assets/style001.css ...), that are intended to be used as a starting point for customization. If you have made your customized css in your template (for yvComment or for the whole site), you have to change the setting of "Use CSS file" parameter to "No".

Template override

yvComment has full support of Joomla!'s "template override" feature for yvCommentPlugin, yvCommentModule and yvCommentComponent, the same as for any of Joomla!'s core components/modules. Accordingly, you may copy e.g. the file 'components/com_yvcomment/views/comment/tmpl/default.php' to the directory of your template (e.g. 'templates/mytemplatename/html/com_yvcomment/comment/default.php') and customize it, as you wish. Moreover, as you may have different templates for different parts of your site (more precisely: you may assign different templates for different "Menu items" of your Joomla! site), and you may have different templates for yvComment for them.

Q. I cannot find any code in 'components/com_yvcomment/views/comment/tmpl/default.php' file, which actually display comments
A. This line "displays comments":
echo $yvComment->ShowCommentsOnArticle($parmsv); }
- in fact at this line second template is called (nested template...): components/com_yvcomment/views/listofcomments/tmpl/default.php

Translation

Currently yvComment is translated into 35 languages! Please note, that some translations may be a bit outdated. For some languages only the front-end is translated. The yvCommentComponent package contains English language file only. Translations are in yvCommentLanguagePacks, that may be downloaded from JoomlaCode and installed separately.
Of course, you may customize yvComment, editing these language files. E.g., you may decide to change the layout of notification messages... Only don't forget to backup your customized files before upgrading to any new version of yvComment.
English language file is here: "administrator/language/en-GB/en-GB.com_yvcomment.ini".

There is also a special 'English language pack' that is a template package to be used by translators to create additional language packs for the yvComment extension. So, if you want to create a new translation for yvComment, download that 'English language pack' from JoomlaCode (see '3_LanguagePackTemplate' package) and follow instructions in the yvCommentLanguagePack_en-GB.xml file. As a result, you will have yvCommentLanguagePack_xx-XX_V.VV.VVV.000.zip package for your language, where 'xx-XX' is the code or your language (see your 'full' Joomla! language pack) and 'V.VV.VVV' is version of Language pack (it remains the same as for English language pack, that was translated).

To be sure that your customized language .ini file will work correctly on the site, you should save it in 'utf-8' encoding with BOM. Generally, the editor does this automatically, because the original (used as template) English language .ini file also has BOM. E.g., the Windows Notepad program understands this and you don't need to think about this. If this is not the default with your Editor, you should explicitly "Save as..." or try other, 'unicode-aware' Editor.

If you have any problems with yvComment translation, please see solutions and recommendations here: Problem with yvcomment languagepack

9. Configuring security-related options

yvComment uses ACLs (of com_content component, it's "Category for comments" and of Comments as "articles") to Add (Create), Edit, Publish (Edit state) and Delete comments.
So what does this mean?

  1. Please read the "ACL Tutorial for Joomla 1.6".
  2. For example, if you want users of the "Registered" User group to be able to add comments:

If you have any problems with user's permissions, please turn yvComment's "Debug security" option to "On".
You will have much more information about why yvComment did and didn't allow to do (and to view) something...

Viewing Comments

There are two ways to see Comments. If you "Use Content Table" for Comments, you may use both of them, if not - yvComment's way is the only way Wink.

First, Joomla!'s general way to view Articles

If you have opted for "Use Content Table" for Comments, Comments are ordinary Articles from Joomla!'s point of view (but even Joomla! may distinguish Comments by using a special Category for Comments). In fact, you may think of yvComment as another way (fast and simple) to publish and to organize your articles (another "dimension", if you like smile): yvComment allows you to create Comments (descendants) of Articles, and it allows you to add comments on comments, thus creating tree structure of articles/comments (ascendants/descendants).

So you may use for Comments:

Adding Comments filter to the Article Manager

Comments filter was added to the Article Manager

If you opted to use Content table for comments, you may find it useful to have additional, comments filter in Joomla! Article Manager. In order to have it, you should make these additions to the Joomla! core files:

1. To the 'administrator/components/com_content/admin.content.html.php' file, function showContent, after this:

	<button onclick="document.getElementById('search').value='';

and before this:

 
	document.getElementById('filter_sectionid').value='-1';
	document.getElementById('catid').value='0';
	document.getElementById('filter_authorid').value='0';
	document.getElementById('filter_state').value='';
	this.form.submit();"><?php echo JText::_( 'Reset' ); ?></button>

add this text inside jscript code:

	<?php
	// Begin Comments filter for yvComment, part 1 of 3 --------------
	// 2009-06-06 Inserted by yvolk
	if ( isset($lists['filter_comments'])) {
		echo "document.getElementById('filter_comments').value='0';";
	}
	// End Comments filter for yvComment, part 1 of 3 --------------
	?>

2. To the same 'administrator/components/com_content/admin.content.html.php' file, function showContent, after this:

						<td nowrap="nowrap">
						<?php

and before this:

						echo $lists['sectionid'];

add this text:

						// Begin Comments filter for yvComment, part 2 of 3 --------------
						// 2009-06-06 Inserted by yvolk
						if ( isset($lists['filter_comments'])) {
							echo $lists['filter_comments'];
						}
						// End Comments filter for yvComment, part 2 of 3 --------------

3. To the 'administrator/components/com_content/controller.php' file, function viewContent, after this:

		
		// Keyword filter
		if ($search) {
			$where[] = '(LOWER( c.title ) LIKE '.$db->Quote( '%'.$db->getEscaped( $search, true ).'%', false ) .
				' OR c.id = ' . (int) $search . ')';
		}

and before this:

 
		// Build the where clause of the content record query
		$where = (count($where) ? ' WHERE '.implode(' AND ', $where) : '');

add this text:

		// Begin Comments filter for yvComment, part 3 of 3 --------------
		// 2010-05-22 Inserted by yvolk
		if (!class_exists('yvCommentHelper')) {
			//echo '1. No yvComment;'; 
			$path = JPATH_SITE . DS . 'components' . DS . 'com_yvcomment' . DS . 'helpers.php';
			if (file_exists($path)) {
			  require_once ($path);
			}
		}
		if (class_exists('yvCommentHelper')) {
			$yvComment = &yvCommentHelper::getInstance(1);
			$yvComment2 = &yvCommentHelper::getInstance(2);
			if ($yvComment->Ok()) {
				$filter_comments = (int) $mainframe->getUserStateFromRequest( $context.'filter_comments', 'filter_comments', '0',	'int' );
				if ($filter_comments != '0') {
					//echo '2. yvComment loaded;'; 
					switch ($filter_comments) {
						case '1':   // Hide comments
							if ($yvComment->UseDesignatedCategoryForComments()) {
								$where[] = '(c.catid<>' . $yvComment->getCategoryForComments() . ')';    
							} else {
								$where[] = '(c.parentid=0)';    
							}
							if ($yvComment2->Ok()) {
								// Hide comments of the Type 2
								if ($yvComment2->UseDesignatedCategoryForComments()) {
									$where[] = '(c.catid<>' . $yvComment2->getCategoryForComments() . ')';    
								} else {
									$where[] = '(c.parentid=0)';    
								}
							}
							break;
						case '2':   // Show comments only
							$where1 = '';
							if ($yvComment->UseDesignatedCategoryForComments()) {
								$where1 = '(c.catid=' . $yvComment->getCategoryForComments() . ')';    
							} else {
								$where1 = '(c.parentid<>0)';    
							}
							if ($yvComment2->Ok()) {
								// OR comments of the Type 2
								$where2 = '';
								if ($yvComment2->UseDesignatedCategoryForComments()) {
									$where2 = '(c.catid=' . $yvComment2->getCategoryForComments() . ')';    
								} else {
									$where2 = '(c.parentid<>0)';    
								}
								$where1 = '(' . $where1 . ' OR ' . $where2 . ')';
							}
							$where[] = $where1;    
					}
				}
				// Prepare comments dropdown (combobox) filter
				$list_filter_comments = array(
					array( 'value'  => '0',
						'text' => '- ' . JText::_('SET_COMMENTS_FILTER') . ' -'),
					array( 'value'  => '1',
						'text' => JText::_('HIDE_COMMENTS')),
					array( 'value'  => '2',
						'text' => JText::_('SHOW_COMMENTS_ONLY'))
				);
				$lists['filter_comments'] = JHTML::_('select.genericlist', $list_filter_comments, 'filter_comments', 'class="inputbox" size="1" onchange="document.adminForm.submit( );"', 'value', 'text', $filter_comments);
			}
		}
		// End Comments filter for yvComment, part 3 of 3 --------------

Language strings, used in this patch, are arleady included in the language file of yvComment (in the 'administrator/language/en-GB/en-GB.com_yvcomment.ini' file):

Second, yvComment's specific way to view comments

Currently, there are two types of "Views" for yvComments (you may use them, while creating "pages" i.e. "menu items", of your site):

"Comment" page (+ plugin view)

Comments of the Article are shown below the Article, when you see the whole article, i.e. in "Article view". If this Article is, in fact, Comment of other Article, yvComment shows you the link to the parent article ("This is Comment of "..."").


On the screenshot below: comments of the Article in plugin view - Beez template (browser: Internet Explorer 7.0). You may see 'edit' and 'delete' images next to each comment, because current user is Admin and he may manage these comments from the front-end.
'Add your comment' form is hidden.

Comments of the Article in plugin view - Beez template 


Comments of the Article in plugin view - Rhuk_milkyway template (Browser: Firefox 2.0)
Comments of the Article in plugin view - Rhuk_milkyway template 

"List of Comments" page

You may create pages (Menu Items) to see list of comments. Menu item type is "List of Comments". List on this page may be filtered by Category of parent Article. So you may have, e.g., page "Comments on News", if you set "Category of commented Articles" parameter to "News".

For each comment in this list, yvComment shows you the link to the parent article.

yvComment uses Joomla!'s built-in pagination support to paginate the list.

"yvComment" module

'List of Comments' view, default layout, as a module 'Most commented' view, '003' layout, as a moduleThe same "List of Comments" (and different layouts of this view, including 3 prebuilt layouts) may be shown through modules, based on 'yvcomment' module.

On the picture to the left, you see 'List of Comments' view of yvComment, default layout, as a module.

On the picture to the right, you see 'Most commented' view of yvComment, "003 (Like 'Latest News')" layout, as a module.

Comments on the Article in the yvCommentModule

You may have comments on an Article (including link to add comments and, maybe, even commenting form...) in the yvCommentModule rather than 'inside/below' the article. In this way you may easily customize the look and position of comments for different pages (because Joomla! allows you to have different modules for different menu items...).

To have Comments on the Article in the yvCommentModule, you must:

  1. Configure and enable yvCommentPlugin (see above). Specifically, set "Position of comments in Article view" option = "Hide".
  2. Configure yvCommentModule to show comments just like plugin generally does (you may create another, or even more than one module for this purpose...):

Please note that yvComment shows a list of comments on the 'print' page of the Article, even if the "Position of comments in Article view" option is set to "Hide". This is done, because that 'print' page of the Article doesn't show any module and so, comments would be unprintable.

Comments Tab in the CB User Profile

Comments Tab in the CB User Profile You may see comments of one user in the tab of this user's Profile Page (of the "Community Builder" extension).

If you use Second type of comments, you may use second Tab for them. (See "Comment2" tab on the picture to the right)

Back-end view of comments

There is back-end view of comments, in admin menu: Components->yvComment->List of Comments. An Administrator may view, edit and delete comments from this view. Back-end admin is needed  mostly in a case you don't "Use Content Table" for Comments.

The list of Comments may be filtered by the "State" which has been assigned to each Comment (All/Published/Unpublished) - just like for Articles (including comments...) in menu "Content->Article Manager".

List of Comments in the backend

Adding, editing and deleting comments

To add Comments, you use the "Add your comment" form at the bottom of the Article page (when you see the whole article, i.e. in "Article view").

yvComment allows you to write HTML source code (HTML tags) in the "Text" field of a Comment only if "Allow HTML in comments text while add/edit comment" parameter is set to "Allow HTML only".

By default, user has to be logged on to add a Comment. Change "Allow guests to add comments" parameter to "Yes" to allow guests to add comments. Note, that in this case security is low, and yvComment itself has no strong spam protection yet (except for "Minimum period between posts..." parameters), so install a Captcha plugin (see above).

From the front-end, a user may edit his (or her) comment, by clicking the image for editing articles: Edit (Edit unpublished - for unpublished comments). An Administrator may edit or delete any Comment (remember also, that by using "Article manager" in the back-end you may also manage comments).

Using WYSIWYG editor to add or edit comments

You may configure the "Editor" option to use "WYSIWYG editor" (Joomla!'s configured WYSIWYG editor) for the text of comment (to add or edit comments). See, how it looks:

In addition to the above, if you opt to use the Contents database table to store Comments, you will see Comments as ordinary Articles (e.g. in "Latest news" module) . In this case you may also edit the Comment with your configured WYSIWYG editor, and yvComment will show you this Comment with all formatting (and images).

Please note that due to the known bug in Joomla! core (see Topic: Extending metadata of Articles (Poor implementation of content metadata) if you edit existing Comment from the back-end using Joomla! "Article Manager", then additional metadata, created by yvComment (link to the Web site and email of Guest) would be erased. So don't use "Article Manager" in the back-end to edit comments, made by guests, in conjunction with this option. We're lucky, that this bug doesn't exist for editing Comment with Joomla! Editor from front-end!

Feedback

Your feedback is greatly appreciated!

TODO - Future plans and thoughts

Information for Developers

yvComment is rewritten specifically for Joomla! 2.5, and it is not compatible with previous versions of Joomla!/Mambo. So it is able to use the most advanced features of Joomla! 2.5.

My intention has been to develop an extension that is as "natural", native to Joomla!, and that uses as many built-in (or existing) features (and tools, extensions, including third-party products, developed for Joomla!), as possible.

yvComment uses the MVC (Model-View-Controller) architectural pattern. I think, that the most interesting fact for developers is, that yvComment uses the same MVC code for its Component, Module and Plugin parts. So, Joomla! Component, Module and Plugin classes are, in fact, different interfaces to the same core of yvComment.

In other words, yvComment is:
a single big thing that has everything needed for the whole "yvComment solution" with minimum duplication;
plus it has three very small pieces of code to be (seen by user...):
- in component,
- in plugin (actually, two plugins: in Joomla! and in Community Builder extension),
- and in module.

Data model

yvComment has two basic options: use the 'Content' table of Joomla! or use its own table. In both cases the structure of the table is the same: as this structure is defined in the "installation/sql/mysql/joomla.sql" file; see 'Table structure for table `#__content`'.

If you want to see what data is inside that table, use some SQL manager (e.g. phpMyAdmin) to look at the 'jos_content' table (or 'jos_yvcomment' table, if you are not using "Content" table for Comments) of your database.

yvComment uses the "Content" table the same way Joomla! itself uses it. This is why you may use any extension to view/edit/administer comments.
yvComment extends the Joomla!'s "Content" table in the points listed below:

Let's suppose you first opted not to use content table for Comments, but later changed your mind and decided to use it (i.e. to have Comments in the same table as Articles). So you need to move your Comments to the 'content' table. To do this, you should backup your data and then execute this set of SQL statement in MySQL manager (e.g. in phpMyAdmin). Please note that these statements should be executed at once (in one SQL window):

SET @MaxId = GREATEST(
	(SELECT MAX(id) FROM `jos_content`),
	(SELECT MAX(id) FROM `jos_yvComment`)
);

UPDATE `jos_yvcomment` SET id = ( id + @MaxId ); 

INSERT INTO `jos_content` (SELECT * FROM `jos_yvcomment`);

History of changes

v.2.01.0 (February 10, 2013). Joomla 2.5 and its Captcha.

  1. Updated for Joomla! v.2.5. No "strict standards" warnings any more.
  2. Added support for the native Joomla! v.2.5 Captcha plugin (ReCaptcha).

v.2.00.5 (January 21, 2012). Unique aliases for comments.

  1. Solved "Another article from this category has the same alias" problem, which occurred when two comments with the same subject were posted. Now yvComment automatically finds unused alias adding digits to the comment's alias.

v.2.00.4 (August 20, 2011). yvComment supports Joomla! 1.6 and 1.7

  1. Tested to be compatible: with Joomla! 1.7.0 and with Community Builder 1.7.
  2. Small fix improving Comment preview page (got rid of additional linebreaks in the parent Article). Thanks to Carlo for the tip.
  3. Workaround for the Joomla! 1.7.0 bug: JDatabase->replacePrefix() function returns empty string.

v.2.00.3 (June 14, 2011). Version for Joomla! 1.6 released!

Starting from this 2.0 version yvComment is NOT compatible with Joomla! 1.5 any more in order to be really Native for Joomla! 1.6.
Old yvComment's v.1.XX packages for Joomla! 1.5 are still available for download.
  1. Content subscription implemented with JNews instead of Acajoom (Acajoom is not compatible with Joomla! 1.6).
  2. Integration with CB (Community builder) works.
  3. CAPTCHA implemented with KeyCAPTCHA plugin. The plugin is integrated into yvComment using universal interface based on triggering events. The interface was developed in collaboration with KeyCAPTCHA team.
  4. ACLs (of com_content component, it's "Category for comments" and of Comments as "articles") are used to Add (Create), Edit, Publish (Edit state) and Delete comments.
  5. Only some language files are updated.
  6. OpenID support was dropped from Joomla! core and hence from yvComment also :-(.

v.1.25.3 (May 19, 2010). Two commenting systems in one!

Attention! This release has too many changes in the yvComment's source code,
so please test it thoroughly before updating Your production site!
  1. PHP4 is not supported any more.
  2. Added Second Type Of Comments: Now you may have two independent lists of comments in one site, even two types/kinds of comments for each article - as if you installed two different Commenting systems simultaneously.

    You may ask: Why do I may need the second type of comments? - It's not easy question :-)
    But one of my users needed it, so maybe this will help you to create your unique site design/services also...

    The subtle difference between real second commenting solutition and this Second type of Comment inside the same yvComment is much easier administration of yvComment's approach:

    To have this "Comment type 2" You have to:

  3. Multiple levels of comments for 'Threaded comments' in Plugin and in List of Comments views.
  4. Added two debug options to help resolve problems: 'Debug' and 'Debug security'.

v.1.24 (August 30, 2009). Notify Authors about comments on their Articles.

  1. Added "Notify Authors about comments on their Articles" option to allow email notifications of Authors of Articles (and of Comments).
  2. Added extension-independent interface (Joomla! event) to allow subscription on notifications per Author.
  3. Added "Content Subscription - Acajoom" plugin that implements subscribtion interface for "Acajoom News v.4.1.3" Joomla! extension. Thanks to "lemur1" for providing the idea and code for integration with Acajoom.
  4. yvComment project SVN repository created at JoomlaCode to simplify developers collaboration.

v.1.23 (July 11, 2009). OpenID integration.

  1. Added the "Use OpenID" option to identify a commentor using OpenID external service. More details are here.
  2. Changed: If "Delay loading captcha image" option is set to 'Yes' AND text of a Comment is not empty - Captcha loading is NOT delayed (this is how it should be from the start...). Corresponding javascript code was fixed to be compatible both with MSIE and Mozilla Firefox.
  3. Added the "Publish/Unpublish" button (visible for admins only) to publish/unpublish a Comment in one click.
  4. Added the "Show comments on Comment" option to the module and "List of Comments" view. Set it to 'No' to see all comments, including comments on comments, in one ordered (non threaded) list. This is especially useful for the "Latest comments" list in the module.
  5. Changed: Almost all CSS classes were renamed to avoid conflicts with poorly written templates, e.g. class="Header"-> class="CommentHeader" etc.

v.1.22 (May 16, 2009). Community Builder integration.

  1. Added third value to the "Author name linkable" option: "Link to the CB profile" (requires "Community Builder" extension v.1.2).
  2. New yvCommentCBPlugin was created - plugin for "Community Builder" extension v.1.2. It provides a 'Comments' user Tab (in CB User Profile) that shows all Comments written by the user.
  3. Added "Read more" link support. So if e.g. comments are being added using WYSIWYG editor, user may create intro and fulltext of the comment. BTW, "Alternative Read more text" parameter is also supported (although yvComment doesn't provide interface to set it...)
  4. Access control improved. Now users of the "Registered" group are not allowed to edit their own comments. Joomla! 1.5 core doesn't have any user's group, that may add content, but may not edit their own content, so yvComment still acts not exactly the same way as Joomla! core (let's wait for Joomla! 1.6...)

v.1.21 (March 08, 2009). Comments on blog pages.

  1. yvComment now (by default) stores text of the Comment in the 'introtext' field of the database table (and not in the 'fulltext' field as before). This increases compatibility with Comments, created by yvComment and Articles, created or edited by Joomla! core (or compatible extensions). All Comments, created by yvComment v. less that 1.21.0 are still fully compatible (viewable and editable), so there is no need for any 'database upgrade'.
    Moreover, yvComment correctly understands 'break' between 'introtext' and 'fulltext' fields (<hr id="system-readmore" />). Again: just like Joomla! core does.
  2. "Use designated Section and Category for comments" option was added with Yes/No values.
  3. The three options: "What to show on article page/frontpage/other page" were added with these values: The options allow you to have, for example: The "Link 'Comments(n)' text to some other page" option was not needed any more and it was deleted.
  4. Values of the "Position of 'Add your comment' form" option where changed, so there are four "positions" now: - the last two values allow you to 'hide' the form from the page where list of comments of the Article is shown. When these positions are chosen, instead of the whole Comment form, the user sees one 'Add your comment' button only, that leads to the separate page.
  5. Added two new translations (new languages) since previous release, see them at JoomlaCode:

v.1.20 (January 25, 2009). Most commented.

  1. "Most commented" view was added to be used mostly in the module. This view shows the list of articles in the descending order of number of comments for each article. Number of comments is shown also. This module has only one predefined layout: "Like Latest News".
  2. "Max characters in the text of comment" parameter was added to the listofcomments/mostcommented views (and to the module) to limit the number of characters in the text for long titles (comments).
  3. "IDs of commented Articles" filter was added to the listofcomments/mostcommented views (and to the module) (Thanks to Peter v.d. Hulst).
  4. "Limit results to previous" filter was added to the listofcomments/mostcommented views (and to the module). So user may see not only "All" items in the list, but filter out results for 1 day, week, month, year (just like in search form of Joomla! forum and in phpBB3 in general).
  5. Access level of Comment is set the same as access level of the commented (parent) Article during creation (editing) of the Comment.
    (This more advanced task was not done yet: To change access level of comments of one Article, when access of this article is being changed (if Joomla! has a hook for this...)
  6. "Delete to Trash" option was added that makes 'comments deletion' much like 'Article Trash' in the Article Manager. If this option is set to 'Yes', comments are not deleted from database, until an Administrator deletes them from the 'Article Trash'. This option works only if Comments are set to use the Content table.
  7. New value to "Allow comments on comment" option was added: "Administrator's reply only". - Same as "Owner's reply only", but only Administrators (or other users, who have 'all rights' to edit comments) are allowed to add comment on Comment.
  8. "Immediately publish guest comments" option was renamed to "Immediately publish comments". This "Global moderation option" allows you to control, if you want comments, created by users, to be visible to all visitors of the site just after they are added.
  9. Added two new translations (new languages) since previous release, see them at JoomlaCode:

v.1.19 (September 21, 2008). Comments on Comments!

  1. Added: yvComment is 'Print aware' now: forms, buttons and links to add comments are hidden from 'print' page of the Article.
  2. Added "Allow comments on comment" global option for yvComment (only for "Use Content Table"="Yes") with these values:
  3. Added "Comment Linkable" option for yvComment (only for "Use Content Table"="Yes") The link leads to the article view of comment, where users may see and/or add comments on this Comment.
  4. Changed: "Position of comments" option was replaced with three options: "Position of comments in Article view", "Position of comments on the Frontpage" and "Position of comments in other views" to allow more flexible customization of the plugin (Unfortunately, Joomla! doesn't allow to configure plugins differently for different menu items/articles, so this, not very elegant decision, was taken).
    Each option has four values. Three are simple: "Inside Article box", "Below Article box" (default) and "Hide".
    The fourth, "Defined by Article template", is for advanced usage.
    'Defined by Article template' is for people, creating their own templates for the Joomla! site, for those, who want to have full control of the places, where the HTML text of the yvComment plugin ("Output of yvComment") would be inserted.
    When this value is selected, yvComment plugin doesn't add "Output of yvComment" to the predefined place of the page (e.g. it doesn't uppend its output to the text of the article). Instead, it creates new attribute of the article: 'comments', - and writes "Output of yvComment" there. (The 'comments' attribute is not stored in the database)
    To place this "Output of yvComment" onto the page something like this should be added to the article's template (the example below is for 'frontpage' and 'blog' views):
    <?php if (isset($this->item->comments)) : ?>
    	<?php echo $this->item->comments; ?>
    <?php endif; ?>
    E.g., if you want to customize position comments on the frontpage, please insert the above code in the file 'components/com_content/views/frontpage/tmpl/default_item.php' just before line:
    <span class="article_separator">&nbsp;</span>

    or (for 'article' view):
    <?php if (isset($this->article->comments)) : ?>
    	<?php echo $this->article->comments; ?>
    <?php endif; ?>
    Please note, that for 'Defined by Article template' 'position' yvComment's templates should be customized also. E.g. you may want to delete additional DIVs around 'Add your comment' text to place it in line with 'Read more...' on the frontpage. You may also decide not to have yvComment for some view of your content...
    There is another, very interesting usage of the "Hide" value of the "Position of comments in Article view" option, that doesn't require creation of custom templates:
    You may have comments of the Article in the Module (yvComment module) rather than 'inside/below' the Article! See section "Comments of the Article in the Module" for more details.
  5. Added "List of IDs of Articles which may, or may not, contain comments" option in addition to existing options for Sections and Categories of Articles to be commented. This option gives you maximum flexibility in defining, which Article may, and which may not be commented. E.g. you may decide to enable commenting for one Article only.
    Please note, that if Article already has comments, and later you would disable commenting on this article, comments on this Article still will exist and will be visible to users.
  6. Added image Comments are closed to show, if comments are closed, to the article view of plugin, near number of comments. I couldn't decide, where to put it, by felt, that this image should be somewhere...
  7. Added "Delay loading captcha image" option, that enables to delay loading captcha image until user starts to type text of comment (or clicks in the comment text box). The purpose is to speed up page loading and lessen the load on the server. Most users will not comment. Now they wont have to wait for the captcha image to load. (Thanks to Jan Tångring for the contribution)
  8. Added five new translations (new languages) since previous release, see them at JoomlaCode:

v.1.18 (July 6, 2008). yvComment Module appeared!

  1. Added very flexible and context-sensitive "yvcomment" module, that uses the same MVC code of yvComment, as plugin and component. This module is preconfigured as 'Latest comments', but may be something more...
  2. Language packs are being rebuilt. Now yvComment has single language file to avoid duplication.

v.1.17 (June 15, 2008)

  1. Added "Auto close comments after specified number of days" option. Setting this option disables addition of new comments to the old articles, but it doesn't prevent registered users from correcting or updating their outdated information in old entries.
  2. Added "Show 'Please register'" option (after many questions about how to do this...). If set to 'yes', yvComment shows message 'Please register or login to add your comments to this article' in article view, if addition of comments is allowed for this Article, but not allowed for this User.
  3. Seven (!) new translations were added since previous release, see them at JoomlaCode: Plus two translations were updated:

v.1.16 (April 20, 2008)

  1. Added new value: 'Defined by Article template', - for the 'Position of comments' option. This new value is for people, creating their own templates for the Joomla! site, for those, who want to have full control of the places, where the HTML text of the yvComment plugin would be inserted.
    When this value is selected, yvComment plugin doesn't add itself its HTML text output to the predefined place of the page (e.g. it doesn't uppend its output to the text of the article). Instead, it creates new attribute of the article: 'comments', - and writes text, that it created, there. (The 'comments' attribute is not stored in the database)
    To place this text onto the page something like this should be added to the article's template (or frontpage, blog...):
    <?php if (isset($this->item->comments)) : ?>
    	<?php echo $this->item->comments; ?>
    <?php endif; ?>
    Please note, that in this case yvComment's templates should be also customized. E.g. you may want to delete additional DIVs around 'Add your comment' text to place it in line with 'Read more...' on the frontpage. You may also decide do not have yvComment for some view of your content...
  2. Added 'Author mentioned by' option with two values: 'Name' (default) and 'Username'. Now you may see Username of the Author of comment (or Article) in addition to the 'Name'. Both Name and Username are taken from 'User details' (see Joomla!'s "User Manager").
    Please note, that currently Joomla! core can show 'Name' only for the Author of the Article, so this feature is ahead of the Joomla!'s core.
  3. Added 'Category for comments' parameter, allowing for Category IDs (categories of Articles to be commented) to be included or excluded (in addition to the Section IDs, that were earlier).

v.1.15 (March 29, 2008)

  1. All translations were removed from main yvComment packages. Now yvComment Component and Plugin packages contain English language files only. All 16 translations were moved to 16 yvCommentLanguagePacks, that may be downloaded from JoomlaCode and installed separately.
    There is also special, 'English language pack', that is template package to be used by translators to create additional language packs for yvComment extension.
    For information, why this was done, please see the discussion in the forum: How to create language pack for Joomla! 1.5 extension.
  2. Added translations:

v.1.14 (March 20, 2008)

  1. Added "Editor" option, that allows you to choose editor for the text of comment (to add or edit comments):
  2. Added "Hide" value to the "Link 'Comments(N)' text to other page" option - to completely hide the text from views other, than 'article'.
  3. Added translation:

v.1.13 (February 9, 2008)

  1. Two new CSS files (themes) designed for use with yvComment. In fact, these 'themes' are not original: they are inspired by Joomla! forum (this style is default now) and by MS Outlook 2007 message lists (Gradient). These themes are included in the package of yvComment (see below).
  2. Added option "Use CSS file", that allows user to select one of three style files, included with this extension, or don't use them at all (and, hence, put CSS for yvComment in your custom CSS file). (This option replaces "Use Default CSS file" option, that had only 'Yes/No' values).
    Future versions of yvComment may include more styles, contributed by community members...
  3. Added option "Position of 'Add your comment' form". There are two 'positions' now:
    1. 'Below list of comments' (default) - this is how it was before;
    2. 'On a separate page' - this allows you to 'hide' the form from the page, where comments are shown. Instead whole form, user sees one 'Add your comment' button only, that leads to the separate page.
  4. Added option 'Subject of comments' (with values 'Hide' and 'Show'). When this option is set to 'Hide', users don't see subject (title) of the comment and don't have to write it. I think, that "default subject", e.g.: 'Re: <Title of the article>') - is bad decision: nobody looks at them, even if you try to write something meaningful Sad. So, if you don't want to have subject, I think it's better make it invisible... and put some first words from message itself to the title (automatically while saving comment).
  5. Added translation:

v.1.12 (January 27, 2008)

  1. Added option "Execute content plugins". Enabling this option allows you to use (in theory, all) content plugins with yvComment, just like for Articles. This option is disabled ('No') by default to prevent possible incompatibility with content plugins. This option was successfully tested with these plugins:
  2. Added translations:

v.1.11 (December 16, 2007)

  1. Added full support of "template override" for plugin and component, like for any Joomla!'s core component/module. So you may copy file 'components/com_yvcomment/views/comment/tmpl/default.php' to the directory of your template (e.g. 'templates/mytemplatename/html/com_yvcomment/comment/default.php') and customize it, as you wish. Moreover, as you may have different templates for different parts of your site, so you may have different templates for yvComment for them.hem.
  2. Added mail notification feature about new or modified comments for Admins and Publishers:
  3. Added 'Guest is required to specify email' option for those administrators, who want their guests to do so :-). Currently these emails almost are not used anywhere (default template has example of its usage...), but you may use them in the customized templates (e.g. you may show them for admins...).
  4. Links to the Articles are made consistent with that of Joomla!'s core, both for SEF URLs on and off. 

v.1.10 (November 25, 2007)

  1. Added option 'Immediately publish guest comments' ('No' - by default). If this option is set to 'No':
  2. Added translation:

 v.1.9 (October 22, 2007)

  1. Added BBCode support. To have BBCodes support:
  2. Added options for Smileys: "Use Smiley form buttons" and "Replace Smileys in text" just like for BBCodes.

 v.1.8 (October 20, 2007)

  1. Added pagination of Comments in plugin mode. You have to turn pagination on in yvComment plugin parameters. Due to Joomla! restriction of JPagination class, only one pagination control may be on a page. So yvComment turns on "pagination of comments" for particular page (Menu item) only if pagination for this Menu item is turned off.
  2. Fixed bug of previous release: no Comments were visible in the "List of Comments" view (in the backend also).
  3. Fixed bug: Captcha image didn't show, when SEO was enabled (wrong URL to the image...).
  4. Quite a lot of refactoring, so new bugs may appear at first...
  5. Added translations:

 v.1.7 (September 28, 2007)

  1. Fixed code to work with Joomla! 1.5 RC2. Now yvComment doesn't work with older builds of Joomla!
  2. Added option "Username of Guest". This user, (specified by his Username), will become Author of all comments, created by guests. Joomla! doesn't have built-in Guest user account, so you have to create such user yourself. Guest account has to be in Author group and may be disabled (to prevent logging on with this account). Setting this option is required for consistency with "general Articles" of Joomla!
  3. Added option "Check guest name" ('Yes' by default) to turn on or off check: if guest's alias ("Your name" field) is part of any registered user's name.
  4. Added option "Author Name Linkable". If enabled, name of the comment's author becomes a link to his (or her) Web page.
  5. Changed. Captcha (if enabled) is shown for guests only.
  6. Added translations:

 v.1.6 (September 2, 2007)

  1. Added Captcha support, to have Captcha support in yvComment, please install OSTWigits - Captcha extension - many thanks to Jason Kendall for it!
  2. Some changes in visual design/styles, in making yvComment XHTML compatible. Thanks to Sheldon Young for his help and patience.
  3. Added translations:

 v.1.5 (July 11, 2007)

  1. Added Smiley support, to have Smileys support in yvComment, please install yvSmiley extension.

 v.1.4 (June 19, 2007)

  1. Fixed PHP-language incompatibilities, that prevented yvComment  from work under PHP4. Now yvComment supports both PHP4 and PHP5!
  2. Added backend view of comments, in admin menu: Components->yvComment->List of Comments. Administrator may view, edit and delete comments from this view. 
  3. Added "Link 'Comments(n)' text to some other page" parameter with values:
    'No' - 'Comments(n)' text is not linkable
    'Article page with comments' - 'Comments(n)' text is a link. If there are no comments for the Article, the text of the link is changed to the 'Add your comment'.
  4. Added "Max characters in the text of comment" parameter.
  5. Added "Primary order" parameter enabling to sort comments (in plugin) by date (oldest or most recent first).
  6. Added check of Joomla!'s build number. New "Enable Joomla!'s version check warning" parameter may be used to disable warnings.
  7. Error reporting improved. This effort was done to make it easier for Administrator to figure out the cause of the problem and in the end - to help him (or her) make yvComment work properly Smile.

 v.1.3 (May 27, 2007)

  1. Anti-Flood / anti-spam functions added:
  2. Added "SectionIDs of Articles" parameter: Now you may define the list of Sections (of Articles), for which comments may (or may not, if excluded) be added. So now you may have sections without comments (e.g. for some static content). By the way, you may define now, if comments on comments are enabled... (because all comments are essentially Articles of one predefined Section, configured by Administrator).
  3. The simplest version check of Joomla!'s core added. 

 v.1.2 (May 13, 2007)

  1. Added language files for Plugin parameters.
  2. Plugin code was rebuilt to conform to the Joomla! 1.5 recommendations (using JPlugin class).

 v.1.1 (May 11, 2007)

This release is a work in progress, but I decided to bring it to the public to get some motivating feedback Smile.

  1. Added new Menu item type: "List of Comments".
  2. Added links from Comment (in Article view) to the parent Article.
  3. Added option to use HTML formatting (full hypertext) support for the text of comment.
  4. yvComment Homepage (this page) is greatly expanded.
  5. Added Persian/Farsi translation.

Copyright (C) 2007-2010 Yuri Volkov, Moscow, Russia.
This text is available under the terms of the GNU Free Documentation License.