Trying to find the right way to use XML-RPC

Have a programming question regarding your component, plug-in, extension or core hacks? Have an interesting tidbit, FAQ or programming tip you’d like to share? This is the place for you.

Moderators: tjay, seadap, Rogue4ngel, matthewhayashida

Post Reply
User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Trying to find the right way to use XML-RPC

Post by cacimar » Fri Jan 11, 2008 7:50 pm

Below is a ruby script I'm using to call the Joomla XML-RPC Blogger API.

All functions work except the call to blogger.newPost

It returns an error from Joomla: XMLRPC::FaultException: Post check failed
(Error generated from the logic in plgins/xmrpc/blogger.php  line 215)

Any ideas on the problem or working examples of open code which successfully uses the xml-rpc blogger api?


require 'xmlrpc/client'

# Sets server to my site
server = XMLRPC::Client.new2('http://mysite.com/xmlrpc/index.php')

# function getUserInfo($appkey, $username, $password)
result = server.call('blogger.getUserInfo','unused_appkey','admin','password')
puts result

# function getRecentPosts($appkey, $blogid, $username, $password, $numposts)
result = server.call('blogger.getRecentPosts','unused_appkey','unused_blogid','admin','password',9)
puts result

# function newPost($appkey, $blogid, $username, $password, $content, $publish)
server.call('blogger.newPost','unused_appkey','unused_blogid','admin','password','Post This', true)
--
Rich Vázquez, CISA, CISSP
ImpactNews.com -- soon to be Joomla!

User avatar
AmyStephen
Joomla! Guru
Joomla! Guru
Posts: 579
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Trying to find the right way to use XML-RPC

Post by AmyStephen » Fri Jan 11, 2008 8:02 pm

I do not know of anyone successfully using it. There have been many saying they want to use it.

To the best of my knowledge, it's not had much developer attention for a long time, nor do I believe it will have any before v 1.5 goes live.

In my opinion, this solution will need to come from our community.

Thanks!
Amy :)
~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~
http://OpenSourceCommunity.org/node/1719/

User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Re: Trying to find the right way to use XML-RPC

Post by cacimar » Fri Jan 11, 2008 8:19 pm

I've seen some confusing messages from  the recent threads on it.  It seemed they said the Blogger API as existed worked in Joomla. Maybe I'll brave that other thread to clarify.

I'll be working on something next month and am trying to ramp up and check existing functionality to have a good base to start. 
--
Rich Vázquez, CISA, CISSP
ImpactNews.com -- soon to be Joomla!

User avatar
AmyStephen
Joomla! Guru
Joomla! Guru
Posts: 579
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Trying to find the right way to use XML-RPC

Post by AmyStephen » Fri Jan 11, 2008 8:37 pm

Almost two years ago, Johan added Blogger API v 1 to Joomla! v 1.5. That's the pieces you are working with. It really should be updated to 2.0.

There is some code started on a MetaWeblog API that there was just no time to finish. That might provide someone a place to start with that API.

Make certain to check the Extensions Directory, as well. There's a lot of interest, of course, in this area.

HTH,
Amy :)
~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~
http://OpenSourceCommunity.org/node/1719/

User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Re: Trying to find the right way to use XML-RPC

Post by cacimar » Fri Jan 11, 2008 9:15 pm

Amy,
Thanks for your help.  I'll look at the MetaWebBlog stuff.

