Embedding Serendipity, how?
Embedding Serendipity, how?
Hi!
Our S9Y-installation has always ran independent, but now we'd like to embed it in another webpage on another server. We actually have one part fixed, but we're kinda stuck in the other side of the story, so any help will be appreciated.
At the new webpage, there is a file like content.php with an argument "page" that redirects to S9Y. An example:
$_GET['id'] == 'page';
require('http://www.mysite.com/$page');
This works great, however, when you click a link on the original S9Y-page, it'll try to open the wrong path. Yet another example:
It does: http://www.thenewsite.com/categories/1-something.html
It should do: http://www.thenewsite.com/categories/co ... thing.html
Notice that those two websites have different domainnames. If I enable the "Automatically detect HTTP-Host" function the domainname is right, but still that content.php file is missing in the path.
What's the easiest/best way to fix this, if there is a way?
Our S9Y-installation has always ran independent, but now we'd like to embed it in another webpage on another server. We actually have one part fixed, but we're kinda stuck in the other side of the story, so any help will be appreciated.
At the new webpage, there is a file like content.php with an argument "page" that redirects to S9Y. An example:
$_GET['id'] == 'page';
require('http://www.mysite.com/$page');
This works great, however, when you click a link on the original S9Y-page, it'll try to open the wrong path. Yet another example:
It does: http://www.thenewsite.com/categories/1-something.html
It should do: http://www.thenewsite.com/categories/co ... thing.html
Notice that those two websites have different domainnames. If I enable the "Automatically detect HTTP-Host" function the domainname is right, but still that content.php file is missing in the path.
What's the easiest/best way to fix this, if there is a way?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
Hi!
You can use the Option in the s9y configuration to specifiy a wrapper bla.php file in the s9y configuration file. Instead of index.php you point it to your own URL.
There's no way to keep the URLs like you have, you need to set those variables via the PHP script and then include your original script.
Best regards,
Garvin
You can use the Option in the s9y configuration to specifiy a wrapper bla.php file in the s9y configuration file. Instead of index.php you point it to your own URL.
There's no way to keep the URLs like you have, you need to set those variables via the PHP script and then include your original script.
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/
# 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/
Re: Embedding Serendipity, how?
Okay, thanks! Could you please give me a little code example? I looked at the embed documentation, but I didn't really understand how to use it...
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
# 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/
# 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/
Re: Embedding Serendipity, how?
Okay, so if I use those ob_start() and such functions, S9Y can handle links properly?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
Hi!
ob_start() is only for capturing. Once you set the embed indexFile command to your custom wrapper, those links will point to that file, and within that file you can use your custom PHP to forward to foreign PHP content.php of yours.
Best regards,
Garvin
ob_start() is only for capturing. Once you set the embed indexFile command to your custom wrapper, those links will point to that file, and within that file you can use your custom PHP to forward to foreign PHP content.php of yours.
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/
# 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/
Re: Embedding Serendipity, how?
Hmmm... It's quite hard to understand, but I'll play around with it and see what I can do. After all, thanks for the quick help so far.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
Hi!
Sadly embedding of s9y requires some PHP skills, and I tried to describe it as good as I can in the mentioned documentation, so I'm afraid I know no better to describe it. You could search this forum for "embed", there are some more examples of it.
HTH,
Garvin
Sadly embedding of s9y requires some PHP skills, and I tried to describe it as good as I can in the mentioned documentation, so I'm afraid I know no better to describe it. You could search this forum for "embed", there are some more examples of it.
HTH,
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/
# 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/
Re: Embedding Serendipity, how?
Well, maybe we'll just put S9Y in a frame, that will always work even though it's not really beautiful webprogramming.
Re: Embedding Serendipity, how?
Something else that is very weird, it'd be great if I could change the value of Smarty's BaseURL variable. That would solve nearly everything, won't it?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
Hi!
You can't simply change the baseURL if you don'T change what's lying "underneath" of it...
Best regards,
Garvin
You can't simply change the baseURL if you don'T change what's lying "underneath" of it...
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/
# 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/
Re: Embedding Serendipity, how?
Well, now I noticed something else that I can't understand:
I have my rewrite engine turned off, so I've links like http://www.mydomain.com/index.php?/arch ... 07/06.html.
But when I change my indexFile to the wrapper.php file, that link just returns me to the main page.
Here's my wrapper code, I guess that's fine...
<?php
ob_start();
require 'index.php';
$data = ob_get_contents();
echo $data;
?>
I know I'm demanding much, sorry for that.
I have my rewrite engine turned off, so I've links like http://www.mydomain.com/index.php?/arch ... 07/06.html.
But when I change my indexFile to the wrapper.php file, that link just returns me to the main page.
Here's my wrapper code, I guess that's fine...
<?php
ob_start();
require 'index.php';
$data = ob_get_contents();
echo $data;
?>
I know I'm demanding much, sorry for that.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding Serendipity, how?
Hi!
What do you mean? Then your url points to:
http://www.mydomain.com/wrapper.php?/ar ... 07/06.html.
right?
Regards,
Garvin
What do you mean? Then your url points to:
http://www.mydomain.com/wrapper.php?/ar ... 07/06.html.
right?
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/
# 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/
Re: Embedding Serendipity, how?
Right, and that doesn't work quite well for an unknown reason. Tomorrow or so I'll experiment with the BaseURL and the templates and see what I can do.garvinhicking wrote:Hi!
What do you mean? Then your url points to:
http://www.mydomain.com/wrapper.php?/ar ... 07/06.html.
right?
Regards,
Garvin