ошибка при отображении шаблона

Тема в разделе "Ошибки при работе с Joomla", создана пользователем казявка, 17.10.2011.

  1. Offline

    казявка Недавно здесь

    Регистрация:
    03.10.2011
    Сообщения:
    4
    Симпатии:
    0
    Пол:
    Женский
    joomla 1.7.1 artisteer 3.устанавливаю шаблон-появляется ошибка

    Fatal error: Cannot access protected property ContentViewArticle::$user in Y:\home\localhost\www\joomla\templates\untitled\functions.php on line 40

    вот сам файл
    <?php
    defined('_JEXEC') or die;

    if (!defined('_ARTX_FUNCTIONS')) {

    define('_ARTX_FUNCTIONS', 1);

    $GLOBALS['artx_settings'] = array(
    'block' => array('has_header' => true),
    'menu' => array('show_submenus' => false),
    'vmenu' => array('show_submenus' => false, 'simple' => false)
    );

    class ArtxContentArticleView15
    {
    private $_document;
    private $_data;

    public $version;
    public $params;
    public $canEdit;
    public $pageHeadingVisible;
    public $pageHeading;
    public $titleVisible;
    public $titleLink;
    public $title;
    public $print;
    public $pdf;
    public $hits;
    public $parentCategoryVisible;
    public $categoryVisible;

    function __construct(&$document, &$item, &$params) {
    $this->_document = $document;
    $this->_data = array();

    $this->item = & $item;
    $this->params = & $params;

    $this->canEdit = $this->_document->user->authorize('com_content', 'edit', 'content', 'all') || $this->_document->user->authorize('com_content', 'edit', 'content', 'own');
    $this->pageHeadingVisible = $this->params->get('show_page_title', 1) && $this->params->get('page_title') != $this->item->title;
    $this->pageHeading = $this->params->get('page_title');
    $this->titleVisible = $this->params->get('show_title');
    $this->titleLink = ($this->params->get('link_titles') && !empty($this->item->readmore_link)) ? $this->item->readmore_link : '';
    $this->title = $this->item->title;
    $this->print = $this->print;
    $this->pdf = true;
    $this->hits = false;
    $this->parentCategoryVisible = $this->params->get('show_section') && $this->item->sectionid && isset($this->item->section);
    $this->categoryVisible = $this->params->get('show_category') && $this->item->catid;
    }

    function renderPageContainerBegin() {
    return '';
    }

    function renderPageHeading() {
    if ($this->pageHeadingVisible)
    return artxPost(array('header-text' => $this->_document->escape($this->pageHeading)));
    return '';
    }

    function getArticleViewParameters() {
    return array('metadata-header-icons' => array(), 'metadata-footer-icons' => array());
    }

    function renderCreateDateInfo() {
    return JHTML::_('date', $this->item->created, JText::_('DATE_FORMAT_LC2'));
    }

    function renderModifyDateInfo() {
    return JText::sprintf('LAST_UPDATED2', JHTML::_('date', $this->item->modified, JText::_('DATE_FORMAT_LC2')));
    }

    function renderPublishDateInfo() {
    return '';
    }

    function renderAuthorInfo() {
    return JText::sprintf('Written by', (!empty($this->item->created_by_alias)
    ? $this->_document->escape($this->item->created_by_alias)
    : $this->_document->escape($this->item->author)));
    }

    function renderPrintPopupIcon() {
    return JHtml::_('icon.print_popup', $this->item, $this->params, $this->_document->access);
    }

    function renderPrintScreenIcon() {
    return JHtml::_('icon.print_screen', $this->item, $this->params, $this->_document->access);
    }

    function renderEmailIcon() {
    return JHtml::_('icon.email', $this->item, $this->params, $this->_document->access);
    }

    function renderEditIcon() {
    return JHtml::_('icon.edit', $this->item, $this->params, $this->_document->access);
    }

    function renderPdfIcon() {
    return JHTML::_('icon.pdf', $this->item, $this->params, $this->_document->access);
    }

    function renderHitsInfo() {
    return '';
    }

    function renderCategories() {
    $result = JText::_('Category') . ': ';
    if ($this->parentCategoryVisible) {
    $result .= '<span class="art-post-metadata-category-parent">';
    $title = $this->_document->escape($this->item->section);
    if ($this->params->get('link_section'))
    $result .= '<a href="' . JRoute::_(ContentHelperRoute::getSectionRoute($this->item->sectionid)).'">' . $title . '</a>';
    else
    $result .= $title;
    $result .= '</span>';
    }
    if ($this->parentCategoryVisible && $this->categoryVisible)
    $result .= ' / ';
    if ($this->categoryVisible) {
    $result .= '<span class="art-post-metadata-category-name">';
    $title = $this->_document->escape($this->item->category);
    if ($this->params->get('link_category'))
    $result .= '<a href="' . JRoute::_(ContentHelperRoute::getCategoryRoute($this->item->catslug, $this->item->sectionid)) . '">' . $title . '</a>';
    else
    $result .= $title;
    $result .= '</span>';
    }
    return $result;
    }

    function renderArticle($article) {
    return artxPost($article);
    }

    function renderPageContainerEnd() {
    return '';
    }

    }

    class ArtxContentArticleView16
    {
    private $_document;

    public $version;
    public $params;
    public $canEdit;
    public $pageHeadingVisible;
    public $pageHeading;
    public $titleVisible;
    public $titleLink;
    public $title;
    public $print;
    public $pdf;
    public $hits;
    public $parentCategoryVisible;
    public $categoryVisible;

    function __construct(&$document, &$item, &$params) {
    $this->_document = $document;

    $this->item = & $item;
    $this->params = & $params;

    $this->canEdit = $document->user->authorise('core.edit', 'com_content.frontpage.' . $this->item->id);
    $this->pageHeadingVisible = $this->params->get('show_page_heading', 1);
    $this->pageHeading = $this->params->get('page_heading');
    $this->titleVisible = $this->params->get('show_title') || $this->params->get('access-edit');
    $this->titleLink = $this->params->get('link_titles') && !empty($this->item->readmore_link) ? $this->item->readmore_link : '';
    $this->title = $this->item->title;
    $this->print = $this->print;
    $this->hits = true;
    $this->pdf = false;
    $this->parentCategoryVisible = $this->params->get('show_parent_category') && $this->item->parent_slug != '1:root';
    $this->categoryVisible = $this->params->get('show_category');
    }
    ................



    что делать???
     
  2.  

Поделиться этой страницей

Загрузка...