Hi, I'm trying to embed s9y into an existing site that has existing templates / css, etc.
I've been reading and reading the main docs and forum posts on this subject, but don't still quite seem to get it.
I was trying the 'wrapper.php' approach, where I have a page called, say, 'blog.php' in the root directory in the main site, which would be the page where I want all content to show.
The page 'blog.php' contains the following code to build the page:
<? require("serendipity/wrapper.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD><TITLE>MY BLOG</TITLE>
<? include("scripts/toptemplate.php");?>
<? echo $blog;?>
<? include("scripts/footer.php");?>
The page 'wrapper.php' in the serendipity directory contains the following code:
<?
ob_start();
$a = getcwd();
chdir($a."/serendipity");
require("index.php");
chdir($a);
$blog = ob_get_contents();
ob_end_clean();
?>
Now, this is OK and it will show the serendipity blog embedded within the page.
However, if I click on any of links, this takes me to a new page within the serendipity directory - effectively out of the main site.
I can't quite figure out what I need to tweak at this point to get this working.
I don't want to embed into an iframe, as this means that search engines will have difficulty spidering the content.
Is it actually possible to effectively run everything from one URL using GET query string ?
Thanks
Neil.
yet another embedding question
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: yet another embedding question
Hi!
Actually, this is what the "indexFile" s9y Configuration directive is for. By default it'S set to "index.php" but you need to change it to "wrapper.php"!
Regards,
Garvin
Actually, this is what the "indexFile" s9y Configuration directive is for. By default it'S set to "index.php" but you need to change it to "wrapper.php"!
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/
Hi,
That's what I thought I had to do.
I had set the indexFile to 'wrapper.php', and this has no problem displaying the initial blog entries.
However, if I click on any entries within the page, they take me to a page with the serendipity directory:
i.e.
http://127.0.0.1/testsite/serendipity/a ... -post.html
Same thing happens if I click on 'archives', reply, etc.
I guess I am nearly there, but how do I bind all these links to the page blog.php
what I guess I need is:
http://127.0.0.1/testsite/blog.php?page ... -post.html
Don't quite figure out where I'm messing up here...
Thanks
Neil.
That's what I thought I had to do.
I had set the indexFile to 'wrapper.php', and this has no problem displaying the initial blog entries.
However, if I click on any entries within the page, they take me to a page with the serendipity directory:
i.e.
http://127.0.0.1/testsite/serendipity/a ... -post.html
Same thing happens if I click on 'archives', reply, etc.
I guess I am nearly there, but how do I bind all these links to the page blog.php
what I guess I need is:
http://127.0.0.1/testsite/blog.php?page ... -post.html
Don't quite figure out where I'm messing up here...
Thanks
Neil.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
These "pretty URLs" are bound via your .htaccess file. usually if you change the "indexfile" option, serendipty recreates the .htaccess file to insert "wrapper.php" instead of "index.php" there. You can also do that manually, and then the URLS should correctly forward to the right file.
Best regards,
Garvin
These "pretty URLs" are bound via your .htaccess file. usually if you change the "indexfile" option, serendipty recreates the .htaccess file to insert "wrapper.php" instead of "index.php" there. You can also do that manually, and then the URLS should correctly forward to the right file.
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/
Hi,
I managed to crack this problem and get it working. Compared to the trauma of trying to embed WordPress in an existing site, this has been much easier in comparison.
The only issue I seem to be having at the moment is matching the css styles of the posts so they mirror the rest of my site.
I moved (and altered) a number of css directives from the template css files to my main css file, and this works OK.
However, I can't locate the css directives for some of the sidebar functions (such as Archives, etc).
Are these located within other directories ?
Thanks
Neil.
I managed to crack this problem and get it working. Compared to the trauma of trying to embed WordPress in an existing site, this has been much easier in comparison.
The only issue I seem to be having at the moment is matching the css styles of the posts so they mirror the rest of my site.
I moved (and altered) a number of css directives from the template css files to my main css file, and this works OK.
However, I can't locate the css directives for some of the sidebar functions (such as Archives, etc).
Are these located within other directories ?
Thanks
Neil.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi Neil!
Great to hear you'Re making progress!
All of the CSS code should be found within the style.css file, actually. What exactly are you looking for?
Regards,
Garvin
Great to hear you'Re making progress!
All of the CSS code should be found within the style.css file, actually. What exactly are you looking for?
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/