LiveInternetMail.ru
Форум русской поддержки Joomla!® CMS
28.05.2012, 02:01:45 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
   
   Начало   Поиск Joomla 1.7 FAQ Joomla 1.5 FAQ Joomla 1.0 FAQ Правила форума Новости Joomla Войти Регистрация Помощь  
Страниц: [1]   Вниз
  Добавить закладку  |  Печать  
Автор Тема: [Решено] JComments + DocMan 1.5  (Прочитано 3416 раз)
0 Пользователей и 1 Гость смотрят эту тему.
krox
Осваиваюсь на форуме
***

Репутация: +78/-0
Offline Offline

Пол: Мужской
Сообщений: 86


« : 09.01.2010, 18:34:17 »

инструкция по интеграции для DocMan 1.4 уже устарела  Cry

нужен новый способ по интеграции JComments в DocMan 1.5.x

DocMan 1.5.x можно взять тут - http://joomlaforum.ru/index.php/topic,95514.0.html

щас попытаюсь сам что-нибудь придумать, возможно переделав одну из кнопок в DocMan 1.5  Smiley
« Последнее редактирование: 15.01.2010, 18:19:41 от krox » Записан
krox
Осваиваюсь на форуме
***

Репутация: +78/-0
Offline Offline

Пол: Мужской
Сообщений: 86


« Ответ #1 : 09.01.2010, 19:48:28 »

пытался сам сделать ещё одно всплывающее окошко типа как на кнопке "Подробнее", в итоге чуть компонент не угробил)
так что тут вижу два варианта интеграции:
1. В виде всплывающего окошка с комментариями
2. Спойлер, в котором будут скрыты все комментарии
Записан
krox
Осваиваюсь на форуме
***

Репутация: +78/-0
Offline Offline

Пол: Мужской
Сообщений: 86


« Ответ #2 : 15.01.2010, 18:19:01 »

если убить всплывающее окно на "Кнопке" подробнее, можно юзать инструкцию для версии 1.4.
P.S> тему можно закрывать
Записан
wfedin
Живу я здесь
******

Репутация: +45/-2
Online Online

Пол: Мужской
Сообщений: 963



« Ответ #3 : 02.02.2010, 22:27:59 »

А если нетрудно, можно подробнее инструкцию написать? Я в этой ничего непонял, для начинающих бы пошагово, чего и куда
Записан
Hantimer
Захожу иногда
**

Репутация: +1/-0
Offline Offline

Сообщений: 17


« Ответ #4 : 18.03.2010, 19:09:17 »

Ребята расскажите подробнее! Cry
Записан
zromualdo
Давно я тут
****

Репутация: +4/-0
Offline Offline

Пол: Мужской
Сообщений: 201



« Ответ #5 : 23.03.2010, 14:11:08 »

Подробнее расскажите ребята! Azn
Записан
zromualdo
Давно я тут
****

Репутация: +4/-0
Offline Offline

Пол: Мужской
Сообщений: 201



« Ответ #6 : 24.03.2010, 14:57:30 »

как его убить? вот весь код файла

site/components/com_docman/themes/default/templates/documents/document.tpl.php

Код:
<?php
/**
 * @version $Id: document.tpl.php 1262 2010-02-17 19:27:28Z mathias $
 * @category DOCman
 * @package DOCman15
 * @copyright Copyright (C) 2003 - 2009 Johan Janssens and Mathias Verraes. All rights reserved.
 * @license     This file can not be redistributed without the written consent of the
  original copyright holder. This file is not licensed under the GPL.
 * @link      http://www.joomladocman.org
 */
defined('_JEXEC') or die('Restricted access');


/*
* Display document details (required)
*
* General variables  :
* $this->theme->path (string) : template path
* $this->theme->name (string) : template name
* $this->theme->conf (object) : template configuartion parameters
* $this->theme->icon (string) : template icon path
*   $this->theme->png  (boolean): browser png transparency support
*
* Template variables :
* $this->data (object) : holds the document data
*   $this->links (object) : holds the document operations
*   $this->paths (object) : holds the document paths
*/

$mainframe = JFactory::getApplication();
$pathway  = & $mainframe->getPathWay();
$pathway->addItem($this->data->dmname);

$mainframe->setPageTitle( _DML_TPL_TITLE_DETAILS . ' | ' . $this->data->dmname );
?>

<div id="dm_details">


<h1 class="dm_title"><?php echo _DML_TPL_DETAILSFOR ?><em>&nbsp;<?php echo htmlspecialchars($this->data->dmname)?></em></h1>