After an afternoon cup of coffee, I discovered the Blogger API needed a tag in the last parameter. <br /><br /><br />The following works<br /><br /><br /><div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code><br /># function newPost($appkey, $blogid, $username, $password, $content, $publish)<br />result = server.call('blogger.newPost','unused_appkey','unused_blogid','admin','password','<title>Test Title</test>This shows up in the body<strong>So does this in bold</strong>', false)<br /><br /></code></pre></div></div> <div id="sig1151797" class="signature">--<br />Rich Vázquez, CISA, CISSP<br /><a href="http://www.impactnews.com" class="postlink">ImpactNews.com</a> -- soon to be Joomla!</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <hr class="divider" /> <div id="p1151970" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile1151970"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" class="avatar"><img class="avatar" src="./download/file.php?avatar=75461.jpg" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #660099;" class="username-coloured">AmyStephen</a> </dt> <dd class="profile-rank">Joomla! Guru<br /><img src="./images/ranks/guru.png" alt="Joomla! Guru" title="Joomla! Guru" /></dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=75461&sr=posts&sid=15334218aa8af5c5231c31a75b889bdf">579</a></dd> <dd class="profile-joined"><strong>Joined:</strong> Wed Nov 22, 2006 3:35 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Nebraska</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact AmyStephen"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact AmyStephen</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://OpenSourceCommunity.org" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content1151970"> <h3 ><a href="#p1151970">Re: Trying to find the right way to use XML-RPC</a></h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=1151970&sid=15334218aa8af5c5231c31a75b889bdf" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=1151970&sid=15334218aa8af5c5231c31a75b889bdf#p1151970" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #660099;" class="username-coloured">AmyStephen</a></strong> » </span>Fri Jan 11, 2008 11:48 pm </p> <div class="content">Does that completely resolve the problem, and now the Blogger API for xml-rpc is usable?<br /><br />If so, let's get that patch moving into core.</div> <div id="sig1151970" class="signature">~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~ <br /><!-- m --><a class="postlink" href="http://OpenSourceCommunity.org/node/1719/">http://OpenSourceCommunity.org/node/1719/</a><!-- m --></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <hr class="divider" /> <div id="p1151999" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile1151999"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="avatar"><img class="avatar" src="./download/file.php?avatar=2516.png" width="100" height="91" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="username">cacimar</a> </dt> <dd class="profile-rank">Joomla! Apprentice<br /><img src="./images/ranks/apprentice.png" alt="Joomla! Apprentice" title="Joomla! Apprentice" /></dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=2516&sr=posts&sid=15334218aa8af5c5231c31a75b889bdf">13</a></dd> <dd class="profile-joined"><strong>Joined:</strong> Sun Aug 28, 2005 10:29 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Austin, TX</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact cacimar"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact cacimar</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.drapetomaniacs.com" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="ymsgr:sendim?rich_vazquez" title="Yahoo Messenger" class="last-cell"> <span class="contact-icon phpbb_yahoo-icon">Yahoo Messenger</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content1151999"> <h3 ><a href="#p1151999">Re: Trying to find the right way to use XML-RPC</a></h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=1151999&sid=15334218aa8af5c5231c31a75b889bdf" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=1151999&sid=15334218aa8af5c5231c31a75b889bdf#p1151999" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="username">cacimar</a></strong> » </span>Sat Jan 12, 2008 12:26 am </p> <div class="content">I only changed how I was using existing code.  In other words, I was using Joomla wrong - but it is also undocumented.  <br />No change to Joomla.<br /><br />I'm going to tinker with it more and try to summarize what I've found.  The initial problem I'm trying to solve is "documenting existing functionality."  I'm interesting in expanding the functionality, but I need to figure where we are first.<br /><br />I have a specific need I'll have to work towards first, which is massive importing from xml exported from another common program (deadlining in February) - but I honestly believe the functionality will require fleshing out something already existing and taking advantage of it, so hopefully I'll at least be able to  document it for people to take advantage of.  I get the impression people are really looking for a full implementation of a common API used by the many clients out there. <br /><br />But, right now, as Joomla is, you can programatically:<br />-getRecentPosts<br />-newPost - post uncategorized messages<br />-getUserInfo<br /><br />untested but things appear to be in order:<br />deletePost<br />editPost<br />getPost<br /><br />I believe is irrelevant:<br />getUserBlogs</div> <div id="sig1151999" class="signature">--<br />Rich Vázquez, CISA, CISSP<br /><a href="http://www.impactnews.com" class="postlink">ImpactNews.com</a> -- soon to be Joomla!</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <hr class="divider" /> <div id="p1152014" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile1152014"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" class="avatar"><img class="avatar" src="./download/file.php?avatar=75461.jpg" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #660099;" class="username-coloured">AmyStephen</a> </dt> <dd class="profile-rank">Joomla! Guru<br /><img src="./images/ranks/guru.png" alt="Joomla! Guru" title="Joomla! Guru" /></dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=75461&sr=posts&sid=15334218aa8af5c5231c31a75b889bdf">579</a></dd> <dd class="profile-joined"><strong>Joined:</strong> Wed Nov 22, 2006 3:35 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Nebraska</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact AmyStephen"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact AmyStephen</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://OpenSourceCommunity.org" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content1152014"> <h3 ><a href="#p1152014">Re: Trying to find the right way to use XML-RPC</a></h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=1152014&sid=15334218aa8af5c5231c31a75b889bdf" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=1152014&sid=15334218aa8af5c5231c31a75b889bdf#p1152014" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&u=75461&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #660099;" class="username-coloured">AmyStephen</a></strong> » </span>Sat Jan 12, 2008 12:47 am </p> <div class="content">That is great! Anything you can shout out on that topic, from time to time will be appreciated. I hope others interested might also join in and you could learn from one another. <br /><br />Good stuff. Appreciate it very much. <br />Amy <img class="smilies" src="./images/smilies/smiley.gif" alt=":)" title="Smiley" /></div> <div id="sig1152014" class="signature">~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~ <br /><!-- m --><a class="postlink" href="http://OpenSourceCommunity.org/node/1719/">http://OpenSourceCommunity.org/node/1719/</a><!-- m --></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <hr class="divider" /> <div id="p1156839" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile1156839"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="avatar"><img class="avatar" src="./download/file.php?avatar=2516.png" width="100" height="91" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="username">cacimar</a> </dt> <dd class="profile-rank">Joomla! Apprentice<br /><img src="./images/ranks/apprentice.png" alt="Joomla! Apprentice" title="Joomla! Apprentice" /></dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=2516&sr=posts&sid=15334218aa8af5c5231c31a75b889bdf">13</a></dd> <dd class="profile-joined"><strong>Joined:</strong> Sun Aug 28, 2005 10:29 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Austin, TX</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact cacimar"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact cacimar</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.drapetomaniacs.com" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="ymsgr:sendim?rich_vazquez" title="Yahoo Messenger" class="last-cell"> <span class="contact-icon phpbb_yahoo-icon">Yahoo Messenger</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content1156839"> <h3 ><a href="#p1156839">Re: Trying to find the right way to use XML-RPC</a></h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=1156839&sid=15334218aa8af5c5231c31a75b889bdf" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=1156839&sid=15334218aa8af5c5231c31a75b889bdf#p1156839" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&u=2516&sid=15334218aa8af5c5231c31a75b889bdf" class="username">cacimar</a></strong> » </span>Tue Jan 15, 2008 7:30 pm </p> <div class="content">Below is a list of the functions and working ruby examples.  Some comments included.  Some more work to be done<br /><br /><div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>require 'xmlrpc/client'<br /><br /># Sets server to my site<br />server = XMLRPC::Client.new2('http://joomla.drapetomanics.com/xmlrpc/index.php')<br /><br />##  function getUserBlogs($appkey, $username, $password)<br />##  Errors out - irrelevant<br /><br /># result = server.call('blogger.getUserBlogs','unused_appkey','admin','password')<br /># puts result <br /><br /><br />##  function getUserInfo($appkey, $username, $password)<br />result = server.call('blogger.getUserInfo','unused_appkey','admin','password')<br />puts result<br /><br />##  function getPost($appkey, $postid, $username, $password)<br /><br />result = server.call('blogger.getPost','unused_appkey','1','admin','password')<br />puts result<br /><br /><br />##  function editPost($appkey, $postid, $username, $password, $content, $publish)<br /><br />result = server.call('blogger.editPost','unused_appkey','2','admin','password','<titel>new content</title>content',true)<br />puts result<br /><br />## XMLRPC::FaultException: Post check failed 2<br /><br /><br />##  function deletePost($appkey, $postid, $username, $password, $publish)<br />result = server.call('blogger.deletePost','unused_appkey','1','admin','password',false)<br />puts result<br /><br />#Missing return value initially<br />#no post afterwards<br /><br /><br /><br />## function getRecentPosts($appkey, $blogid, $username, $password, $numposts)<br />result = server.call('blogger.getRecentPosts','unused_appkey','unused_blogid','admin','password',9)<br />puts result<br /><br /><br />##  function getTemplate($appkey, $blogid, $username, $password, $templateType)<br />## not implemented<br /><br /><br />##  function newPost($appkey, $blogid, $username, $password, $content, $publish)<br />result = server.call('blogger.newPost','unused_appkey','unused_blogid','admin','password','<title>Test Title4</title>test body<strong>bold</strong>', false)<br />puts result</code></pre></div></div> <div id="sig1156839" class="signature">--<br />Rich Vázquez, CISA, CISSP<br /><a href="http://www.impactnews.com" class="postlink">ImpactNews.com</a> -- soon to be Joomla!</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <hr class="divider" /> <div id="p1158129" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile1158129"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=108574&sid=15334218aa8af5c5231c31a75b889bdf" class="avatar"><img class="avatar" src="./download/file.php?avatar=108574.png" width="82" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=108574&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #CC6600;" class="username-coloured">aini</a> </dt> <dd class="profile-rank">Joomla! Fledgling<br /><img src="./images/ranks/fledgling.png" alt="Joomla! Fledgling" title="Joomla! Fledgling" /></dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=108574&sr=posts&sid=15334218aa8af5c5231c31a75b889bdf">4</a></dd> <dd class="profile-joined"><strong>Joined:</strong> Sun Apr 15, 2007 3:17 am</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Taipei, Taiwan</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact aini"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact aini</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://nuraini.net" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content1158129"> <h3 ><a href="#p1158129">Re: Trying to find the right way to use XML-RPC</a></h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=1158129&sid=15334218aa8af5c5231c31a75b889bdf" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=1158129&sid=15334218aa8af5c5231c31a75b889bdf#p1158129" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&u=108574&sid=15334218aa8af5c5231c31a75b889bdf" style="color: #CC6600;" class="username-coloured">aini</a></strong> » </span>Wed Jan 16, 2008 3:02 pm </p> <div class="content">Great, cacimar !!<br /><br />I would love to add some optional things in postNews function  <img class="smilies" src="./images/smilies/wink.gif" alt=";)" title="Wink" /><br /><br />result = server.call('blogger.newPost','unused_appkey','unused_blogid','admin','password','<title>Test Title4The CMStest bodyboldmore and more ', false)
puts result

