Интеграция JComments в галерею изображений RSGallery2
									 | 
							
			
			
		
				
			| 
				 RSGallery2 — неплохой компонент галереи изображений для Joomla. Однако, как и во многих других компонентах галерей изображений, возможности встроенной системы комментариев весьма ограничены. Предлагаемая вашему вниманию интеграция заменяет встроенную систему комментариев на JComments.  
    - Откройте файл /components/com_rsgallery2/templates/tables/display.class.php
 
    - Найдите строчку:
                $this->_showComments(); 
    и замените их на:
 
      global $mosConfig_absolute_path;
      $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
      if (file_exists($comments)) {
        require_once($comments);
        $obj_id = $this->item['id'];
        $obj_title = $this->item['title'];
        echo JComments::showComments($obj_id, 'com_rsgallery2', $obj_title);
      } 
    - Откройте файл /administrator/components/com_rsgallery2/admin.rsgallery2.php
 
    - Найдите строчку:
        require_once( $rsgOptions_path . 'comments.php' ); 
    и замените ее на:
      global $mosConfig_absolute_path;
      $comments = $mosConfig_absolute_path . '/components/com_jcomments/jcomments.php';
      if (file_exists($comments)) {
        require_once($comments);
        mosRedirect( 'index2.php?option=com_jcomments&task=view&fog=com_rsgallery2' );
      } else { require_once( $rsgOptions_path . 'comments.php' ); } 
 
 
Полезные ссылки: 
			 |