Форум SAPE.RU

Форум SAPE.RU (http://forum.sape.ru/index.php)
-   Установка кода на различные движки (http://forum.sape.ru/forumdisplay.php?f=26)
-   -   Как поставить код на редиректный сайт? (http://forum.sape.ru/showthread.php?t=6046)

zmakov 13.11.2007 20:08

Как поставить код на редиректный сайт?
 
Есть сайт.

В корне лежит index.php, который содержит код:

<?php
header('Location: pub/index.php');
?>

Соответственно pub/index.php содержит:

<?php
require_once '../lib/settings.inc';
if (defined('IS_DEBUG')) if (1 == IS_DEBUG) require_once '../component/fx/tm_in.inc.php';
// require_once '../component/shared.inc.php';
require_once '../lib/smarty/Smarty.class.php';

$tpl =& new Smarty;
$tpl->assign('page', 'news_list');
$tpl->display('common.tpl');

if (defined('IS_DEBUG')) if (1 == IS_DEBUG) require_once '../component/fx/tm_out.inc.php';
/*

require_once '../lib/smarty/Smarty.class.php';

$tpl =& new Smarty;
$tpl->assign('page', 'index');
$tpl->display('common.tpl');
*/
?>


PHP код сапы вставляю в templates/common.tpl

При регистрации в сапе указываю тему и урл видов:

site.ru
site.ru/index.php
site.ru/pub/index.php
site.ru/temmlates/common.tpl

однако на сайте во всех случаях выводится return_links(); ?>

Добавлял
AddHandler application/x-httpd-php .php .htm .html
но хостинг итак 100% поддерживает PHP

Помогите правильно установить код.

rilian 13.11.2007 20:10

в поиске ищите smarty

stanbert 13.11.2007 20:45

все правильно шаблон и выводит.
В данном случае необходимо код Сапы вставлять в pub/index.php в виде

/*----*/
все что до return_links();
/*----*/
$tpl->assign('SAPE', $sape->return_links());

а в шаблон templates/common.tpl в нужном месте вставить {$SAPE}
все будет отлично работать. У меня работает :)


Часовой пояс GMT +3, время: 15:03.

Работает на vBulletin® версия 3.8.7.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
SAPE.RU — система купли-продажи ссылок с главных и внутренних страниц сайтов.