Joomla 1.6 В joomla 1.7 при установке шаблона yootheme и при включ

Тема в разделе "Изменение шаблона (кастомизация)", создана пользователем happy46, 08.11.2011.

  1. Offline

    happy46 Пользователь

    Регистрация:
    26.02.2011
    Сообщения:
    62
    Симпатии:
    1
    Пол:
    Мужской
    В joomla 1.7.2 при установке шаблона yootheme exploer и при включение модуля меню появляется ошибка
    Код (PHP):
    1. 08.11.2011
    2. Путь на сайте
    3. Главная
    4.  
    5. Fatal error: Call to a member function get() on a non-object in Z:\home\localhost\www\baska\templates\yoo_explorer\warp\systems\joomla.1.6\menus\pre.php on line 60


    вот код pre.php:
    Код (PHP):
    1. <?php
    2. /**
    3. * @package   Warp Theme Framework
    4. * @file      pre.php
    5. * @version   5.5.11
    6. * @author    YOOtheme http://www.yootheme.com
    7. * @copyright Copyright  2007 - 2011 YOOtheme GmbH
    8. * @license   YOOtheme Proprietary Use License (http://www.yootheme.com/license)
    9. */
    10.  
    11. /*
    12.     Class: WarpMenuPre
    13.         Menu base class
    14. */
    15. class WarpMenuPre extends WarpMenu {
    16.  
    17.     /*
    18.         Function: process
    19.  
    20.         Returns:
    21.             Xml Object
    22.     */ 
    23.     function process($module, $xmlobj) {
    24.  
    25.         if ($ul = $xmlobj->document->getElement('ul')) {
    26.             $this->_process($module, $ul);
    27.             return $ul;
    28.         }
    29.  
    30.         return false;
    31.     }
    32.  
    33.     function _process($module, $xmlobj, $level = 0) {
    34.  
    35.         $menu   = JSite::getMenu();
    36.         $images = strpos($module->parameter->get('class_sfx'), 'images-off') === false;
    37.  
    38.         foreach ($xmlobj->children('li') as $li) {
    39.  
    40.             // get menu item id
    41.             $id = (int) str_replace('item-', '', $li->_attributes['id']);
    42.  
    43.             // is current/active ?
    44.             if ($li->hasClass('current')) {
    45.                 $isActive = 2;
    46.             } else if ($li->hasClass('active')) {
    47.                 $isActive = 1;
    48.             } else {
    49.                 $isActive = 0;
    50.             }
    51.  
    52.             // reset attributes
    53.             $li->_attributes = array();
    54.  
    55.             // get menu item params
    56.             $item = $menu->getItem($id);
    57.  
    58.             // get class suffix params
    59.             $page_params = array();
    60.             $parts = preg_split('/[\s]+/', $item->params->get('pageclass_sfx'));
    61.  
    62.             foreach ($parts as $part) {
    63.                 if (strpos($part, '-') !== false) {
    64.                     list($name, $value) = explode('-', $part, 2);
    65.                     $page_params[$name] = $value;
    66.                 }
    67.             }
    68.  
    69.             $columns     = isset($page_params['columns']) ? (int) $page_params['columns'] : 1;
    70.             $columnwidth = isset($page_params['columnwidth']) ? (int) $page_params['columnwidth'] : -1;
    71.  
    72.             $li->addAttribute('data-menu-active', $isActive);
    73.             $li->addAttribute('data-menu-columns', $columns);
    74.             $li->addAttribute('data-menu-columnwidth', $columnwidth);
    75.  
    76.             // add item background image
    77.             if ($item->params->get('menu_image') && $item->params->get('menu_image') != -1) {
    78.                 if (isset($li->_children[0])) {
    79.  
    80.                     $img  = $li->_children[0]->child('img');
    81.                     $span = $li->_children[0]->child('span');
    82.  
    83.                     if (!$span) {
    84.                         $li->_children[0]->createElement('span', $item->title);
    85.                     }
    86.  
    87.                     $li->_children[0]->removeChild($img);
    88.  
    89.                     if ($images) {
    90.                         $img = $item->params->get('menu_image');
    91.                         $li->_children[0]->_children[0]->addAttribute('data-menu-image', JURI::base().$img);
    92.                     }
    93.                 }
    94.             }
    95.  
    96.             $childList = $li->child('ul');
    97.  
    98.             if ($childList) {
    99.                 $this->_process($module, $childList, ($level+1));                  
    100.             }
    101.  
    102.             if ($li->child('a')) {
    103.                 $link = $li->child('a');
    104.                 if (!count($link->_children)) {
    105.                     $link->parse('<span>'.$link->_data.'</span>');
    106.                     $link->_data = null;
    107.                 }
    108.             }
    109.  
    110.         }
    111.  
    112.     }
    113.  
    114. }


    Из-за чего этого?
     
  2.  

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

Загрузка...