<?php
if ($this->data->dmthumbnail) :
?><img src="<?php echo $this->paths->thumb ?>" alt="<?php echo htmlspecialchars($this->data->dmname)?>" /><?php
endif;
?>

<table summary="<?php echo htmlspecialchars($this->data->dmname)?>" cellspacing="0" >

<col id="prop" />
<col id="val" />
<thead>
<tr>
<td><?php echo _DML_PROPERTY?></td><td><?php echo _DML_VALUE?></td>
</tr>
</thead>
<tbody>
<?php
if($this->theme->conf->details_name) :
?>
<tr>
  <td><strong><?php echo _DML_TPL_NAME ?>:</strong></td><td><?php echo htmlspecialchars($this->data->dmname)?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_description) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_DESC ?>:</strong></td><td><?php echo $this->data->dmdescription ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_filename) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_FNAME ?>:</strong></td><td><?php echo htmlspecialchars($this->data->filename)?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_filesize) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_FSIZE ?>:</strong></td>
  <td><?php if ($this->data->filesize == 'Link') { echo _DML_UNKNOWN; } else { echo $this->data->filesize; } ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_filetype) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_FTYPE ?>:</strong></td><td><?php echo $this->data->filetype ?>&nbsp;(<?php echo _DML_TPL_MIME.":&nbsp;".$this->data->mime ?>)</td>
</tr>
<?php
endif;
if($this->theme->conf->details_submitter) :
?>
<tr>
  <td><strong><?php echo _DML_TPL_SUBBY ?>:</strong></td><td><?php echo $this->data->submited_by ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_created) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_SUBDT ?></strong></td>
  <td>
  <?php  $this->plugin('dateformat', $this->data->dmdate_published , _DML_TPL_DATEFORMAT_LONG); ?>
  </td>
  </tr>
<?php
endif;
if($this->theme->conf->details_readers) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_OWNER ?>:</strong></td><td><?php echo $this->data->owner ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_maintainers) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_MAINT ?>:</strong></td><td><?php echo $this->data->maintainedby ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_downloads) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_HITS ?>:</strong></td><td><?php echo $this->data->dmcounter."&nbsp;"._DML_TPL_HITS ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_updated) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_LASTUP ?>:</strong></td>
  <td>
  <?php  $this->plugin('dateformat', $this->data->dmlastupdateon , _DML_TPL_DATEFORMAT_LONG); ?>
  </td>
  </tr>
<?php
endif;
if($this->theme->conf->details_homepage) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_HOME ?>:</strong></td><td><?php echo $this->data->dmurl ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_crc_checksum) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_CRC_CHECKSUM ?>:</strong></td><td><?php echo $this->data->params->get('crc_checksum'); ?></td>
  </tr>
<?php
endif;
if($this->theme->conf->details_md5_checksum) :
?>
  <tr>
  <td><strong><?php echo _DML_TPL_MD5_CHECKSUM ?>:</strong></td><td><?php echo $this->data->params->get('md5_checksum'); ?></td>
  </tr>
<?php
endif;
?>
</tbody>
</table>
<div class="clr"></div>
</div>

<?php if(JRequest::getString('tmpl')!= 'component') :?>
    <div class="dm_taskbar">
    <ul>
    <?php
    unset($this->buttons['details']);
    $this->doc = &$this;
    include $this->loadTemplate('documents'.DS.'tasks.tpl.php');
    ?>
    <li><a href="javascript: history.go(-1);"><?php echo _DML_TPL_BACK ?></a></li>
    </ul>
    </div>
<?php endif; ?>

<div class="clr"></div>
Записан
Hantimer
Захожу иногда
**

Репутация: +1/-0
Offline Offline

Сообщений: 17


« Ответ #7 : 26.03.2010, 20:21:06 »

Ура друзья решение найдено  Yes! для версии DocMan 1.5x
Вставьте данный код в конец файла /components/com_docman/themes/default/templates/documents/document.tpl.php 


<?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);
  }
?>
Записан
Parkan
Захожу иногда
**

Репутация: +0/-0
Offline Offline

Сообщений: 22


« Ответ #8 : 25.04.2010, 21:45:49 »

Ничего не понятно! Форма для комментариев появляется ТОЛЬКО при нажатии кнопки "Подробно"! Как сделать, что форма была сразу?
Записан
zromualdo
Давно я тут
****

Репутация: +4/-0
Offline Offline

