Build Your Own *form Task, part 3

Posted on September 9, 2011
Filed Under Splatforms | 24 Comments | Share this post via splatforms.com

In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to produce a new Task that will post an Event *form to HubPages.

Event *forms are one of two *form Types that can be represented as microformats (the other is the Contact *form). Many Tasks that post Event *form data target calendar web sites that have specific fields for the various properties of an Event such as the description, location, start date/time and end date/time. You can also post an Event to a simple publishing destination, however, and just format the properties of the Event for display. In those circumstances, it is always nice to format the Event using the rules for an hcalendar microformat. One of many existing Tasks that already does that is the Task that posts an Event *form to Tumblr, which happens to be Task #28. Since someone has already gone to the trouble of working out all of those details, the quickest way to set up a new Task to post an Event to HubPages would be to start with the Task that posts a Link, just like we did before, and replace the Link data with the formatted Event data, which we can lift right out of the existing Tumblr Task.

So, let’s start out with another copy of our old friend, Task #520, “Post Link to a HubPages Hub”:

http://splatforms.com/data/task2.php/520

Once again, we are simply changing parameters to be posted in the final step — everything else remains the same. Events do not have a “title” property, but they do have an “event” property that can serve as a tile, so let’s change this parameter:

title=$!title

…to this:

title=$!event

The only other thing that we need to do is to change the content parameter, and for that, let’s take a quick look at our source Task, #28:

http://splatforms.com/data/task2.php/28

This Task, which is a one-step POSTing Task that leverages the Tumblr API, contains a POST parameter called body, which is what we want to snag for the basis of our own content parameter. Our existing content parameter does have some interesting stuff that we might want to hang on to, though, so let’s take a quick peek before we get to carried away.

<p><em>Posted:</em> $rightNow.toString("EEE, MMMM d, yyyy 'at'
hh:mm aaa")<br/><em>From:</em> <a href="$url"
target="_blank">$url</a></p>
<p>$comments.replace("\n","</p><p>")</p>
<p><em>Tags:</em> $tags</p>

That first line publishes the posting date, which is actually useful information and worth keeping around, so let’s drop everything else, but leave that part in place:

<p><em>Posted:</em> $rightNow.toString("EEE, MMMM d, yyyy 'at'
hh:mm aaa")</p>

Now all we need to do is add in the microformatted event code that we lifted from the Tumblr task, and we now have a new value for the content parameter:

<p><em>Posted:</em> $rightNow.toString("EEE, MMMM d, yyyy 'at'
hh:mm aaa")</p><div class="vevent"><p><strong>#if($url)<a
class="summary url" target="_blank" href="$url">$event</a>#else
<span class="summary">$event</span>#end</strong></p><p>
<em>When:</em> <abbr class="dtstart" title="$startDate">
$dtstart.toString("m/d/yy hh:mm a")</abbr><br/>#if($endDate)
#if($endDate!="")<em>Ends:</em>  <abbr class="dtend"
title="$endDate">$dtend.toString("m/d/yy hh:mm a")</abbr><br/>
#end #end #if($location)#if($location!="")<em>Where:</em>
<span class="location">$location</span>#end #end
#if($description)#if($description!="")</p><p
class="description">$description</p>#end #end</div>

That’s it. Now we have a new Task to post an Event *form to HubPages, and do it in a way that makes the Event visible to any tool that recognizes microformats. And we really didn’t have to do much of the work at all! It was all from parts and pieces that we found laying around.

There are plenty of working Tasks out there to grab and start playing with. A little of this Task mixed with a little of that Task mixed with a dash of your own unique stylings and all of sudden there’s a brand new Task in the pile. Go ahead — give it a try. You might even find yourself having a little fun with all of the possibilities!

Comments

24 Responses to “Build Your Own *form Task, part 3”

  1. pligg.com on September 9th, 2011 7:34 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  2. pligg.com on September 9th, 2011 7:38 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step fu…

  3. pligg.com on September 9th, 2011 7:46 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form t…

  4. yebooo.com on September 9th, 2011 7:57 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form t…

  5. newsmarking.com on September 9th, 2011 8:12 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  6. addsharer.com on September 9th, 2011 8:27 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  7. tomoroku.com on September 9th, 2011 8:33 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  8. ithemes.org on September 9th, 2011 8:48 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  9. moomdigg.com on September 9th, 2011 8:50 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  10. telesmatic.com on September 9th, 2011 8:55 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form t…

  11. Yemle.com on September 9th, 2011 9:09 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step fu…

  12. xehh.com on September 9th, 2011 9:30 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  13. madstyles.com on September 9th, 2011 9:42 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  14. merolinks.com on September 9th, 2011 9:47 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  15. chuv.com.ua on September 9th, 2011 9:48 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  16. pligg.com on September 9th, 2011 9:59 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted…

  17. socn.spx.at on September 9th, 2011 10:04 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form t…

  18. v12.me on September 9th, 2011 10:16 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  19. orthodoxstuff.com on September 9th, 2011 10:21 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  20. socialbookmarking.co.in on September 9th, 2011 10:23 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…

  21. marketguild.com on September 9th, 2011 10:25 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task…

  22. cvul.com on September 9th, 2011 10:48 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step fu…

  23. SERPD on September 9th, 2011 10:55 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step fu……

  24. Dekut.com on September 9th, 2011 11:09 pm

    Build Your Own *form Task, part 3…

    In the last installment of this series we took an existing *form Task that posted a Link *form to HubPages and converted it to post an Article *form to HubPages. Today we’re going go one step further and combine elements of two working Tasks to p…