Singpolyma

Technical Blog

Archive for the "Tech" Category

New Stuff on Ning

Posted on

This post is to announce two previously unannounced projects of mine over on Ning. I’ve been working on both for some time, and both could do with some more work certainly. Both are ready to be test-driven though (at least in the fundamentals).

The smaller project is Some Blogs. Some Blogs is a reporting engine for personal blogs, sexblogs, and other less-than-public-material blogs. Inspired by splogspot, this index is NOT for splogs (that’s what splogspot is for). It is for material that most people don’t want to see (when I search for XOXO I want microformats articles, not ‘I luv u Jodi!’ :P).

The other, larger, project which benefits from the first is Littl’uns. The original concept was to be like TechMeme for smaller blogs, however the concept has evolved over time and the meme-engine is currently only an experimental ‘related posts’ link.

Nestled in the code for Littl’uns is BSrch, a meta blogsearch engine.

Anyway, enjoy! Report bugs! Give feedback! 😀

The Bleet

Posted on

All geeks have their jargon, and the Blogger hacking community is no exception. One of the big words right now is ‘Bleet’ – the Blogger Elite. First coined by Avatar of Bloggeratto, this term is used to describe the best of the best of the Blogger hackers.

Wh!13 7h!5 m4y 83 r3m3n!53n7 0f 1337, 37c, the term seems to be gaining acceptance among non-hackers as well. Then the question becomes — how do we keep track of who’s ‘in’? 😉

Well, elite coders must write elite code. I’d hazard a guess that all Bleet members must be hacking the new Blogger by now, but what else? Who and what? What do you think?

I have created a survey with only three questions: the URL of a Bleet member (in your opinion), your favourite hack by this member, and one quality you think all Bleet should have. Note to the Bleet : do not vote for yourself!

Fill out the survey

Another note to the Bleet : Check out the Blogger Hacks Wrink and add yourself to it and it to your blog. You can use any of the modes (some people dislike webrings, some dislike extra blogrolls, we have options!) What’s the point? Well, right now that wrink is getting more than 500 traffic a week. This means that each week (unless my stats are broken) at least 500 people travel from one Bleet site to another using this widget. Great way for us to share our traffic with each other!

Static Pages in Blogger

Posted on

This is a long-standing feature/hack request from much of the Blogger community. Pages that are not posts. This hack is a little messy and not the be-all solution, but I feel it is mature enough to publish as a start.

The pages are all addressed as http://yourblog.blogspot.com/?page=pagename

As always there are multiple options for this hack, but the basic starting is the same:

  1. Go to Google Pages (you’re on the new Blogger, you have a Google Account) and create the page you want.
  2. Click the ‘View live’ link from the Google Pages editor (after publishing the page)
  3. Note the URL in the location bar / address bar, you will need it later

You will need to add this code to the <head> section of your blog first time only, subsequent pages you can skip this:

<script src='http://jscripts.ning.com/get.php?xn_auth=no&amp;id=2999987' type='text/javascript'/>

In code that follows, replace the red pagename with the what you want used as pagename in the URL (See above) and the red URL.

If you want to just redirect to the other page (example) use this code:

<script type='text/javascript'>

//make sure the WidgetData object and staticpage section are defined
if(typeof(WidgetData) != ‘object’) WidgetData = {};
if(typeof(WidgetData[‘staticpage’]) != ‘object’) WidgetData[‘staticpage’] = {};

WidgetData[‘staticpage’][‘pagename‘] = {
‘url’:’URL‘,
‘type’:’redirect’
};
</script>

If you want the other page superimposed in an IFRAME (example) use this code:

<script type='text/javascript'>

//make sure the WidgetData object and staticpage section are defined
if(typeof(WidgetData) != ‘object’) WidgetData = {};
if(typeof(WidgetData[‘staticpage’]) != ‘object’) WidgetData[‘staticpage’] = {};

WidgetData[‘staticpage’][‘pagename‘] = {
‘url’:’URL‘,
‘type’:’iframe’
};
</script>

If you want the other page superimposed (example) use this code:

<script type='text/javascript'>

//make sure the WidgetData object and staticpage section are defined
if(typeof(WidgetData) != ‘object’) WidgetData = {};
if(typeof(WidgetData[‘staticpage’]) != ‘object’) WidgetData[‘staticpage’] = {};

WidgetData[‘staticpage’][‘pagename‘] = {
‘url’:’URL
};
</script>

If you want the other page included in a DIV so that it fits better into your page (you must style the DIV so that it works well. The example simply styles it to fill the page), use this code and put a DIV in your code with an ID the same as pagename:

<script type='text/javascript'>

//make sure the WidgetData object and staticpage section are defined
if(typeof(WidgetData) != ‘object’) WidgetData = {};
if(typeof(WidgetData[‘staticpage’]) != ‘object’) WidgetData[‘staticpage’] = {};

WidgetData[‘staticpage’][‘pagename‘] = {
‘url’:’URL
};
</script>

If you want the other page included as an IFRAME in a DIV so that it fits better into your page (you must style the DIV so that it works well. The example simply styles it to fill the page), use this code and put a DIV in your code with an ID the same as pagename:

<script type='text/javascript'>

//make sure the WidgetData object and staticpage section are defined
if(typeof(WidgetData) != ‘object’) WidgetData = {};
if(typeof(WidgetData[‘staticpage’]) != ‘object’) WidgetData[‘staticpage’] = {};

WidgetData[‘staticpage’][‘pagename‘] = {
‘url’:’URL‘,
‘type’:’iframe’
};
</script>

Microsummaries in Blogger

Posted on

I recently learned of the Microsummaries feature of Firefox 2.0 from Aditya.

Basically, when you bookmark a site that supports it there is an option to have Firefox automatically pull in the title of the most recent article (or similar) as the title/label on the bookmark. Like simplified Live Bookmarks. So I created a quick hack to let us generate these with Blogger. If you have marked up your blog with hAtom put this in your <head> section:

<link expr:href='"http://xoxotools.ning.com/extract_by_class.php?xn_auth=no&amp;amp;class=entry-title&amp;amp;url=" + data:blog.homepageUrl + "&amp;amp;_microsummary"' rel='microsummary' />

Otherwise use this code, which should work for 90% of new Blogger blogs:

<link expr:href='"http://xoxotools.ning.com/extract_by_class.php?xn_auth=no&amp;amp;class=post-title&amp;amp;url=" + data:blog.homepageUrl + "&amp;amp;_microsummary"' rel='microsummary' />

hAtom in the New Blogger

Posted on

If that Backup Tool intrigues you, or something else I’ve mentioned regarding hAtom, or just microformats in general, then head over to my instructions on how to markup up New Blogger templates in hAtom.