embedding serendipity in an existing smarty environment
Posted: Wed Feb 07, 2007 11:38 pm
Hey to all,
i got an existing webpage with an smarty environment. There i do have an index.php where i am requiring my blogwrapper.php and including all specific templates.
now i got my blog.tpl where i included my defined variable $blog like this:
This works, i see the s9y startpage embedded in my webpage.
the folder structure is like this:
htdocs/index.php
htdocs/manyotherstuff
htdocs/templates/alltempates
htdocs/templates/blog.tpl (my template where i am including the output of serendipity)
htdocs/blog here is my serendipity installation with its own index.php
so here is my htdocs/blogwrapper.php
so if iam now opening my page http://mypagebla.com/index.php?action=about
i am seeing all my navigation elements, header, footer and in the middle there is my s9y blog and its showing me some entries with their headings.
if i want to open an entry, the entry is not found, i am just getting a blank page.
i know why. It tries to get the html file from somewhere but it is not finding it. I changed the IndexFile to "index.php" (would mean the blog/index.php) and to "../index.php" (the one for the originating page) and i also tried to get a another blogwrapper.php in the blog/ dir because i thought this could handle the output and pass it back to the ../index.php.
But nothing worked. I think maybe i should include the output of s9y in another way not by getting it directly into my smarty engine? Or did i just typed some paths wrong in my blogwrapper.php?
When i changed my IndexFile to blogwrapper.php it allways tried to call
http://mypagebla.com/blog/blogwrapper.p ... entry,html
but this wasnt found.
Help would be highly appreciated. I love serendipity and got it installed for a customer and for my personal blog and the current installation i am working on is for a filespace provider. s9y is really a great application. BIG UP!
thanks in advance,
greeting from germany
sebastian
i got an existing webpage with an smarty environment. There i do have an index.php where i am requiring my blogwrapper.php and including all specific templates.
Code: Select all
...
//get blog output
require('blogwrapper.php');
...
case 'about':
$FSP->tpl->assign("blog",$serendipity_contents);
$FSP->tpl->display('header.tpl');
$FSP->tpl->display('left_navi.tpl');
$FSP->tpl->display('blog.tpl');
$FSP->tpl->display('right_navi.tpl');
//$FSP->tpl->display('about.tpl');
$FSP->tpl->display('footer.tpl');
break;
...
Code: Select all
{$blog}the folder structure is like this:
htdocs/index.php
htdocs/manyotherstuff
htdocs/templates/alltempates
htdocs/templates/blog.tpl (my template where i am including the output of serendipity)
htdocs/blog here is my serendipity installation with its own index.php
so here is my htdocs/blogwrapper.php
Code: Select all
<?
ob_start();
$a = getcwd();
chdir($a."/blog");
require("index.php");
chdir($a);
$serendipity_contents = ob_get_contents();
ob_end_clean();
?>i am seeing all my navigation elements, header, footer and in the middle there is my s9y blog and its showing me some entries with their headings.
if i want to open an entry, the entry is not found, i am just getting a blank page.
i know why. It tries to get the html file from somewhere but it is not finding it. I changed the IndexFile to "index.php" (would mean the blog/index.php) and to "../index.php" (the one for the originating page) and i also tried to get a another blogwrapper.php in the blog/ dir because i thought this could handle the output and pass it back to the ../index.php.
But nothing worked. I think maybe i should include the output of s9y in another way not by getting it directly into my smarty engine? Or did i just typed some paths wrong in my blogwrapper.php?
When i changed my IndexFile to blogwrapper.php it allways tried to call
http://mypagebla.com/blog/blogwrapper.p ... entry,html
but this wasnt found.
Help would be highly appreciated. I love serendipity and got it installed for a customer and for my personal blog and the current installation i am working on is for a filespace provider. s9y is really a great application. BIG UP!
thanks in advance,
greeting from germany
sebastian