Embora o sistema de gerenciamento de arquivos Docman, não possua, de raiz, uma solução para comentários (Opinião de Leitores), deixo, neste artigo, uma possível forma de integrar o componente JComments com o Docman. Não é a solução ideal, mas como não é previsível que o gestor de Documentos Docman venha a adoptar, a breve prazo, um sistema de comentários, esta será uma solução possível.
Where to place the code / File?
Open:
/public_html/components/com_docman/themes
choose you theme:
/public_html/components/com_docman/themes/default/templates
choose folder categories or documents:
/public_html/components/com_docman/themes/default/templates/categories
/public_html/components/com_docman/themes/default/templates/documents
Choose file under …/categories:
category.tpl.php
list.tpl.php
list_item.tpl.php
Choose file under …/documents:
document.tpl.php
list.tpl.php
list_item.tpl.php
Open the file, you have chosen, and at the end, paste the following code (by turminator):
[code] <?php
global $mainframe;
$lang =& JFactory::getLanguage();
$lang->load( ‘com_jcomments’, JPATH_SITE, null, true );
$comments = JPATH_SITE . ‘/components/com_jcomments/jcomments.php’;
if (file_exists($comments)) {
require_once($comments);
echo ‘<br />’;
// echo ‘<div class=”contentheading”>’. JText::_(‘HEADER’) .”;
echo JComments::showComments($this->data->id, ‘com_docman’, $this->data->dmname);
}
?>[/code]
In my case, I’ve decided to put the code here:
/public_html/components/com_docman/themes/default/templates
page_docbrowse.tpl.php (at the end of the file)
If you prefer, you can download the file directly in my web page, and replace it on your site.
Download:
Commnents for Docman – Comentários para o Docman (2.24 kB)
by Helder Valdez
23 Abril, 2011
in Joomla
Sem comentários
840
Where to place the code / File?
Open:
/public_html/components/com_docman/themes
choose you theme:
/public_html/components/com_docman/themes/default/templates
choose folder categories or documents:
/public_html/components/com_docman/themes/default/templates/categories
/public_html/components/com_docman/themes/default/templates/documents
Choose file under …/categories:
category.tpl.php
list.tpl.php
list_item.tpl.php
Choose file under …/documents:
document.tpl.php
list.tpl.php
list_item.tpl.php
Open the file, you have chosen, and at the end, paste the following code (by turminator):
[code] <?php
global $mainframe;
$lang =& JFactory::getLanguage();
$lang->load( ‘com_jcomments’, JPATH_SITE, null, true );
$comments = JPATH_SITE . ‘/components/com_jcomments/jcomments.php’;
if (file_exists($comments)) {
require_once($comments);
echo ‘<br />’;
// echo ‘<div class=”contentheading”>’. JText::_(‘HEADER’) .”;
echo JComments::showComments($this->data->id, ‘com_docman’, $this->data->dmname);
}
?>[/code]
In my case, I’ve decided to put the code here:
/public_html/components/com_docman/themes/default/templates
page_docbrowse.tpl.php (at the end of the file)
If you prefer, you can download the file directly in my web page, and replace it on your site.
Download:
Commnents for Docman – Comentários para o Docman (2.24 kB)
Recommended Posts
Joomla – Configuração do Frontpage SlideShow
23 Outubro, 2011
Instalar Frontpage SlideShow
23 Outubro, 2011
Joomla Easybook migrator 1.5 1.7
6 Outubro, 2011