I know, another post about embedding... but anyway, I've taught myself enough html and css to begin putting together a site. I'm using static html pages and styling with css and divs. I would like to embed serendipity into a div. I've been reading the docs and the forum for hours and can't figure out why it's not working...
According to what i've found on this site I created a php file called wrapper.php which contains the following:
<?php
ob_start();
chdir("<../serendipity>");
require("index.php");
chdir("<../>";
$serendipity_contents = ob_get_contents();
ob_end_clean();
?>
I then added this as the first line in my blogtest.html file:
<?php
require("wrapper.php");
?>
Then I inserted this into the blogtest.html page to call the serendipity content:
<?php
echo $serendipity_contents;
?>
I then used admin to set the indexfile to wrapper.php My page loads normally, but serendipity does not show up.
Any help at all would be greatly appreciated!! my test page is at bobcrawfordonline.com/blogtest.html
Embedding in HTML page
-
peaceteacher
- Posts: 3
- Joined: Mon Jan 22, 2007 6:51 pm
- Contact:
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding in HTML page
Hi!
I take it that with <../serendpity> you mean you inserted the full path there without the <> characters, right?
One thing that will make trouble is that you pointed your s9y indexFile to 'wrapper.php', but your wrapper.php code does not contain a call to your blogtest.html file. So basically you would want to make the indexFile point to blogtest.html instead of wrapper.php. But that is stuff for things to do later.
First we should focus why you get no content when calling blogtest.html.
I suppose it simply does not work because PHP code contained in .html files will not get parsed. *g*
Rename the file to 'blogtest.php' and try that again. Then you should see some output!
Best regards,
Garvin
I take it that with <../serendpity> you mean you inserted the full path there without the <> characters, right?
One thing that will make trouble is that you pointed your s9y indexFile to 'wrapper.php', but your wrapper.php code does not contain a call to your blogtest.html file. So basically you would want to make the indexFile point to blogtest.html instead of wrapper.php. But that is stuff for things to do later.
First we should focus why you get no content when calling blogtest.html.
I suppose it simply does not work because PHP code contained in .html files will not get parsed. *g*
Rename the file to 'blogtest.php' and try that again. Then you should see some output!
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/
-
derflection
- Posts: 1
- Joined: Tue Jan 23, 2007 5:57 pm
- Contact:
Re: Embedding in HTML page
Hi Garvin,garvinhicking wrote:Hi!
I take it that with <../serendpity> you mean you inserted the full path there without the <> characters, right?
One thing that will make trouble is that you pointed your s9y indexFile to 'wrapper.php', but your wrapper.php code does not contain a call to your blogtest.html file. So basically you would want to make the indexFile point to blogtest.html instead of wrapper.php. But that is stuff for things to do later.
First we should focus why you get no content when calling blogtest.html.
I suppose it simply does not work because PHP code contained in .html files will not get parsed. *g*
Rename the file to 'blogtest.php' and try that again. Then you should see some output!
Best regards,
Garvin
I too am having similar diffuclty. I get this error now when my newsblog.php page loads
Parse error: parse error, unexpected ';' in C:\Program Files\Apache Group\Apache2\htdocs\driveable\wrapper.php on line 5
I have tried putting a few things in the chdir("<../>"; on line 5 of my wrapper.php and none of them seem to work.
What am I missing?
The website is http://www.driveable.com/newsblog.php
-
peaceteacher
- Posts: 3
- Joined: Mon Jan 22, 2007 6:51 pm
- Contact:
Hi Garvin,
Thanks for the quick reply! I followed your suggestions and received an error message identical to the one derflection mentions above... the unexpected ";" was because of a closing parenthesis that I missed. Once I fixed that the Serendipity content showed up! I think all I have left are some css issues to get Serendipity's content to flow around my pre-existing left sidebar.
One other problem has arisen though... the open admin link at the bottom of the serendipity sidebar links to "/admin", but i only seem to be able to open the admin panel manually by using ".../serendipity/serendipity_admin.php" is there any way to change this link... or alternatively to remove the admin panel from the sidebar?
Thanks again for your prompt assistance yesterday! Serendipity looks like a great package and I look forward to using it. Thanks for all your hard work!
Bob
(This is where the site is at... hopefully I'll have gotten it to float correctly by the time you look... lol)
http://www.bobcrawfordonline.com/serend ... ogtest.php
Thanks for the quick reply! I followed your suggestions and received an error message identical to the one derflection mentions above... the unexpected ";" was because of a closing parenthesis that I missed. Once I fixed that the Serendipity content showed up! I think all I have left are some css issues to get Serendipity's content to flow around my pre-existing left sidebar.
One other problem has arisen though... the open admin link at the bottom of the serendipity sidebar links to "/admin", but i only seem to be able to open the admin panel manually by using ".../serendipity/serendipity_admin.php" is there any way to change this link... or alternatively to remove the admin panel from the sidebar?
Thanks again for your prompt assistance yesterday! Serendipity looks like a great package and I look forward to using it. Thanks for all your hard work!
Bob
(This is where the site is at... hopefully I'll have gotten it to float correctly by the time you look... lol)
http://www.bobcrawfordonline.com/serend ... ogtest.php
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Embedding in HTML page
Hi derflection!
Please paste the code of your wrapper.php, you have an error in that file at line 5.
Regards,
Garvin
Please paste the code of your wrapper.php, you have an error in that file at line 5.
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/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi peaceteacher!



Best regards,
Garvin
Great you got that!Thanks for the quick reply! I followed your suggestions and received an error message identical to the one derflection mentions above... the unexpected ";" was because of a closing parenthesis that I missed.
This is the URL rewriting that takes place - serendipity will use these links if in your s9y configuration you set for "URL Rewriting". It will most liekely currently be 'apache errorhandling' or 'mod_rewrite'. If you switch it to "None" you will get "unpretty URLs" that will contain the proper link.One other problem has arisen though... the open admin link at the bottom of the serendipity sidebar links to "/admin", but i only seem to be able to open the admin panel manually by using ".../serendipity/serendipity_admin.php" is there any way to change this link... or alternatively to remove the admin panel from the sidebar?
You're kindly welcome! Have fun with SErendipityThanks again for your prompt assistance yesterday! Serendipity looks like a great package and I look forward to using it. Thanks for all your hard work!
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/
-
peaceteacher
- Posts: 3
- Joined: Mon Jan 22, 2007 6:51 pm
- Contact: