Инструкция по установке кода SAPE на страницы форума IPB 3.
Ваш форум установлен в папку “forum”, а папка кода SAPE расположена на одном уровне с каталогом форума.
В файле:
forum/admin/sources/classes/output/publicOutput.phpНайти:
//-----------------------------------------
// Print it...
//-----------------------------------------
$this->outputFormatClass->printHeader();
/* Remove unused hook comments */
$output = preg_replace( "#<!--hook\.([^\>]+?)-->#", '', $output );
/* Insert stats */
$output = str_replace( '<!--DEBUG_STATS-->', $this->outputFormatClass->html_showDebugInfo(), $output );
print $output;
Заменить на:
//-----------------------------------------
// Print it...
//-----------------------------------------
$this->outputFormatClass->printHeader();
/* Remove unused hook comments */
$output = preg_replace( "#<!--hook\.([^\>]+?)-->#", '', $output );
/* Insert stats */
$output = str_replace( '<!--DEBUG_STATS-->', $this->outputFormatClass->html_showDebugInfo(), $output );
if (!defined('_SAPE_USER')){
define('_SAPE_USER', 'название папки sape');
}
require_once( 'полный путь к sape.php' );
$sape = new SAPE_client();
$linkersy = "";
$linkersy = $sape->return_links();
print str_replace( 'Inset Sape Links Here', $linkersy, $output );В шаблоны вставьте:
Inset Sape Links HereЭтот код будет заменяться на ссылки.

Главная
