Singpolyma

Technical Blog

Archive for the "Tech" Category

To the Confused

Posted on

Dear Confused Reader,

You are reading this because much of the Geekery to come out of the Singpolyma – Technical Blog confuses you. The code is far beyond your comprehension, and sometimes so are the instructions. You are the one who emails me your template to hack, instead of hacking it yourself. That’s OK, and I’m willing to help, but in case you wanted to try doing a little bit more yourself….

Hoctro, another brilliant hacker, has written a sort of 101 (or is that 411?) post on hacking your blog, or at least following the instructions to do so. Complete with screenshots illustrating his points, this article will help you understand not only my writings, but those of other Blogger Hackers, forever.

Yours,

Singpolyma

Read Hoctro’s Post (Blogger BETA Only)

Other template-related posts by Hoctro

YubNub LocationBar 0.17

Posted on

I have updated my YubNub Firefox Extension to fix some URL resolution bugs.

Peek-a-boo Link Lists

Posted on

I have fixed a bug that caused multiple instances of this hack to interact with each other and some other IE problems. I have tested it in both Firefox and IE. One extra note about installation – if you put this code into your template more than once at a time (for multiple lists) you must change the id=”ALIST” (bold in the code) to id=”BLIST” on the second list, etc.

I received the request for this hack via email, and since I thought it shouldn’t be too hard and could prove very useful, I went at it. Plus I actually had some time today to use on this kind of thing 😉 To get a link list in Blogger BETA that has a title you can click to show/hide the list, add this code to your template:

<b:widget id=’ALIST’ locked=’false’ title=’List Title’ type=’LinkList’>
<b:includable id=’main’>
<script type=’text/javascript’>
//<![CDATA[
if(typeof(rnd) == ‘undefined’) var rnd = ”;
rnd = Math.floor(Math.random()*1000);
rnd = ‘id-‘ + rnd;
document.write(‘<a href=”#” onclick=”tmp = document.getElementById(&quot;’ + rnd + ‘&quot;); tmp.style.display = (tmp.style.display == &quot;none&quot;) ? &quot;block&quot; : &quot;none&quot;; return false;”>’);
//]]>
</script>
<b:if cond=’data:title’><h2><data:title/></h2></b:if>
<script type=’text/javascript’>
//<![CDATA[
document.write(‘<\/a>’);
//]]>
</script>
<div class=’widget-content’>
<script type=’text/javascript’>
//<![CDATA[
document.write(‘<div id=”‘ + rnd + ‘” style=”display:none;”>’);
//]]>
</script>
<ul>
<b:loop values=’data:links’ var=’link’>
<li><a expr:href=’data:link.target’><data:link.name;
</b:loop>
</ul>
<script type=’text/javascript’>
//<![CDATA[
document.write(‘<\/div>’);
//]]>
</script>
<b:include name=’quickedit’/>
</div>
</b:includable>
</b:widget>

Then go to the ‘Page Elements’ area to customise the title and links in the widget.

The following code is identical except that it leaves the title of the widget alone and adds instead a little [+/-] for show/hide functionality:

<b:widget id=’ALIST’ locked=’false’ title=’List Title’ type=’LinkList’>
<b:includable id=’main’>
<script type=’text/javascript’>
//<![CDATA[
if(typeof(rnd) == ‘undefined’) var rnd = ”;
rnd = Math.floor(Math.random()*1000);
rnd = ‘id-‘ + rnd;
document.write(‘<a href=”#” onclick=”tmp = document.getElementById(&quot;’ + rnd + ‘&quot;); tmp.style.display = (tmp.style.display == &quot;none&quot;) ? &quot;block&quot; : &quot;none&quot;; return false;” style=”float:left;margin-right:5px;”>[+/-]<\/a>’);
//]]>
</script>
<b:if cond=’data:title’><h2><data:title/></h2></b:if>
<div class=’widget-content’>
<script type=’text/javascript’>
//<![CDATA[
document.write(‘<div id=”‘ + rnd + ‘” style=”display:none;”>’);
//]]>
</script>
<ul>
<b:loop values=’data:links’ var=’link’>
<li><a expr:href=’data:link.target’><data:link.name;
</b:loop>
</ul>
<script type=’text/javascript’>
//<![CDATA[
document.write(‘<\/div>’);
//]]>
</script>
<b:include name=’quickedit’/>
</div>
</b:includable>
</b:widget>

Why is this not a one-click widget? Blogger does not yet allow us to define alternate widget types (such as link list) in one click.

WebOS

Posted on

Whoever first came up with the idea of WebOS was a genius. Somehow I doubt it started with Google OS, but my own interest certainly started there.

Soon there was YubNub, the command line for the web. A flexible, open command-line system for the Internet that is practical as well as cool. A backbone kind of application while also being immediately useful to users.

Webtops started popping up, such as those provided by 30boxes and Goowy. They allow you to integrate the major services you use into one convenient location, sort of like an extension of the idea behind Google IG, BoxtheWeb, and others.

Now we have at least two genuine WebOS: YouOS and EyeOS. Both provide their own ‘standard’ way to code apps, with APIs etc to help in GUI and back end building. YouOS allows developers to code and share apps on the public server, as well as allowing users to install these apps. EyeOS requires you set up your own server to install apps, but allows apps to be distributed in an offline format. There are distinct pros and cons to both, and to the APIs provided by both.

WebOS is where it’s at, with YubNub, YouOS, and EyeOS. Each has its own strengths and weaknesses. However, if we want to see true Web 2.0 here we must not repeat the mistake that was made with offline OS. WebOS communities/developers must work together for standards and interoperability, etc. Each will be so much better if it works with the strength of the others.

Peek-a-boo Update

Posted on

My peek-a-boo comments for BETA hack has been updated to use the new native JSONP. It should run faster now and the IE bug some were reporting should be gone.