So you want to integrate Curata with your Drupal site? Here’s how:
- Install BlogAPI, and Services modules
- Enable the above modules, and also “MetaWeblog Provider” and “Old Blogger Provider” for Blog API, and the Services, “Services XMLRPC Server”.
- Under Home » Administration » Structure » Services create a new endpoint of type XMLRPC, both name and endpoint URL should be “curata”.
- Under the resources tab of your newly created service, check all boxes under “blogger” and “metaWeblog” sections.
- At this point you might want to create a new content type for articles published from Curata, it should only contain title, body, image* fields. Having fields other than these, which are required fields, is a problem because will be left blank and therefore prevent Curata from being able to publish. I created a content type called “Curata Article” and referenced it in the step below.
- Next you need to create a Role within Drupal, the only permissions it requires are “Manage content with BlogAPI”, “Administer content”, “Curata Article: Create new content”, “Curata Article: Edit any content”, “Curata Article: Delete any content”. Now create a user with this role assigned.
- In Home » Administration » Configuration » Web services » BlogAPI, set the default provider to “Blogger” and select the content type you will allow Curata to publish to, probably the “Curata Article” content type you created in step 5.
- Now you’re ready to hook up Curata. Login and go to CCS. Under the share menu, click on CMS then “Add CMS channel”.
- Enter your Drupal website URL, the “discover” feature will fail because, unlike WordPress, XMLRPC is not advertised to the world.
- Enter your endpoint URL, should be https://www.example.com/curata and provide the credentials for the user account you created in step 6.
- Click the authenticate button and Curata will connect and get a list of Content Types it can publish to, as defined in step 7.
- The rest of the Curata settings are down to your personal preference. Save all changes and then share some of your approved content from within CCS, ensure it appears in Drupal and you’re all set.
* I have not been able to get Curata to publish images directing into Drupal. To get around this you can edit your “Post Body” field in the Article Display settings within Curata. Here is my post body template:
{% if ARTICLE_PICTURE_URL_FULL %}
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<figure>
<img src="{{ ARTICLE_PICTURE_URL_FULL }}" alt="{{ ARTICLE_TITLE }}">
<figcaption>{{ ARTICLE_TITLE }} <cite>{{ PUBLISHER_NAME }}</cite></figcaption>
</figure>
</div>
{% endif %}
<div class="curata-article-body">
{{ ARTICLE_FULL_HTML }}
<a target="_blank" href="{{ ARTICLE_URL }}">Read the source article at {{ PUBLISHER_NAME}}</a>
</div>