xmlrpc plugin categories fix for mobile blogging
Posted: Tue Feb 01, 2011 9:02 am
I had some time to kill this evening, so looked a bit more at why my category descriptions will not show up in either BlogWriter or BlogPress (both for iPhone).
In BlogWriter, there were always as many blank category list items as there were categories (so I knew it was getting somewhere), and in BlogPress, the app would just crash when trying to fetch the categories. Meanwhile, DeepestSender for Firefox did everything it was supposed to do.
I narrowed the problem down to ~182 in serendipity_xmlrpc.inc.php (/plugins/serendipity_event_xmlrpc).
Changing 'description' to 'categoryName' does the trick for both BlogWriter and BlogPress - however it does break DeepestSender. No telling what other desktop authoring apps this change would break, but it fixes the mobile apps, and that's all I personally care about.
PS - if anybody is considering a mobile blogging app for the iPhone, BlogWriter seems to work in all regards. BlogPress still has trouble with S9Y around publishing...it will save drafts, but won't publish the article - too bad as it is the richer of the two apps.
Adam
In BlogWriter, there were always as many blank category list items as there were categories (so I knew it was getting somewhere), and in BlogPress, the app would just crash when trying to fetch the categories. Meanwhile, DeepestSender for Firefox did everything it was supposed to do.
I narrowed the problem down to ~182 in serendipity_xmlrpc.inc.php (/plugins/serendipity_event_xmlrpc).
Changing 'description' to 'categoryName' does the trick for both BlogWriter and BlogPress - however it does break DeepestSender. No telling what other desktop authoring apps this change would break, but it fixes the mobile apps, and that's all I personally care about.
Code: Select all
foreach ((array) $cats as $cat ) {
if ($cat['categoryid']) $xml_entries_vals[] = new XML_RPC_Value(
array(
// 'description' => new XML_RPC_Value($cat['category_name'], 'string'),
// PigsLipstick: change 'description' to 'categoryName' to support mobile publishing
'categoryName' => new XML_RPC_Value($cat['category_name'], 'string'),
'htmlUrl' => new XML_RPC_Value(serendipity_categoryURL($cat, 'serendipityHTTPPath'), 'string'),
'rssUrl' => new XML_RPC_Value(serendipity_feedCategoryURL($cat, 'serendipityHTTPPath'), 'string')
),
'struct'
);
}
Adam