Mon 27th Mar 2006
Posted in the evening, filed under
Blogsome ,
Smarty Templates.
The Smarty Modifier “Human Age” works well under Blogsome, I’ll ask the admins to install it.
It’s used like:
{capture name=pdate}{the_time d="U"}{/capture}
{capture name=cdate}{comment_date d="U"}{/capture}
{assign var=since value=$smarty.capture.pdate|human_age:$smarty.capture.cdate:true:2}
Then, where you want the data to go:
{$since} after the fact.
Note: this is not installed on the main Blogsome server yet.
However, you can already use:
{human_time_diff from=$smarty.capture.pdate to=$smarty.capture.cdate}
after having captured the dates. It isn’t quite as nice as the other version, as it only displays minutes/hours/days, but it will do for now.
Mon 27th Mar 2006
Posted late afternoon, filed under
Asides ,
JavaScript.
Here’s a nice little bit of JavaScript that grabs the Trackback URI of the current post. I’m not quite sure how to use it yet. It would be nice to be able to automatically add this to the BlogThis link, but there’s no way to do so, since cross-site scripting is disabled.
document.body.innerHTML.split("trackback:ping=\"")[1].split("\"")[0];
The other thing that might be cool is to copy this to the clipboard, but I’m a bit loath to do things like that which are “invisible” to a user.
Mon 27th Mar 2006
Posted mid-afternoon, filed under
Blogsome ,
Smarty Templates.
Michael, over at Binary Bonsai, has written about how he turns off Google Ads (or any other type of text) for readers who have commented.
No Ads for Regulars at Binary Bonsai
Here’s how to do the same thing at Blogsome, using Smarty Tags. Just before your Ad Block:
{if $comment_author == ""}
And then after, use:
{/if}
Then, readers who have commented on your blog won’t see your Advertisement(s).
This only seems to work on a Post page. For some reason the cookie isn’t checked on other pages. I’m still looking into this.
Mon 27th Mar 2006
Posted early afternoon, filed under
General.
I didn’t realise that PNG file sizes could vary so much. I was taking a screenshot using Windows, and initially, saving it in Paint, and then using Microsoft Office Image Manager to convert it to a PNG. Then I discovered the machine I was on had Fireworks, so I pasted directly into that, and saved as a PNG.
The Fireworks PNG was around 3-5 times as large as the other one. I would have pegged it as being the other way around.
I actually came across a program I had downloaded the other day that is a one-trick pony - it compresses PNG images. This made a similar difference in sizes.
Mon 27th Mar 2006
Posted early afternoon, filed under
General ,
JavaScript.
It’s amazing how much and how quickly one can change their attitude towards things.
Take the following comment (by me), posted on the Blogsome Forums on Sun Aug 07, 2005 10:28 am.
I try and avoid JavaScript where possible , and cannot tell you if that is valid code or not.
What I would suggest is that that code does not belong in the StyleSheet - put it in the Main page template, and see how that goes.
(more…)
Mon 27th Mar 2006
Posted late in the morning, filed under
Rants and Raves ,
Scholaris.
When I try to Assess student work using Scholaris, I come across the following error:

Class: Assessment
Function: GetAssessmentVerbages(ByVal FrameworkID As String, ByVal SchoolID As String) As DataTable
Current function cannot be executed due to the following reason:
*FrameworkID is empty
Please take a screen shot of this error message and send it to support@solutionsit.com.au
It then doesn’t display the student work that was submitted, and I can’t mark it, or return it to the student. I get several other functions giving the same error, two on the way in, and three on the way out.
Very annoying, as it means I can’t complete the full cycle of assessment usign this tool, which means I’ve hit the limits of it’s usefulness for now.