simple embedding

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
volume4
Regular
Posts: 7
Joined: Wed Sep 28, 2005 8:12 pm
Location: South Africa
Contact:

simple embedding

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: simple embedding

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
volume4
Regular
Posts: 7
Joined: Wed Sep 28, 2005 8:12 pm
Location: South Africa
Contact:

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
volume4
Regular
Posts: 7
Joined: Wed Sep 28, 2005 8:12 pm
Location: South Africa
Contact:

Post 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.
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post 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... ;)
I make s9y plugins, too.
My s9y blog depends on them. :)
Post Reply