Page 1 of 2

Blogging using XMLRPC plugin

Posted: Fri Jul 07, 2006 7:13 pm
by el10t
Hello again everyone

I have an S9Y installation to which I sometimes blog using Flickr and the xmlrpc plugin. However, blog entries made in this way do not allow comments to be added. Is there any way to make such entries automatically allow comments?

Many thanks,
Rich

Re: Blogging using XMLRPC plugin

Posted: Fri Jul 07, 2006 7:43 pm
by garvinhicking
Hi!

Which version of the xmlrpc plugin are you using? If I remember correctly this had been a bug in the past, but should've been fixed in recent versions.

I think it honours your personal preference in the s9y panel where you can enter the Default setting for allowing comments to new entries.

Best regards,
Garvin

Posted: Fri Jul 07, 2006 8:45 pm
by el10t
Hi Garvin
It's version 1.23
My personal settings are set to allow comments by default.

Posted: Fri Jul 07, 2006 9:13 pm
by garvinhicking
Hi!

I just checked the code; serendipity sets the "allow_comments" to either what is in $serendipity['allowCommentsDefault'] (which is retrieved from your personal settings) or if your XMLRPC client submits it via the "mt_allow_comments" flag. Can you check if your client has such a flag to indicate how to submit this key?

Best regards,
Garvin

Posted: Fri Jul 07, 2006 9:20 pm
by el10t
Thanks Garvin,

Unfortunately within Flickr there appears to be no way to set the mt_allow_comments flag. Is this something I can simply hard-wire into the code in the module?

Cheers,
Rich

Posted: Fri Jul 07, 2006 10:07 pm
by garvinhicking
Hi!

Yes, you should be able to easily edit that in code. Just open your serendipity_xmlrpc.inc.php file of the plugin directory and search for

Code: Select all

    if (isset($post_array['mt_allow_comments'])) {
        $entry['allow_comments'] = $post_array['mt_allow_comments'];
    } else {
        $entry['allow_comments'] = $serendipity['allowCommentsDefault'];
    }
replace that to:

Code: Select all

        $entry['allow_comments'] = true;
And search for

Code: Select all

$entry['allow_comments'] = $post_array['mt_allow_comments']? true : false;
and replace that to:

Code: Select all

$entry['allow_comments'] = true;
HTH,
Garvin

Posted: Sat Jul 08, 2006 8:13 am
by el10t
Thanks Garvin!

I have to say I'm amazed at the excellent and quick support you provide for this product. Well done!

:D

Posted: Sat Jul 08, 2006 11:45 am
by garvinhicking
Hi!

You're welcome :)) Have fun!

Best regards,
Garvin

Posted: Wed Aug 16, 2006 10:15 pm
by kris
Hi Garvin
I followed the instructions you gave to be able to see the comments from flickr photos. Now I have another problem:
in flickr you can alter the title of a photo before one sends the blog post - but in my blog the altered title will not show instead the blog shows original title....

is that a bug from flickr or from our serendipity_xmlrpc.inc.php-file?

thanks for a tip

kris

Posted: Thu Aug 17, 2006 10:22 am
by garvinhicking
Hi!

Sadly this issue is with Flickr - it sends the wrong XML data to the plugin, so it submits/uses the wrong picture title/data. But tell the guys, I'm sure they can be of help to fix that!

Best regards,
Garvin

Posted: Sun Feb 25, 2007 10:47 am
by koltregaskes
Hi there,

I'm also after the comments from flickr pages. below is the code for my serendipity_xmlrpc script, what do I need to do for it to allow flickr comments?

Code: Select all

<?php # $Id: serendipity_xmlrpc.php 386 2005-08-11 09:28:54Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved.  See LICENSE file for licensing details

require_once 'serendipity_config.inc.php';

$data = array();
serendipity_plugin_api::hook_event('frontend_xmlrpc', $data);

if (count($data) == 0) {
    die(XMLRPC_NO_LONGER_BUNDLED);
}

Posted: Mon Feb 26, 2007 9:14 am
by garvinhicking
Hi!

You're looking at the wrong file, you need to check the PLUGIN file plugins/serendipity_event_xmlrpc/serendipity_xmlrpc.inc.php :)

HTH,
Garvin

Posted: Mon Feb 26, 2007 9:12 pm
by koltregaskes
Aahh, thank you. As mentioned above thanks for the quick replies, it's really appreciated, especially from a 'free' product. Some paid-for product vendors should take note.

Thanks again, don't know what I've done but my newspaper template seems screwy (this is before I changed this file) but that's for another thread perhaps.

Kol

Posted: Tue Feb 27, 2007 11:14 am
by garvinhicking
Hi Kol!

You're welcome! :) Have fun, and thanks for the nice words

Best regards,
Garvin

Posted: Tue Feb 27, 2007 7:36 pm
by koltregaskes
Hi again,

OK, not sure what I done (yes again), now I cannot blog anything from Flickr. I've deleted my settings on Flickr and tried to set it up again, I've used the following as API endpoint (which is exactly what I used previously that used to work):

http://www.squashyfrog.com/blog/serendipity_xmlrpc.php

The error I get is that the end point is not correct.

Any ideas?

Kol