Модераторы: skyboy, MoLeX, Aliance, ksnk
  

Поиск:

Ответ в темуСоздание новой темы Создание опроса
> Ошибка syntax error, unexpected T_CLASS, Parse error: syntax error, unexpected 
:(
    Опции темы
xxi
Дата 15.5.2012, 19:26 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Новичок



Профиль
Группа: Участник
Сообщений: 1
Регистрация: 15.5.2012

Репутация: нет
Всего: нет



поставил на сайт joomla и к ней решил прицепить модуль icetabs, на сайте появилась такая строчка:
Parse error: syntax error, unexpected T_CLASS in /home/n/nspaceru/studacademia/public_html/modules/mod_icetabs/helper.php on line 26
Код

<?php 
/**
 * $ModDesc
 * 
 * @version        $Id: helper.php $Revision
 * @package        modules
 * @subpackage    $Subpackage.
 * @copyright    Copyright (C) Dec 2009 IceTheme.com.All rights reserved.
 * @license        GNU General Public License version 2
 * -------------------------------------
 * Based on Module Libs From LandOfCoder
 * @copyright (C) May 2010 LandOfCoder.com <@emai:[email protected], @site: http://landofcoder.com>. 
 */
// no direct access
defined('_JEXEC') or die;

require_once JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php';
if( !defined('PhpThumbFactoryLoaded') ) {
    require_once dirname(__FILE__).DS.'libs'.DS.'phpthumb'.DS.'ThumbLib.inc.php';
    define('PhpThumbFactoryLoaded',1);
}
if( !class_exists('LofSliderGroupBase') ){
    require_once( dirname(__FILE__).DS.'libs'.DS.'group_base.php' );
}

abstract class modIceTabsHelper {
    
    /**
     * get list articles
     */
    public static function getList( $params ){
        if ( $params->get('enable_cache') ) {
            $cache =& JFactory::getCache('mod_icetabs');
            $cache->setCaching( true );
            $cache->setLifeTime( $params->get( 'cache_time', 15 ) * 60 );    
            return $cache->get( array( 'modIceTabsHelper' , 'getGroupObject' ), array( $params ) ); 
        } else {
            return self::getGroupObject( $params );
        }    
    }
    
    /**
     * get list articles
     */
    public static function getGroupObject( $params ){
        $group = $params->get( 'group', 'content' );
        $file = dirname(__FILE__).DS.'libs'.DS.'groups'.DS.strtolower($group).DS.strtolower($group).'.php';    
        if( file_exists($file) ){
            require_once( $file );
            $className = 'LofSliderGroup'.ucfirst($group);
            if( class_exists($className) ){
                $object = new $className( $group );                    
                $object->setCurrentPath(  dirname(__FILE__).DS.'libs'.DS.'groups'.DS.strtolower($group).DS );                            
            }
        }
        if( $object ){
            return $object->getListByParameters( $params );    
        } else {
            return array();
        }
    }
    

    /**
     * load css - javascript file.
     * 
     * @param JParameter $params;
     * @param JModule $module
     * @return void.
     */
    public static function loadMediaFiles( $params, $module, $theme='' ){
            global $mainframe;
        // if the verion is equal 1.6.x
        if( JVersion::isCompatible('1.6.0') ) {    
            JHTML::script( 'script_16.js','modules/'.$module->module.'/assets/');
        } else {
            JHTML::script( 'script_15.js','modules/'.$module->module.'/assets/');
        }
                
        if( $theme && $theme != -1 ){
            $tPath = JPATH_BASE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.$module->module.'_'.$theme.'.css';
            if( file_exists($tPath) ){
                JHTML::stylesheet( $module->module.'_'.$theme.'.css','templates/'.$mainframe->getTemplate().'/css/');
            } else {
                JHTML::stylesheet('style.css','modules/'.$module->module.'/themes/'.$theme.'/assets/');    
            }
        } else {
            JHTML::stylesheet( 'style.css','modules/'.$module->module.'/assets/' );    
        }
        // load js of modalbox
        if( $params->get('load_jslibs','modal') && !defined('LOF_ADDED_MODALBOX') && $params->get('open_target','')== 'modalbox' ){
                $doc =& JFactory::getDocument();
                $string  = '<script type="text/javascript">';
                $string .= "
                    var box = {};
                    window.addEvent('domready', function(){
                        box = new MultiBox('mb', {  useOverlay: false,initialWidth:1000});
                    });
                ";
                $string .= '</script>';
                $doc->addCustomTag( $string );
                JHTML::stylesheet( 'multibox.css','modules/'.$module->module.'/assets/multibox/');
                JHTML::script( 'multibox.js','modules/'.$module->module.'/assets/multibox/');
                JHTML::script( 'overlay.js','modules/'.$module->module.'/assets/multibox/');
        }
    }
    
    /**
     *
     */
    public function renderItem( &$row, $params, $layout='_item' ){
        $target = $params->get('open_target','_parent') != 'modalbox'
                            ? 'target="'.$params->get('open_target','_parent').'"'
                            : 'rel="'.$params->get('modal_rel','width:800,height:350').'" class="mb"'; 
                            
        $path = dirname(__FILE__).DS.'themes'.DS.$params->get('theme').DS;
        if( file_exists($path.$params->get('group').$layout.'.php') ){
            require( $path.$params->get('group').$layout.'.php' );
            return ;
        }
        require( $path.$layout.'.php' );
    }
    
    /**
     * load theme
     */
    public static function getLayoutByTheme( $module, $group, $theme= '' ){
        global $mainframe;
        $layout = '';
        if( $theme ) {
            $layout = $group.DS.trim($theme).'_default';    
        }
        // Build the template and base path for the layout
        $tPath = JPATH_BASE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.$module->module.DS.$layout.'.php';
        $bPath = JPATH_BASE.DS.'modules'.DS.$module->module.DS.'tmpl'.DS.$layout.'.php';

        // If the template has a layout override use it
        if (file_exists($tPath)) {
            return $tPath;
        } elseif( file_exists($bPath) ) {
            return $bPath;
        }
        return JPATH_BASE.DS.'modules'.DS.$module->module.DS.'themes'.DS.$theme.DS.'default.php';
    }
}
?>



помогите решить проблему пожалуйста...
PM MAIL   Вверх
krypt3r
Дата 16.5.2012, 06:08 (ссылка) | (нет голосов) Загрузка ... Загрузка ... Быстрая цитата Цитата


Опытный
**


Профиль
Группа: Участник
Сообщений: 359
Регистрация: 9.6.2009

Репутация: 3
Всего: 16



PHP обновите
PM MAIL   Вверх
  
Ответ в темуСоздание новой темы Создание опроса
Правила форума "PHP"
Aliance
IZ@TOP
skyboy
SamDark
MoLeX

Новичкам:

  • PHP редакторы собираются и обсуждаются здесь
  • Электронные книги по PHP, документацию можно найти здесь
  • Интерпретатор PHP, полную документацию можно скачать на PHP.NET

Важно:

  • Не брезгуйте пользоваться тегами [code=php]КОД[/code] для повышения читабельности текста/кода.
  • Перед созданием новой темы воспользуйтесь поиском и загляните в FAQ
  • Действия модераторов можно обсудить здесь

Внимание:

  • Темы "ищу скрипт", "подскажите скрипт" и т.п. будут переноситься в форум "Web-технологии"
  • Темы с именами: "Срочно", "помогите", "не знаю как делать" будут УДАЛЯТЬСЯ

Если Вам понравилась атмосфера форума, заходите к нам чаще! С уважением, IZ@TOP, skyboy, SamDark, MoLeX, awers.

 
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей)
0 Пользователей:
« Предыдущая тема | PHP: Общие вопросы | Следующая тема »


 




[ Время генерации скрипта: 0.0508 ]   [ Использовано запросов: 22 ]   [ GZIP включён ]


Реклама на сайте     Информационное спонсорство

 
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности     Powered by Invision Power Board(R) 1.3 © 2003  IPS, Inc.