You can see all this stuff in joomladir/plugins/xmlrpc/blogger.php
just ordinary woman :-[
http://nuraini.net

User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Re: Trying to find the right way to use XML-RPC

Post by cacimar » Wed Jan 16, 2008 3:08 pm

Aini,
When I tested the newPost before - and< more text>didn't seem to work..  The information seemed to go nowhere..  I haven't traced down the functionality there yet.
--
Rich Vázquez, CISA, CISSP
ImpactNews.com -- soon to be Joomla!

User avatar
aini
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Apr 15, 2007 3:17 am
Location: Taipei, Taiwan
Contact:

Re: Trying to find the right way to use XML-RPC

Post by aini » Thu Jan 17, 2008 4:28 am

could you attach your ruby code project ?

I will check it ...
just ordinary woman :-[
http://nuraini.net

User avatar
AmyStephen
Joomla! Guru
Joomla! Guru
Posts: 579
Joined: Wed Nov 22, 2006 3:35 pm
Location: Nebraska
Contact:

Re: Trying to find the right way to use XML-RPC

Post by AmyStephen » Thu Jan 17, 2008 5:23 am

Rich -

You really lucked out. You have a core developer paying attention to your project. I guess you show a little promise!

Thanks, Aini!
Amy :)
~*~ Joomla!'s Queen of the Blues - Jennifer Marriott ~*~
http://OpenSourceCommunity.org/node/1719/

User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Re: Trying to find the right way to use XML-RPC

Post by cacimar » Mon Jan 21, 2008 4:58 pm

aini,
I've attached my basic ruby testing script.

The very last call is the attempt to post.  seems to go nowhere  and   doesn't appear to affect the category or section the new article is assigned to.

I mentioned earlier in the thread, I'm working on this now only in the background, but in early February I'll be working on it more with the hopes of transforming archived xml data (from Adobe inDesign) to a format useable by Joomla and posting it.
Attachments
joomla_rpc.rb.txt
(2.23 KiB) Downloaded 10 times
--
Rich Vázquez, CISA, CISSP
ImpactNews.com -- soon to be Joomla!

User avatar
aini
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Apr 15, 2007 3:17 am
Location: Taipei, Taiwan
Contact:

Re: Trying to find the right way to use XML-RPC

Post by aini » Wed Jan 23, 2008 1:57 pm

Hi Rich,

Well, I fully understand
It was Joomla bugs

I will fix the bug tomorrow  ;)

