Сапа и Livestreet
Кто ставил sape на Livestreet помогите осуществить это… я просто знаю в новой версии livestreet обновили smarty теперь нельзя пхп код использовать в шаблонах
{php}
if (!defined('_SAPE_USER')){
define('_SAPE_USER', '.............');
}
require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php');
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
echo $sape->return_links();
{/php}
{php}
if (!defined('_SAPE_USER')){
define('_SAPE_USER', '****');
}
require_once($_SERVER['DOCUMENT_ROOT'].'/'._SAPE_USER.'/sape.php');
$o['host'] = 'урл';
$o['charset'] = 'UTF-8';
$sape = new SAPE_client($o);
unset($o);
echo $sape->return_links($n);
{/php}
Fatal error: Uncaught exception 'SmartyException' with message '{php} is deprecated, set allow_php_tag = true to enable' in /home/engine/lib/external/Smarty/libs/plugins/block.php.php:21 Stack trace: #0 /home/templates/compiled/new-jquery/8899575646463252.file.sidebar.tpl.php(39): smarty_block_php(Array, NULL, Object(Smarty_Internal_Template), true) #1 /home/public_html/engine/lib/external/Smarty/libs/sysplugins/smarty_internal_template.php(437): include('/home/pub...') #2 /home/public_html/engine/lib/external/Smarty/libs/sysplugins/smarty_internal_template.php(572): Smarty_Internal_Template->renderTemplate() #3 /home/public_html/templates/compiled/new-jquery/1de48581dfaeaeed635d78fb073009ccdd4b1b1d.file.footer.tpl.php(29): Smarty_Internal_Template->getRenderedTemplate() #4 /home/engine/lib/external/Smarty/libs/sysplugins/smarty_internal_template.php(437): include('/home/pub...') #5 /home/klyet/public_html/engine/li in /home/engine/lib/external/Smarty/libs/plugins/block.php.php on line 21
$this->_aData['topic_text_short'] = str_replace("<a ","<a rel='nofollow' ",$this->_aData['topic_text_short']);
if (!defined('_SAPE_USER'))
{
define('_SAPE_USER', 'YOUR_SAPE_ID');
}
$config = array(
//'force_show_code' => true,
'charset' => 'UTF-8'
);
Есть строка return_links(); ?>я выполнил, но не помогло, прошу помочь с решением этой проблемы
Это означает, что страницы вашего сайта не обрабатываются PHP. Для включения обработки PHP достаточно прописать в файле .htaccess (он должен находиться в корневой директории сайта) следующие строки
1
RemoveHandler .php .htm .html
2
AddHandler application/x-httpd-php .php .htm .html
Если файла не существует — его можно создать в блокноте и закачать в корень сайта.
Warning: require_once(/home/httpd/vhosts/maxguns.ru/httpdocs/c17d6931cc55f5a4191cd0b51239803d/sape.php) [function.require-once]: failed to open stream: Нет такого файла или каталога in /home/httpd/vhosts/maxguns.ru/httpdocs/templates/compiled/new/%%9C^9C8^9C8CAA4B%%sidebar.tpl.php on line 31
Fatal error: require_once() [function.require]: Failed opening required '/home/httpd/vhosts/maxguns.ru/httpdocs/c17d6931cc55f5a4191cd0b51239803d/sape.php' (include_path='.:/usr/share/pear:/usr/share/php:/home/httpd/vhosts/maxguns.ru/httpdocs:/home/httpd/vhosts/maxguns.ru/httpdocs/engine/classes') in /home/httpd/vhosts/maxguns.ru/httpdocs/templates/compiled/new/%%9C^9C8^9C8CAA4B%%sidebar.tpl.php on line 31