Page 1 of 1

simple embedding

Posted: Wed Sep 28, 2005 8:43 pm
by volume4
Greetings All!

I have a simple php page here:
http://www.volume4.com/japarker/about_u ... tent=about

What is the simplest way to embed serendipity into this 'template'? I have searched the forum and found some direction but none that really addresses my situation(I might have missed something). :shock:

Any help or pointers to a tutorial/how-to would be extremely appreciated. Thank you!

Re: simple embedding

Posted: Thu Sep 29, 2005 2:26 pm
by garvinhicking
1. Either use an iframe to embed the s9y content into that content block, and edit your s9y template so that it does not print the "serendipity_banner" information in index.tpl

2. Or you search the forum and the s9y documentation for "embed", there have been many threads about the issue of embedding a script with the s9y api and using output buffering:
http://www.s9y.org/index.php?node=55
http://www.s9y.org/forums/viewtopic.php ... ed+obstart,
http://www.s9y.org/forums/viewtopic.php ... ed+obstart
http://www.s9y.org/forums/viewtopic.php ... ed+obstart
http://www.s9y.org/forums/viewtopic.php ... ed+obstart
http://www.s9y.org/forums/viewtopic.php ... ed+obstart
http://www.s9y.org/forums/viewtopic.php ... ed+obstart

Best regards,
Garvin

Posted: Thu Sep 29, 2005 4:51 pm
by volume4
Garvin

First thing, does Serendipity 0.8.4 work with PHP5? I have gotten it tto work standalone so I guess the answer is yes.

Now my problem is as follows:
1) I have a directory structure as follows:
* root
* newsforum (aka serendipity)
2) Within newsforum I have both the wrapper.php and content.php files.
3) In wrapper I have:
<?php
// Let serendipity generate our content:
ob_start();
require 'index.php';
$blog_data = ob_get_contents();
ob_end_clean();
require 'content.php';
?>
4) Inside my content.php I have: <?php echo $blog_data ?>
5) I have serendipity's Index File set to wrapper.php
6) Here is where the difference to the other come in:
When I link to http://localhost/japarker/newsforum/wrapper.php I get a blank screen. Absolutely nothing :( Even when selecting view source the source page is empty.

Any ideas? I am running on WindowsXP, Apache and PHP 5.0.3


Thanks a million!

Posted: Thu Sep 29, 2005 4:54 pm
by garvinhicking
First off, PHP5 compatibility should be ensured with all s9y releases, yes.

A blank page like yours usually happens when PHP coredumps or the apache process dies. Have you looked at access/error logs and looked for terminating childs? Try to check if the PHP errorlevel is high enough to report all errors?

Your setup of the files/embed machnism basically sounds correct!

Regards,
Garvin

Posted: Fri Sep 30, 2005 12:24 pm
by volume4
Thanks Garvin. Got it! I will post what I have done on my website and place a link to it here on the message board.

Posted: Sat Oct 01, 2005 4:23 am
by wesley
Just a side note: my s9y install was on PHP5 from day one and had no
problems whatsoever. Just an empirical evidence to throw in... ;)