Page 1 of 1

Embedding serendipity in another page

Posted: Fri Dec 30, 2005 8:23 pm
by ebang
Is there a way that I can embed only my "news" category in an php page. Right now, I have my blog at http://blog.hungryhungryhypocrites.com and I'm wondering if I can embed only the news category entries in my http://news.hungryhungryhypocrites.com/news.php while having all of the entries on the blog.hhh.com page. Thanks

Re: Embedding serendipity in another page

Posted: Fri Dec 30, 2005 8:38 pm
by garvinhicking
How do you embed your pages currently?

You can embed a specific category only by setting

$_GET['serendipity']['category'] = XXX;

in your PHP wrapper.

If that doesn't help you much, please describe very detailed what it is that you're needing. Serendpity offers at least 4-5 methods to embed content: Via Smarty, via PHP, via the 'embed' directive, via a plugin, via RSS, via JavaScript/Iframes and maybe more I didn't instantly think of.

Best regards,
Garvin

Posted: Fri Dec 30, 2005 10:00 pm
by ebang
Now there's a good response.

Let's see. I embed using PHP right now. I use CuteNews to set up news on my site, but I think this would be better. Will the

Code: Select all

$_GET['serendipity']['category'] = XXX;
work if I host the blog on blog.hungryhungryhypocrites.com and want the news to appear on news.hungryhungryhypocrites.com?

Thanks a lot for the help.

Kevin

Posted: Sat Dec 31, 2005 4:39 pm
by garvinhicking
Hm, I think I would need more of your Code Examples on how you do the embedding to tell you more.

You'll need that line of PHP code on the site where your serendipity installation is! This variable needs to be set there, so that the index.php of serendipity has that variable set.

Regards,
Garvin