Textpattern Forum

You are not logged in. Register | Login | Help

#1 2007-10-30 19:46:49

redsweater
New Member
Registered: 2007-05-26
Posts: 6

[feedback] How To Win Friends Who Love Desktop Blogging...

Hello – I’m the developer of MarsEdit, a desktop blogging application for Mac OS X:

http://www.red-sweater.com/marsedit/

From time to time I get feedback from my users about how much they like Textpattern, but are disheartened to learn that it “doesn’t work” with MarsEdit and other desktop blogging clients. This impression of not working must be hurting your reputation, so I suggest you address it. My suggestions:

1. Make the XMLRPC plugin a standard part of the install. It’s highly unusual to require users to install a separate package to get this type of functionality. It leads to the impression that Textpattern simply doesn’t work with remote clients.

2. Fix the XMLRPC implementation so that it behaves appropriately to support features in the MovableType API such as categories, slug, etc.

I believe the first suggestion would require the agreement of the Textpattern team as a whole, so I’ll leave that to you to discuss and hopefully agree to.

The second suggestion probably depends on the developer(s) of the XMLRPC plugin being excited and motivated to make these fixes. I would be happy to discuss some relatively easy changes that can be made to bring Textpattern’s RPC support into line with other popular systems.

Thanks for listening and please feel free to get in touch if you have questions or if there’s any way I can help in improving the RPC situation with Textpattern.

Daniel Jalkut
Red Sweater Software

Offline

#2 2007-10-31 02:27:12

diuk
Member
Registered: 2007-08-21
Posts: 15

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

Excellent, I believe both of your suggestions are going to be echoed by many Textapttern users. XML-RPC support will become more crucial with time and I’m sure TXP developers will put their hands on the matter.

regards,

D

Offline

#3 2007-11-04 00:14:21

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

its slated to be included in the core for txp 4.1 (crockery) which will probably not see the light of day for a while.

can’t speak for the devs but xml-rpc will most likely stay as a plugin for the current 4.0.x release. unfortunately the main developer/maintainer (pedro) behind the xml-rpc plugin does not seem to be active in the txp community anymore and i dont think anyone else has had the time to pick it up.

Last edited by iblastoff (2007-11-04 00:38:25)

Offline

#4 2008-01-04 16:03:19

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

apparently fixing the slug/url-title issue is a 2 line fix in the core code

i’m assuming by ‘core code’ he/she means the ‘official’ xml-rpc plugin.

i’ve asked the originator of the fix to provide it and perhaps if a dev could look at it, the plugin could at least be updated a bit?

Offline

#5 2008-01-05 21:31:05

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

well heres the edited txp_rpcserver.php which fixes the slug/url-title issue (provided by Joakim Hertze)

specifically you can find the 2 lines being added at lines 858 and 916.

here is a thread on the discussion of Textpatterns xml-rpc support and how it apparently doesn’t follow the standards of the protocol and thus causing certain things to not work correctly.

any developers working on keeping this up to date at all?? is xml-rpc still going to be supported for textpattern?

here are some quotes that may be a starting point:

textpattern source code it appears the Textpattern devs would like you to use the method mt_getRecentPostTitles instead of metaWeblog.getRecentPosts (I’ve set my blog software to “Movable Type”).
The former supports different blogID, but not the latter.

metaWeblog.getRecentPosts does provide the blog ID, though. So you should be able to examine the request (the first parameter is the blog ID) and if the Textpattern is not limiting the results to only that blog ID, it’s a bug in Textpattern.

Last edited by iblastoff (2008-01-05 21:33:05)

Offline

#6 2008-01-06 00:41:37

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

ok so i downloaded w.bloggar to test things out using movable type api (i don’t have a mac so no marsedit)

the issue

no matter which blogid (re:section) i choose, every time i try to retrieve the last 5 posts from a particular blogid(re:section), it just grabs the last 5 posts from all sections.

so i took a peak at txp_rpcserver.php and the function metaWeblog_getRecentPosts. here is where it attempts to retrieve the articles:

$articles = $txp->getArticleList('
ID, Title, url_title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, AuthorID, unix_timestamp(Posted) as uPosted', 
'1', 
'0', 
$numberOfPosts);

the getArticleList class function parameters looks like this

getArticleList($what='*', $where='1', $offset='0', $limit='10')

it basically just calls the function safe_rows_start and outputs the following sql :

select ID, Title, url_title, Body, Excerpt, Annotate, Keywords, 
Section, Category1, Category2, textile_body, AuthorID, unix_timestamp(Posted) as uPosted 
FROM textpattern 
WHERE 1 
order by Posted desc LIMIT 0, 5

so as you can see it basically selects the last 5 articles without filtering by section. NOW what makes sense to me is to change the getArticleList parameters to this:

$articles = $txp->getArticleList('
ID, Title, url_title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, AuthorID, unix_timestamp(Posted) as uPosted', 
"Section = '$blogid'", 
'0', 
$numberOfPosts);

but all that does is return the problem_getting_articles error. i’ve even tried hardcoding "Section = 'article'" and it still does the same thing. if i set it back to ‘1’ it retrieves the last 5 articles from all sections. the sql equivalent of that seems to pull the filtered-by-section articles just fine. anyone know what may be wrong with this?

Last edited by iblastoff (2008-01-06 01:39:08)

Offline

#7 2008-01-06 01:43:27

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

alright so it seems like i got it working now. i used the above change in the function metaWeblog_getRecentPosts in txp_rpcserver.php:

$articles = $txp->getArticleList('
ID, Title, url_title, Body, Excerpt, Annotate, Keywords, Section, Category1, Category2, textile_body, AuthorID, unix_timestamp(Posted) as uPosted', 
"Section = '$blogid'", 
'0', 
$numberOfPosts);

and i also had to comment out $where = doSlash($where); in the getArticleList function in txplib_wrapper.php. now all of a sudden, when i retrieve posts via w.bloggar from a particular blogid/section, it now properly filters and grabs only the articles from the chosen section. i have no idea why the doslash function would mess that up seeing as you definitely want to escape mysql strings. but it works. if anyone else can chime in on this, that would be great.

Last edited by iblastoff (2008-01-06 01:44:40)

Offline

#8 2008-01-06 16:04:17

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

its been confirmed by a marsedit user that being rid of the $where = doSlash($where) in the getArticleList function in txplib_wrapper.php and changing the code in the previous post now allows him to get recent posts by blogid/section.

of course i don’t want to NOT escape sql strings so although it works, its definitely not an ideal fix. is there anyone else working on this at all??

Last edited by iblastoff (2008-01-06 16:04:42)

Offline

#9 2008-01-07 18:18:55

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

steve – is there any good documentation out there for the xml-rpc spec?

Offline

#10 2008-01-07 18:58:28

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [feedback] How To Win Friends Who Love Desktop Blogging...

hey hey variaas! the only places i’m really looking at is

http://txp.kusor.com/rpc-docs
http://txp.kusor.com/rpc-api

the OP is right in that without proper xml-rpc support TXP is just going to lag behind everyone else.

i really don’t know much about xml-rpc at all nor do i even use it. all i’ve been doing is playing around with the xml-rpc server php class for TXP. i know absolutely nothing about OOP and i’ve managed to at least get this far within an hour or two of toying around…i don’t know why any of the devs have not picked this up in over a year at least.

heres another angry mini-mob i’m trying to pacify hehe

Last edited by iblastoff (2008-01-07 19:02:10)

Offline

Board footer

Powered by FluxBB