Embedding

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
An0nym0us
Posts: 2
Joined: Sun Mar 26, 2006 9:26 pm

Embedding

Post by An0nym0us »

Hello there!

I see, my subject was here before, but no thread was helping me out.

I made an own layout using YAML and want to embed Serendipity there. BTW: Serendipity is really cool. In my option even a little better than Wordpress which seems nice (tested it once).

First ist tried to include the index.php via php "include"- or "require"-function like this:
<?php
chdir("<serendipity_dir>");
require("index.php");
chdir("<original_dir>");
?>
I got the page but only the left an right sidebar.

After that I got managed to list left and right sidebar seperated using the plugin-class-function. Also works great.

The Problem: The blog posts/articles are never displayed. I can only see them if I look up the original index.php...

Any suggestions? Maybe I just can't look at my code anymore :shock:

Greetings
An0nym0us
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Embedding

Post by garvinhicking »

Hi!

I wonder if you really need the embed mode! Can't you just edit the index.tpl template of your Serendipty template (and maybe entries.tpl as well) to use the YAML template for Serendipity?

Please go to www.s9y.org and look inside the technical documentation for an embed example PHP code which properly works. You must use ob_start() and ob_get_contents() the least.

Embed mode is really only used if you use large PHP frameworks to power your site and want to use a unified template. In all other cases just modifying the smarty templates is the much better way to go.

Embed mode was invented before Serendipity had Smarty templating. :)

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/
An0nym0us
Posts: 2
Joined: Sun Mar 26, 2006 9:26 pm

Post by An0nym0us »

This is all too easy :P

Thank you, I'm not considering but building a template :)

Thanks!
Last edited by An0nym0us on Sun Mar 26, 2006 10:27 pm, edited 1 time in total.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Great to hear that! Have fun! :)

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/
Post Reply