Integrating Pages *into* Serendipity
Posted: Sun Feb 20, 2005 8:40 pm
I'm using the following code to try to get some pages and scripts I have to use the layout I have for Serendipity.
This is also useful in case I change my template since it'll also affect my entire site without me having to do much code editing.
Problem is, that I get what I want but the plugins on the right do not show. It is the exact same code I copied from a post about integrating some gallery scripts into Serendipity.
Hope you can help. Thanks in advance!
Code: Select all
<?php
/* SERENDIPITY HOOK START */
$serendipity_directory = '/home/****/****/blog/';
$cwd = getcwd();
chdir($serendipity_directory);
define('S9Y_INCLUDE_PATH', $serendipity_directory);
include_once(S9Y_INCLUDE_PATH . 'serendipity_config.inc.php');
include_once(S9Y_INCLUDE_PATH . 'include/functions.inc.php');
include_once(S9Y_INCLUDE_PATH . 'include/plugin_api.inc.php');
include_once(S9Y_INCLUDE_PATH . 'include/plugin_internal.inc.php');
$serendipity['smarty_file'] = 'index.tpl';
$serendipity['smarty_raw_mode'] = false;
serendipity_smarty_init();
$serendipity['smarty']->assign(
array(
'leftSidebarElements' => serendipity_plugin_api::count_plugins('left'),
'rightSidebarElements' => serendipity_plugin_api::count_plugins('right')
)
);
chdir($cwd);
ob_start();
/* SERENDIPITY HOOK END */
include("mycontent.php");
serendipity_smarty_shutdown($serendipity_directory);
?>
Problem is, that I get what I want but the plugins on the right do not show. It is the exact same code I copied from a post about integrating some gallery scripts into Serendipity.
Hope you can help. Thanks in advance!