Digital Tools Microcontent Syndication
beta

You can use the contents of the Digital Tools Microcontent on your site.

Example usage:

If you (will) use the API, you can add your website here:

http://
To undo, write me a mail: mw__@_node3000.de (without underscores). This of course is beta, I will enhance this a little bit in future...

Sites using Microcontent:

How-to

To include entries on your website or blog, simply use the codesnippets below.

Latest Entries

To get the latest entries use
http://microcontent.nodepond.com/syndicate/latest
There is one optional parameter to say the application, how many latest entries you want to show: e=n.
Example for getting the latest 10 entries:
http://microcontent.nodepond.com/syndicate/latest?e=10

Random Entries

To get the random entries use
http://microcontent.nodepond.com/syndicate/random
There is one optional parameter to say the application, how many latest entries you want to show: e=n.
Example for getting 1 random entry:
http://microcontent.nodepond.com/syndicate/random?e=1

Entries by Tag

You can also get entries sorted by tag. Use
http://microcontent.nodepond.com/syndicate/tag

Parameters:
tag [Defines your tag. Default = music] Example: tag=tool
e [Number of entries. Default = 5] Example: e=3
random [Show random entries. If false it will show the latest entries. Default = false] Example: random=true

Example for getting 3 random entries of the tag "tool":
http://microcontent.nodepond.com/syndicate/tag?tag=tool&e=3&random=true

How to embed on your site.

There are many possibilites to embed the content on your site. If you can call snippets from other pages, everything is good. And wheyn will you not able to do this? On every call, there is some .css included. Every single entity on the API has an exclusice .css-tag, so that you are able to have complete control over the style how the content is shown on your page. Simply add some .css-snippets in style-tags (like in the API-call-result) below your API-call. Nevertheless, the defauls should also look good and should be fit in any regular sidebar.

Php

If you your website on a php-ready server (almost all webservers nowadays support php - at least the ones, that have WordPress), you can embed the Microcontent like this:

<?php include 'http://microcontent.nodepond.com/syndicate/latest?e=8'; ?>

If the approach above do not work, for example because your webhost doesn't allow to include external websites directly, you should try this. (Also look here http://support.open-realty.org/showthread.php?t=7073) Figure out, if your webhoster has instlle the cURL package. Simply try this approach, otherwise contact your webhost. Try to embed the API-call with the following code: (in case something won't work, play around with the timeout-values)

<?
$ch = curl_init();
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
curl_setopt($ch, CURLOPT_URL, 'http://microcontent.nodepond.com/syndicate/latest?e=8');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
echo $data;
curl_close($ch);
?>

More info http://de.php.net/manual/de/ref.curl.php and
http://www.higherpass.com/php/tutorials/Using-Curl-To-Query-Remote-Servers/
(although I think I found a little bug at the last sites code.)

Ruby on Rails

If you want to include the API into a Ruby on Rails-applications, your will be like:

<%= Net::HTTP.get(URI.parse('http://microcontent.nodepond.com/syndicate/random?e=1')) %>

More here: http://railsforum.com/viewtopic.php?id=11918

Style it with css!

The single entries have unique-class identifyiers. You can write your own, customized css-file, to display the contents properly on your page. Below are the tags, also with default-values. Simply copy this into your website and style it proplely on your taste. Note: you can also hide content (i.e. if you don't want the tags or the data shown) using the css-display property. display: none; inside the according css-markup will hide the content.

.DT_micro {
}

.DT_micro_title {
  display: none;
}

.DT_micro .DT_micro_headline {
}

.DT_micro .DT_micro_picture {
}

.DT_micro .DT_micro_description {
}

.DT_micro .DT_micro_date {
  display: none;
} 
  
.DT_micro .DT_micro_tags {
  display: none;
}

.DT_micro_info {
  text-align: right;
  font-weight: bold;
}