We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32942
    • 141 Posts
    UPDATED

    Hello cool

    As you know people except developers are very lazy.
    So http://www.blogdesk.org/ developed a Publishing tool which works with most CMS or Blogs, but MODx.

    Can you please tell us MODx Users howto setup the XML-RPC API to be able to publish with BlogDesk?
    Or howto install the XML-RPC API.
    I heard about pingback, trackback, XHTML friends network (xfn) and XHTML friends network mind-mapper.
    I want all of them in MODx, because they are free, innovative and revolutionary, can someone help me and other setting things up?


    Step 1: -> Choose Name:
    Step 2: -> Blog-URL:
    Step 3: -> Choose Publishing System -> Other
    Step 4: -> Define Entry-Point and Port -> THIS IS THE STEP I GOT STUCK AT

    wordpress people can use ie.: "http://mysite.com/xmlrpc.php"
    Step 5: -> Login and Password -> Advanced Properties allow SSL secured connection
    Step 6: -> Enter Blog-ID or Generate it
    (Very confusing to me as MODx User)


    Oh lord, please make MODx BlogDesk compatible....



      • 25663 MODX Staff
      • 12,272 Posts
      I think you’ll see that quite soon, native to MODx. In the interim, you might ask ScottyD as he’s doing the same thing with cmdctrl.php included with his OS X application for editing MODx content.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 26435
        • 1,193 Posts
        Writing a XML-RPC server for a framework such as MODx is no trivial task (as I am painfully learning). There are lots and lots and lots of potential security mistakes to make, leaving your database open to any number of attackers.

        There are a couple of things I would suggest for you to get in line before you start writing you xmlrpc server for MODx Xsss4hell:

        Start with an already established method for managing XML-RPC Methods. I chose to base my server on The Incutio XML-RPC Library for PHP ( http://scripts.incutio.com/xmlrpc/ ).

        Second, you should get yourself intimately familiar with the MODx database structure and, as I found out into my project, you should understand how to instantiate a new documentParser by include the document parser class in the manager’s includes folder. That way, you will have access to the MODx document object and the objects that snippet developers have access to such as the DBAPI and $modx->getAllChildren(). And one of the things I found out late in the game, re-syncing the site cache map by including cache_sync.class.processor.php and instantiating a new synccache();.

        When you are comfortable enough with all that, then comes the hard part of learning the Blogdesk API. I haven’t looked at their site, but if you are lucky, then they have it documented there, and maybe even have a support forum. You will have to understand how their API works to translate between Blogdesk and MODx. then, once you understand both the MODx backend AND the Blogdesk API, you should be able to write an XML-RPC server for MODx with functions to gather and set data based on hooks from the blogdesk API.

        This is going to be a HUGE challenge, so I wish you much luck Xsss4hell. Be persistent, stick with it, and I am sure you can achieve your goal of writing an XML-RPC server for MODx <--> Blogdesk!

        Keep us posted with your progress Xsss4hell.

        -sD-
        Dr. Scotty Delicious, Scientist.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages
          • 22303 MODX Staff
          • 10,725 Posts
          Just FYI, on the topic of XML-RPC, I just checked-in baseline XML-RPC support into the MODx 0.9.7 branch, and a public alpha of this will be available for preview shortly. This will allow you to define XML-RPC servers (and clients) easily, using MODx documents and snippets. Here is an example XML-RPC server snippet from 0.9.7 that would return all the attributes of any MODx table row by primary key...

          <?php
          if (!function_exists('modx_getobject')) {
              function modx_getobject($m) {
                  global $modx;
                  $pClass = $m->getParam(0);
                  $pPK = $m->getParam(1);
                  $class = $pClass->scalarval();
                  $pk = $pPK->scalarval();
                  if (!$value = $modx->getObject($class, $pk)) {
                      return new xmlrpcresp(0, $GLOBALS['xmlrpcerruser'], 'No object found.');
                  } else {
                      return new xmlrpcresp(php_xmlrpc_encode($value->toArray()));
                  }
              }
          }
          $testsig = array (
              "function" => 'modx_getobject',
              "signature" => array (array ($GLOBALS['xmlrpcArray'],$GLOBALS['xmlrpcString'],$GLOBALS['xmlrpcString'])),
              "docstring" => "Get an object from the model"
          );
          $modx->response->registerService('modx.modx_getobject', $testsig);
          


          NOTE: I chose the XML-RPC for PHP library from http://phpxmlrpc.sourceforge.net/ for the 0.9.7 features, as it offered more automation features that, though they need a little work, will make some really amazing things possible in the near future.
            • 26435
            • 1,193 Posts
            Jason, that looks incredible!

            -sD-
            Dr. Scotty Delicious, Scientist.
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
              • 32942
              • 141 Posts
              Offtopic:
              I am so bad and evil, but It’s not my fault.
              MODx marked me as devil when I became member no.: 6666 and to make this more evil I have 66posts now.. tongue
              info for the conservative ones, combining 666 with saten: I’d to dissappoint you, cuz I have no religion I believe in. I believe in love and kindness.
              There are so many parties, religions and whatever and just more people who believe in them.
              But we forgot that we come from the same species: Humans.
              Uuuunitty

              Ontopic:
              Quote from: OpenGeek at Jan 29, 2007, 12:59 AM


              NOTE: I chose the XML-RPC for PHP library from http://phpxmlrpc.sourceforge.net/ for the 0.9.7 features, as it offered more automation features that, though they need a little work, will make some really amazing things possible in the near future.



              I’m now familiar with XML-RPC ( and pingback, trackback, rdf, owl etc..).
              Damn that was a really hard read, because most sources are technically specifications and there are one to none real live examples existant.

              @OpenGeek Why did you use phpxmlrpc when you have the XML-RPC extension built-in with php all the time. It is written in C ans therefore faster than any virtualization layer that does the same thing.
              Most people have php compiled with -xmlrpc I think it was default, isn’t it?

              So, I don’t know if it is useful to package PHP-XML-RPC with modx, since it is ONLY a virtualization layer of the XML-RPC extension of php itself. Look here for further information: http://www.php.net/manual/en/ref.xmlrpc.php

              But, If you need to use this extension but are stuck on a server where it can not be installed, the php-xmlrpc library found at http://phpxmlrpc.sourceforge.net includes an emulation layer that aims to be 100% compatible with the API of the native extension (as part of the "extras" package since version 0.2).
              This means your code should be able to run unmodified on top of the php-xmlrpc library. Of course performance will be at least an order of magnitude worse...


              I believe there are risks in putting a xmlrpc layer up, but I can tell you it’s worth it.
              Therefore anyone using XML-RPC should imply securtiy advisories before going into production status.

              Please keep me updated with XML-RPC in MODx and maybe I write a JAVA Client to connect from any device and os to your website. v0.001 is always very basic so don’t expect too much. Gonna start writing it next month, when things become more stable on MODx site with xml-rpc and I have time to code laugh

              There something interesting to enthusiasts of frameworks, soap, json and ajax look here(u know I hate advertising, so this is not for promotion, just for knowledge): http://www.xisc.com/ and http://www.pradosoft.com/