Пол: Мужской
Сообщений: 201



« Ответ #9 : 25.04.2010, 21:57:23 »

по-моему в этом файловом архиве только так
Записан
Parkan
Захожу иногда
**

Репутация: +0/-0
Offline Offline

Сообщений: 22


« Ответ #10 : 25.04.2010, 23:11:40 »

блин это убого, да и само окно всплывающее убогое криво работает. Как убить окно всплывающее? чтобы страница тупо обновлялась?
Записан
zromualdo
Давно я тут
****

Репутация: +4/-0
Offline Offline

Пол: Мужской
Сообщений: 201



« Ответ #11 : 26.04.2010, 17:09:55 »

я поставил версию 1.4. там нет всплывающего и все ок работает.
Записан
Parkan
Захожу иногда
**

Репутация: +0/-0
Offline Offline

Сообщений: 22


« Ответ #12 : 26.04.2010, 19:13:58 »

если вставлять предложенный код в файл плагина standartbuttons уже что-то похожее как нужно получается. Тока портится структура сайта.
Записан
bhakta
Осваиваюсь на форуме
***

Репутация: +3/-0
Offline Offline

Сообщений: 27


« Ответ #13 : 30.11.2010, 07:16:17 »

Ура друзья решение найдено  Yes! для версии DocMan 1.5x
Вставьте данный код в конец файла /components/com_docman/themes/default/templates/documents/document.tpl.php 


<?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);
  }
?>
Воспользовался данным способом. Получилось более мене полноценно вывести JComments в DocMan 1.5.2

Редактируем  /components/com_docman/themes/default/templates/documents/document.tpl.php
Вот что от него осталось. Можете вставить вместо своего.
Код:

<?php
/**
 * @version $Id: document.tpl.php 1121 2010-01-14 20:17:39Z mathias $
 * @category DOCman
 * @package DOCman15
 * @copyright Copyright (C) 2003 - 2009 Johan Janssens and Mathias Verraes. All rights reserved.
 * @license     This file can not be redistributed without the written consent of the
  original copyright holder. This file is not licensed under the GPL.
 * @link      http://www.joomladocman.org
 */
defined('_JEXEC') or die('Restricted access');


/*
* Display document details (required)
*
* General variables  :
* $this->theme->path (string) : template path
* $this->theme->name (string) : template name
* $this->theme->conf (object) : template configuartion parameters
* $this->theme->icon (string) : template icon path
*   $this->theme->png  (boolean): browser png transparency support
*
* Template variables :
* $this->data (object) : holds the document data
*   $this->links (object) : holds the document operations
*   $this->paths (object) : holds the document paths
*/

$mainframe = JFactory::getApplication();
$pathway  = & $mainframe->getPathWay();
$pathway->addItem($this->data->dmname);

$mainframe->setPageTitle( _DML_TPL_TITLE_DETAILS . ' | ' . $this->data->dmname );
?>

<div id="dm_details">


<h1 class="dm_title"><?php echo _DML_TPL_DETAILSFOR ?><em>&nbsp;<?php echo htmlspecialchars($this->data->dmname)?></em></h1>

<?php
if ($this->data->dmthumbnail) :
?><img src="<?php echo $this->paths->thumb ?>" alt="<?php echo htmlspecialchars($this->data->dmname)?>" /><?php
endif;
?><br /><?php echo $this->data->dmdescription ?>

<div class="clr"></div>
</div>

<?php if(JRequest::getString('tmpl')!= 'component') :?>
    <div class="dm_taskbar" >
    <ul>
    <?php
    unset($this->buttons['details']);
    $this->doc = &$this;
    include $this->loadTemplate('documents/tasks.tpl.php');
    ?>
    <li><a href="javascript: history.go(-1);"><?php echo _DML_TPL_BACK ?></a></li>
    </ul>
    </div>
<?php endif; ?>

<div class="clr"></div>

<?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 JComments::showComments($this->data->id, 'com_docman', $this->data->dmname);
  }
?>
<div class="clr"></div>


Далее выводим ссылки на скачиваемые файлы с помошью "mod_docman_lister"
Причем "Link type" : Show details pages
Записан
Страниц: [1]   Вверх
  Добавить закладку  |  Печать  
 
Перейти в:  

Рейтинг@Mail.ru Rambler Top100 Powered by SMF 1.1.16 | SMF © 2006, Simple Machines

Joomlaforum.ru is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters
the trademark holder in the United States and other countries.

LiveInternet