mo.notono.us

Friday, October 19, 2007

How to send arbitrary text through Google SMS

<html>
<head><title>SMS</title></head>
<body onload='document.getElementById("smsform").submit();'>
<form id='smsform' method='POST'  target='foo' action='http://www.google.com/sendtophone'>
<input type='hidden' name='text' value="Testing 1-2-3"/>
<input type='hidden' name='client' value="navclient-ffsms"/>
<noscript><input type='submit' name='&gt;'/></noscript>
</form>
<iframe name='foo' width='420' height='500' />
</body>
</html>

Labels: , ,

Monday, October 08, 2007

Announcing squrl.us

Squrl.us (Short, Quick URLs) is a side project I've been putting together over some weekends and weeknights lately.  Essentially it is a tinyurl clone, but with added functionality, and a cuter look.

It's all really quite simple:  You enter a long and unruly url, press the Scurry button, and in return get a number of short, quick urls that are easy to remember, jot down, or communicate verbally.

For example, the url http://www.spiegel.de/panorama/leute/0,1518,510187,00.html is converted to

The squrl is just a redirection to the original link, the mobile link uses Skweezer.net to render a mobile-friendly version, the cache link goes to the Google cache for the url, and the translated link is to Google's automatic translation service (note this only works for non-English pages).

The whole thing is running on ASP.NET 3.5 with C# 3.0 and Linq (for the heck of it), and SQL Server Express 2005 (this may be migrated to MySQL 5.0 due to server constraints).

Go try it out!

Labels: , , , , ,

Wednesday, October 03, 2007

MOSS: The ViewStyle Tag

Side note: I thought I had blogged on this before, but I can't find any evidence that I did...

One of the more daunting tasks of SharePoint development is modifying the schema.xml files of a List definition;  the CAML of the ViewHeader, ViewBody, ViewFooter, etc elements is tedious to wade through.  Granted, if you need a custom view, you can simply copy and paste from an existing view, then modify as needed, but that adds over 1600 lines of XML to your Schema file.  Not much fun.

Turns out there is a much simpler way:  If you don’t have any need for custom rendering of the View, you can use one of the standard styles defined in the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\XML\VWSTYLES.XML file.  These are the same views that are accessible from the SharePoint UI under View – Modify This View  -  Style group.

To apply one of these styles, use the ID attribute of the style from the VWSTYLES.XML file and add a <ViewStyle ID=”x” /> element to your View in the schema file.  Then safely remove the ViewHeader, ViewFooter, ViewBody, ViewEmpty, GroupByHeader, GroupByFooter, PagedRowset, PagedClientCallbackRowset, and PagedRecurrenceRowset tags.  That's a lot of XML saved.

Internally, the SPView.ApplyStyle() method is then called, and any View styles defined in the Schema file are overridden by the ViewStyle definition.  (It is unknown how/if PagedClientCallbackRowset, PagedRecurrenceRowset, PagedRowset and other View child elements get their values set by the ViewStyle – that part of the code base is obfuscated.)

Labels: , ,