<![CDATA[ [Help][Snippet] Remote Blog Editing using XML-RPC - MODX Community Forums]]> https://forums.modx.com/thread/?thread=34268 <![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188012
All you would need to do is remove the methods you dont need, i.e. trim it down a lot and update the remaining methods to login and create/delete MODx documents using the MODx API, shouldn’t be too difficult.]]>
shamblett Sep 28, 2008, 01:15 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188012
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188011
Thanks for the effort.

I was, in fact looking to build out the ability to create, edit, delete modx documents using one of the common blogging apis. I am well aware of the issues of security and it certainly needs to be addressed.

First: We need to have a login required.
Second: It makes sense to either create a special user with limited permissions to use the account.
Third: It makes sense to limit the XMLRPC to limited parts of the document tree.
Fourth. It makes sense to limit the access to modx functions via the XMLRPC class for editing posts etc.

Any time there is script access to the CRUD mechanism security is important. XSS/MySQL injections etc.

Because there risks, you take care to block everything and allow a tiny accesspoint and then make sure that accesspoint is controlled and further limited.

I’ll look at what you have done and see if I can make it work this week.

Cheers,

Jay]]>
smashingred Sep 28, 2008, 07:42 AM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188011
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188010
I’ve put these in external php file under /assets/snippets, called from this snippet inside MODx :-
global $modx;

// Get the Blogger API
$modx_xmlrpc_path = $modx->config['base_path'] . "assets/snippets/xmlrpc/";
include_once("$modx_xmlrpc_path./bloggerFunctions/blogger.php");

// Get the supported methods
$info_array = blogger_getSupportedMethods();
echo "<p>The supported XMLRPC functions on the Wordpress server are :- </p></br>";
foreach ($info_array as $method)
{
    echo "<p><strong>$method</strong></p>";
}

// Post a blog, get a blog, get user info etc. etc.

return;


OK, this lists the supportd XMLRPC methods on the wordpress server, go here to see it in action http://bitez.hobby-site.com/index.php?id=84 or just navigate to the XMLRPC test page under the Software section of my site.

You can do whatever with this now, add blogs, read blogs, or anything that’s supported

Is this what you were after, i.e you can type some text into a MODx page, press submit, and it turns up in the blog of your choice, I’ve used Wordpress here for the demo but you can use any XMLRPC server you wish, not just for blogs either.

Coming the other way i.e MODx acting as a server is a bit harder, the security concerns already raised on this thread are very valid here, we dont want to open an attack vector into peoples installations. This would allow people using a blog client to ’publish’ to a MODx site. You would have to take say the server side implementation of the blogger api and modxify it to use your db tables etc. Authentication would also be needed, can be done but lots of work.



]]>
shamblett Sep 28, 2008, 04:42 AM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188010
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188009
http://modxcms.com/forums/index.php/topic,11238.0.html

Good luck! (I’m not a programmer, either)]]>
er16004 Sep 25, 2008, 02:52 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188009
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188008 another thread asking if this was possible:
XML-RPC (and JSON-RPC) are already integrated into Revolution. I suggest looking at the libraries there for inspiration (core/model/modx/xmlrpc/ and core/model/modx/jsonrpc/), but creating a snippet is absolutely the best way to integrate this into 0.9.6.x. A MODx Document should serve as an XML-RPC server IMHO. In Revolution, there will be custom mechanisms for easily creating custom RPC server Response classes (in Revolution there is a class representing a Request and a Response), and extending them to be as simple or complex as you need. But in 0.9.6.x, you’ll need to do all the heavy lifting in a snippet (and/or possibly a plugin).


Thanks shamblett. Maybe me and my little mind will look at this also and we can build out a generic wrapper class for it for 096/Evolution.

]]>
smashingred Sep 24, 2008, 02:59 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188008
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188007 ]]> shamblett Sep 24, 2008, 02:24 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188007 <![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188006
My short term goal is to enable remote blog/document editing but if there is a better way, please help me out.

OpenGeek has an XMLRPC built into modx Revolution and I’m sure we could use much of it but I don’t even know where to begin.

]]>
smashingred Sep 24, 2008, 02:02 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188006
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188005
Basic security/logging/metrication can be built into the base class allowing individual users to worry only about checking the parameters of their specific interface.

This is, as always, much easier said than done but may save time and pain in the long run.
]]>
shamblett Sep 24, 2008, 01:44 PM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc?page=2#dis-post-188005
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc#dis-post-188004
I am hoping I can get a volunteer or two to help who has php on the brain. I may be able to get it to work but the big fail for me is that I may leave modx open to security holes without proper assistance.

So again, I implore the community for a little help on this. I can even set up a google project for this if that would be helpful.

Cheers,

Jay]]>
smashingred Sep 24, 2008, 09:25 AM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc#dis-post-188004
<![CDATA[Re: [Help][Snippet] Remote Blog Editing using XML-RPC]]> https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc#dis-post-188003
I for one am drawn to use WP more now because it allows management through the iPhone (due to XMLRPC). It would be incredible if this was available for MODx, as well.]]>
er16004 Sep 24, 2008, 08:33 AM https://forums.modx.com/thread/34268/help-snippet-remote-blog-editing-using-xml-rpc#dis-post-188003