Many thanks for your kind attention,
I'll try to describe my modifications that worked up to 4.1.7 version (including this one):
Main goal - to add possibility to put comments count (only numbers) in random place of article preview at blog layout.
Step #1
at file "components/com_comment/classes/joomlacomment/JOSC_visual.php", in function "insertCountButton" I commented out a piece of code and added one line after it:
/* $html = $this->_readon;
{READON_xxx}
$html = str_replace('{READON_LINK}', $address , $html);
$html = str_replace('{READON_WRITE_COMMENT}', JText::_('JOOMLACOMMENT_WRITECOMMENT'), $html);
$html = str_replace('{READON_COUNT}', $number, $html);
$html = str_replace('{READON_COMMENTS}', $this->comments($number), $html);*/
$html = $number;//this was added
Step #2
at file "components/com_content/views/category/view.html.php"
in function "getItems" in beginning of cycle "foreach($this->items as $key => $item)" paste following code:
$item->text = '';
// Get the page/component configuration and article parameters
$item->params = clone($this->params);
$aparams = new JParameter($item->attribs);
// Merge article parameters into the page configuration
$item->params->merge($aparams);
// Process the content preparation plugins
$dispatcher =& JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$results = $dispatcher->trigger('onPrepareContent', array (& $item, & $item->params, 0));//here we calls event
Step #3
at file-templates, which overrides standard blog view "templates/mytemplate/html/com_content/frontpage/default_item.php" (valid for frontpage and usual blog view)
at the place where we need comments count, we put a construction like this:
<?php if (isset($this->item->text)) echo 'Comments: ' . preg_replace("/[^0-9]/",'',$this->item->text); ?>
That was perfectly until 4.2.1 was installed. Now, even if I change in Step #2 event name "onPrepareContent" to "onAfterDisplayContent" or another events, nothing happens. At Step #3 i receive empty "$this->item->text"
I am really stucked with this problem. Please help, if possible.