Интеграция JComments в файловый архив Remository
|
|
Remository — не менее популярный чем DocMan компонент файлового архива для Joomla. Предлагаемая вашему вниманию интеграция заменяет встроенные средства комментирования файлов на JComments.
- Откройте файл /components/com_remository/v-classes/remositoryFileInfoHTML.php
- Найдите в нем строки:
$commentsdb = $file->getComments();
if ($commentsdb){
$this->tabcnt = 1;
$legend = _DOWN_COMMENTS;
foreach ($commentsdb as $comment) $this->showComment($legend, $comment);
}
else {
$legend = $this->remUser->isLogged() ? _DOWN_FIRST_COMMENT : _DOWN_FIRST_COMMENT_NL;
$this->fileOutputBox('', '<strong>'.$legend.'</strong>');
}
if ($this->remUser->isLogged()) $this->commentBox($file);
и замените их на следующий код:
global $mosConfig_absolute_path;
$comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
if (file_exists($comments)) {
require_once($comments);
echo '<div style="clear: both;">';
echo JComments::showComments($file->id, 'com_remository', $file->filetitle);
echo '</div>';
}
Полезные ссылки:
|