Thursday, November 11, 2010

Jauntlet is Back

Wow! I can’t believe the last post was three years ago. Facebook was just opening its API and I ported Jauntlet to it. I started creating other apps, some of which are still on http://www.tomsapps.com, and they got so much usage that I began to neglect Jauntlet.

Now I’ve finally returned to my true love, Jauntlet. It’s just been ported to my PHP site, so now it will be easier to improve it.

A lot has happened in the past three years in the location based social media space. Check-in sites like Foursquare and GPS-enabled phones are making LBS mainstream. This is a natural fit for Jauntlet and the immediate improvements will be integration with these services.

Monday, June 04, 2007

Facebook API

Facebook opening its platform up with an API is a huge event for products like Jauntlet. People could already add it to their mini-feeds with a click before, but this will allow deep integration with Facebook.

I made the first version at http://apps.facebook.com/jauntlet/. It just adds the Jauntlet to your profile. I hope to expand Jauntlet on the Facebook platform soon.

It is a very particular and complex API. There were not many wrappers for C#.NET, so I actually created PHP site for this. To do it, I had to enable a lot of new services for Jauntlet, which is great if anyone want to build something else on it.

Thursday, May 24, 2007

Travel Planning

I’m very excited about the next set of travel planning features to be added to Jauntlet. The origin of Jauntlet was in enabling travel sharing, but I realized people are putting in their complete itinerary in Jauntlet. This is more information than most travel sites have. With affiliate programs, it’s easy to use this information to provide convenient services to plan travels. The people at Kayak have been very helpful with this.

I think facilitating travel planning could be even more popular than travel sharing. Everyone who travels needs to plan, but not everyone feels the need to share it.

Wednesday, April 11, 2007

New Features

Based on user feedback, I’ve added new functionality to Jauntlet.

  • There is now easy one click adding to Blogger, TypePad, MySpace, and Facebook.
  • The colors on both the HTML and Flash Jauntlets are customizable.
  • There is new map-only Jauntlet.
  • You can now create Jauntlets with more than one destination per day.

Tuesday, February 27, 2007

How to Add Comments to the Main Blog Page of Blogger

The new version of Blogger added many useful features, but it removed one nice capability that the old version had. It is no longer possible to display comments on the main blog page; these are only accessibly on an individual post page.

Luckily, it’s possible to use a little AJAX to scrape the individual post pages and display the comments on the main page. You could also use the RSS feed, but it doesn’t contain the links to the commenters’ profiles.

To do this you need to edit your HTML template. Click “Edit HTML” and make sure the box “Expand Widgets Template” is checked. Now, copy and paste everything into a text editor like Note Pad to make things easier.

The first step is the find the place where the template inserts the comments on the individual post page. It looks something like:

<b:if cond='data:blog.pageType == "item"'>
<b:include data='post' name='comments'/>
</b:if>
Modify it like this:

<b:if cond='data:blog.pageType == "item"'>
<span id='startcomments'></span>
<b:include data='post' name='comments'/>
<span id='endcomments'></span>
<b:else/>
<div expr:id='"comment"+data:post.id'>
<!-- add something here to display if the AJAX fails -->
</div>
<script language='javascript' type='text/javascript'>
showCommentsPost("<data:post.id/>","<data:post.url/>");
</script>
</b:if>
This does several things. On the individual post page, it inserts tags to make it easy to find the comments. On the main page, it adds a div for the comments and a JavaScript function to display the comments. You can put something in the div to display before the comments load or if the AJAX fails.

Now, just add the following JavaScript just before the </head> tag of the template. This basically retrieves each individual post page, finds the comments, and inserts it on the main page.

<script language='javascript' type='text/javascript'>
//<![CDATA[

function getXMLDoc() {
// returns a browser specific xml request object
var x = false;
if(window.XMLHttpRequest) {
try {
x = new XMLHttpRequest();
x.overrideMimeType("text/xml");
} catch(e) { }
} else if(window.ActiveXObject) {
try {
x = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
try {
x = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) { }
}
}
return x;
}

function showCommentsPost(postid,posturl) {
// gets individual post page and inserts comments in main page
try {
var request = getXMLDoc();
if (request) {
request.open("GET", posturl, true);
request.onreadystatechange = function(){
if(request.readyState == 4){
var s = new String (request.responseText);
var ss = "<span id='startcomments'>"+"</span>"
var si = s.indexOf(ss);
ss = "<span id='endcomments'>"+"</span>"
var ei = s.indexOf(ss);
document.getElementById("comment"+postid).innerHTML = s.substring(si+32,ei);
}
};
request.send("");
}
} catch(e) { }
}

//]]>
</script>
Finally, copy and paste the whole template from your text editor into the Blogger Edit Template box and click “Save Template”.

That’s it! You should now be able to display comments on your blog’s main page just like they are here.