Hi
Have been messing around with Serendipity & embedding & gotta say it is really cool! Have been able to embed my test blog into my dev templates on my home PC fine.
Got one issue though. For some reason when I try & edit or add a new entry (as well as a comment) on my embedded page, it looks like the database isn't being updated with the new content. If I go straight into serendipity everything works fine.
Even though everything is through the wrapper.php, the page still looks like its submitting fine.
Has anyone experienced anything similar? Where should I look first to see where the issue might lie?
cheers
Daryn
embedding & form submit
Hi! Glad you're finding Serendipity so useful.
I don't really know what's going on. All I've got is one guess: what's your index file set to in the Serendipity configuration? Make a note of it, and change it to the wrapper file, if it isn't already.
If you can give us a URL, we can go take a look at it ourselves. Maybe we'll see something.
I don't really know what's going on. All I've got is one guess: what's your index file set to in the Serendipity configuration? Make a note of it, and change it to the wrapper file, if it isn't already.
If you can give us a URL, we can go take a look at it ourselves. Maybe we'll see something.
Hi judebert!judebert wrote:Hi! Glad you're finding Serendipity so useful.
I don't really know what's going on. All I've got is one guess: what's your index file set to in the Serendipity configuration? Make a note of it, and change it to the wrapper file, if it isn't already.
If you can give us a URL, we can go take a look at it ourselves. Maybe we'll see something.
I might be able to get something live to show you, let me explain what I am trying todo in the meantime.
With the wrapper.php I can easily output the serendipity blog to my templates. What I am trying todo is also include the serendipity_admin.php pages as well. This I can do easily enough by this code in my wrapper.php
<?php
$action = $_REQUEST['serendipity'];
ob_start();
chdir("*insert path to serendipity*");
if (is_array($action)) {
require 'serendipity_admin.php';
else {
require 'index.php';
}
chdir("*insert path to own website*");
$blog_data = ob_get_contents();
ob_end_clean();
?>
Basically just tests if the serendipity admin array exists, if it does include serendipity_admin.php instead of index.php
To get the Edit Entry to work to allow the admin pages to appear in my template, I needed to edit the $entry['link_edit'] path in include/functions_entries.inc.php to look something like this
$entry['link_edit'] = $serendipity['baseURL'] . '../blog.php?serendipity[action]=admin&serendipity[adminModule]=entr ies&serendipity[adminAction]=edit&serendipity[id]='. $entry['id' ];
blog.php being the page containing my website templates & the wrapper output.
I then needed to edit include/functions_config.inc.php to allow the save to work. This is a pathing issue to the iframe call (adding serendipity/ to the path)
echo '<iframe src="serendipity/serendipity_admin.php?serendipity[is_ iframe]=true&serendipity[iframe_mode]=' . $mode . '" id="serendipity_iframe" name="serendipity_iframe" ' . $attr . ' width="100%" frameborder="0" marginwidth="0" marginheight="0" scrolling="auto" title="Serendipity">'
. IFRAME_WARNING
. '</iframe><br /><br />';
}
Idea is I click on "Edit Entry" from my embedded blog in my templates, takes you to that entry with serendipity_admin.php also embedded, can then edit/save entry.
Have actually got it working on another site here at home (which is encouraging!)!!!
I think the issue I am having with the site I really want to embed serendipity into might be the websites own request handler intercepting calls. Will have todo more research into where it might be falling down!
Does what I'm explaining make any sense? Some advice from am expert would be great!
cheers
Daryn
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Embedding the Admin-Suite is not really supported, so if it doesn't work, you're somewhat on your own. *g*
If we can make the admin to support embedding, I'm all for it. So if you figure out necessary patches, we're willing to make them.
My bet is that the iframe to post messages to is making problems with your kind of embedding...or maybe the $_REQUEST/$_GET etc. variables are not properly imported?
Regards,
Garvin
Embedding the Admin-Suite is not really supported, so if it doesn't work, you're somewhat on your own. *g*
If we can make the admin to support embedding, I'm all for it. So if you figure out necessary patches, we're willing to make them.
My bet is that the iframe to post messages to is making problems with your kind of embedding...or maybe the $_REQUEST/$_GET etc. variables are not properly imported?
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/
And he's the expert.
That's pretty impressive. We've never tried to embed the admin suite before; embedding the blog has been enough of a headache. But I can see where a site with multiple editors might be interested in that. Let us know how you got there, and we'll make it available to others![/quote]Have actually got it working on another site here at home (which is encouraging!)!!!