Jump to content


Photo
- - - - -

Подключить zoo в стороннем скрипте


Best Answer pandaz , 14 May 2014 - 11:36

Решил проблему путем замены

 

define('JPATH_BASE', dirname(__FILE__) . '/..' );

 

на 

 

define('JPATH_BASE', 'путь к корню сайта' );

Go to the full post


  • This topic is locked This topic is locked
1 reply to this topic

#1 pandaz

pandaz
  • JBZoo User (rus)
  • User rate: 0.1
  • posts: 51
  • topics: 22

Posted 13 May 2014 - 21:27

У меня есть скрипт который будет выполняться по крону: [сайт]/regular/rating.php

Пытаюсь подключить к нему joomla и zoo.

 

Joomla подключается:

define('_JEXEC', 1);
define('JPATH_BASE', dirname(__FILE__) . '/..' );
define('DS', DIRECTORY_SEPARATOR);
require_once(JPATH_BASE.DS.'includes'.DS.'defines.php');
require_once(JPATH_BASE.DS.'includes'.DS.'framework.php');
JFactory::getApplication('site')->initialise();

А вот при попытке подключить zoo - ошибка.

Fatal error: Class 'systemHelper' not found in /Users/pandaz/sites/dayx.com.ua/administrator/components/com_zoo/framework/classes/app.php on line 162

 

Код которым я подключаю такой:

require_once(JPATH_BASE . '/administrator/components/com_zoo/config.php');
$app = App::getInstance('zoo');

Edited by pandaz, 14 May 2014 - 08:13.

  • 0

#2 pandaz

pandaz
  • Topic Starter
  • JBZoo User (rus)
  • User rate: 0.1
  • posts: 51
  • topics: 22

Posted 14 May 2014 - 11:36   Best Answer

Решил проблему путем замены

 

define('JPATH_BASE', dirname(__FILE__) . '/..' );

 

на 

 

define('JPATH_BASE', 'путь к корню сайта' );


  • 1




Click to return to top of page in style!