It sounds you have been working interesting stuff

Thanks in advance
just ordinary woman :-[
http://nuraini.net

User avatar
cacimar
Joomla! Apprentice
Joomla! Apprentice
Posts: 13
Joined: Sun Aug 28, 2005 10:29 pm
Location: Austin, TX
Contact:

Re: Trying to find the right way to use XML-RPC

Post by cacimar » Wed Jan 23, 2008 2:48 pm

Thanks Aini,
Maybe after I see your changes, I'll be able to see enough to contribute more to that area as well.
--
Rich Vázquez, CISA, CISSP
ImpactNews.com -- soon to be Joomla!

User avatar
aini
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sun Apr 15, 2007 3:17 am
Location: Taipei, Taiwan
Contact:

Re: Trying to find the right way to use XML-RPC

Post by aini » Thu Jan 24, 2008 3:52 am

I have put the patch in Joomla Tracker http://joomlacode.org/gf/project/joomla ... em_id=9399

Waiting Q&T to check it

Here is my following patch, You can test it in your PC

Code: Select all

Index: /data1/trunk/plugins/xmlrpc/blogger.php
===================================================================
--- /data1/trunk/plugins/xmlrpc/blogger.php   (revision 9962)
+++ /data1/trunk/plugins/xmlrpc/blogger.php   (working copy)
@@ -428,8 +428,9 @@
       $match = array();
       if ( preg_match('/<more_text>(.+?)<\/more_text>/is', $content, $match) )
       {
-         $fulltext = trim($match[1], ',');
-         $fulltext = explode(',', $fulltext);
+         $fulltext = $match[0];
+         $fulltext = preg_replace('/<more_text>/si', '', $fulltext);
+         $fulltext = preg_replace('/<\/more_text>/si', '', $fulltext);
       }
 
       return $fulltext;



Anyway, for category tag, it is configured by default at blogger plugin configuration

You can see this following code :

Code: Select all

// load the category
$cat =& JTable::getInstance('category');
$cat->load($params->get( 'catid', 1 ));


I will ask in J!Dev List whether we could define any category through XML-RPC
That would be more nice  :-*
just ordinary woman :-[
http://nuraini.net


Post Reply