<?xml version="1.0"?><!-- RSS generated by Radio UserLand v8.0.8 on Wed, 19 Jun 2002 21:51:19 GMT --><rss version="0.92">	<channel>		<title>Jake Savin: Jake&apos;s Radio Macros</title>		<link>http://radio.weblogs.com/0001000/categories/macros/</link>		<description>Macros you can use in Radio UserLand posts and templates</description>		<language>en</language>		<copyright>Copyright 2002 Jake Savin</copyright>		<lastBuildDate>Wed, 19 Jun 2002 21:51:19 GMT</lastBuildDate>		<docs>http://backend.userland.com/rss092</docs>		<managingEditor>jake@jspace.org</managingEditor>		<webMaster>jake@jspace.org</webMaster>		<cloud domain="radio.xmlstoragesystem.com" port="80" path="/RPC2" registerProcedure="ourFavoriteSongs.rssPleaseNotify" protocol="xml-rpc"/>		<item>			<title>Related according to the Google API</title>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/06/19.html#a633</link>			<description>&lt;a href=&quot;http://doc.weblogs.com/2002/06/19#theGrowingGooglestructure&quot;&gt;Doc Searls&lt;/a&gt;, &lt;a href=&quot;http://radio.weblogs.com/0101679/2002/06/19.html#a586&quot;&gt;Sam Ruby&lt;/a&gt;, and &lt;a href=&quot;http://www.way.nu/archives/000259.html#000259&quot;&gt;Jonathan Peterson&lt;/a&gt; are all pointing at Dave Sifry&apos;s Google API &lt;a href=&quot;http://www.sifry.com/alerts/archives/000069.html#000069&quot;&gt;hack&lt;/a&gt; for Moveable Type.Sifry writes: &quot;Look down at the bottom of this blog entry. You&apos;ll see a line that starts, &apos;Related Stories:&apos; followed by 10 links. These links are created by a google search on the words in the title of this blog entry.&quot;It turns out that this is pretty easy to do in Radio as well. As a test, I created a macro called googleTitleSearch, which you can drop in your Macros folder. With the addition of a snippet of code to my item template, I now have the top 10 Google results for the title of my weblog posts.If you want to try it out, here&apos;s how:Note: You must first create an account with Google, and configure Radio to use the key associated with your account. Follow steps 3 and 4a on this &lt;a href=&quot;http://radio.userland.com/googleApi#howTo&quot;&gt;page&lt;/a&gt; to get your key.If you want something simpler that doesn&apos;t require signing up with Google, you might try out the &lt;a href=&quot;http://radio.userland.com/googleItMacro&quot;&gt;googleIt&lt;/a&gt; macro.1) Download &lt;a href=&quot;http://radio.weblogs.com/0001000/userland/samples/googleTitleSearch.txt&quot;&gt;googleTitleSearch.txt&lt;/a&gt; to your Macros folder. (It&apos;s a sub-folder of your Radio UserLand program folder.)2) &lt;a href=&quot;http://127.0.0.1:5335/system/pages/prefs?page=3.4&quot;&gt;Edit&lt;/a&gt; your item template, adding the following macro to the template, where you want the search results to appear:&amp;#60;%local (adrpost = @weblogData.posts.[&quot;&amp;#60;%paddedItemNum%&gt;&quot;]); return (googleTitleSearch (adrpost))%&gt;(Be careful to make sure that the macro appears on a single line in your template. Line-breaks in the macro will cause an error on your page.)3) Make sure that the &lt;a href=&quot;http://127.0.0.1:5335/system/pages/prefs?page=2.13&quot;&gt;preference&lt;/a&gt; for Item-level Title and Link is checked.4) &lt;a href=&quot;http://127.0.0.1:5335/&quot;&gt;Create&lt;/a&gt; a new post, with a title. Click the Post button.That&apos;s it. For any posts that have a title, you&apos;ll get a Google search result for the words in the title, along with your post.</description>			</item>		<item>			<title>Adding a date to your Radio archive pages</title>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/06/19.html#a630</link>			<description>Day 8 of Mark Pilgrim&apos;s &quot;30 days to a more accessible weblog&quot;: &lt;a href=&quot;http://diveintomark.org/archives/2002/06/19.html#day_8_constructing_meaningful_page_titles&quot;&gt;Constructing meaningful page titles&lt;/a&gt;. Mark writes:&lt;blockquote&gt;&quot;Every page of your weblog should have a unique and meaningful page title... Date-based archive pages should include the name of your weblog, followed by the date (or date range) for the page...&quot;Unfortunately, I do not know how to customize page titles satisfactorily in Blogger or Radio.  Radio has a &lt;code&gt;&amp;#60;%longDate%&gt;&lt;/code&gt; macro, but it can not be used as part of the page title...&quot;&lt;/blockquote&gt;It&apos;s true that longDate doesn&apos;t work in the template, but there is a way to do this. Here&apos;s how:1. &lt;a href=&quot;http://127.0.0.1:5335/system/pages/prefs?page=3.2&quot;&gt;Edit&lt;/a&gt; your home page template.2. Find the line (probably near the top) which reads:&lt;code&gt;&amp;#60;title&gt;&amp;#60;%title%&gt;&amp;#60;/title&gt;&lt;/code&gt;3. Between &amp;#60;%title%&gt; and &amp;#60;/title&gt;, add the following macro:&lt;code&gt;&amp;#60;%local (d); if radio.weblog.file.getArchiveFileDate (radioResponder.fileBeingRendered, @d) {&quot;: &quot; + string.dateString (d)} else {&quot;&quot;}%&gt;&lt;/code&gt;Note: be careful if you copy and paste this code -- there should be no line-breaks.4. Click the Submit button.The next time any of your archive pages are published, they&apos;ll have a date in their title.There&apos;s no need to stick with the default date format. You can format the date however you want -- Just replace the string.dateString (d) part with your own code. See the DocServer pages for the &lt;a href=&quot;http://docserver.userland.com/date/&quot;&gt;date&lt;/a&gt; and &lt;a href=&quot;http://docserver.userland.com/string/&quot;&gt;string&lt;/a&gt; verbs for some places to start digging.</description>			<source url="http://diveintomark.org/xml/rss.php">dive into mark</source>			</item>		<item>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/05/28.html#a514</link>			<description>&lt;P&gt;&lt;A href=&quot;http://radio.userland.com/discuss/msgReader$15131?mode=day&quot;&gt;Mikkel Bruun asked&lt;/A&gt; on the Radio UserLand discussion group how to get a 24-hour time-stamp on his weblog posts. Here&apos;s a macro for the item template, that returns a 24-hour time stamp. Use it in place of the &amp;lt;%when%&amp;gt; macro:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&amp;lt;%&lt;BR&gt;local (d = weblogData.posts.[&quot;&amp;lt;%paddedItemNum%&amp;gt;&quot;].when);&lt;BR&gt;local (day, month, year, hour, minute, second);&lt;BR&gt;date.get (d, @day, @month, @year, @hour, @minute, @second);&lt;BR&gt;hour = string.padWithZeros (hour, 2);&lt;BR&gt;minute = string.padWithZeros (minute, 2);&lt;BR&gt;second = string.padWithZeros (second, 2);&lt;BR&gt;return (hour + &quot;:&quot; + minute + &quot;&apos;&quot; + second)&lt;BR&gt;%&amp;gt;&lt;/CODE&gt;&lt;/P&gt;</description>			</item>		<item>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/02/01.html#a254</link>			<description>At Dave&apos;s request, I started a new category for documenting my ongoing Radio development work. It&apos;s rendered in HTML &lt;a href=&quot;http://radio.weblogs.com/0001000/categories/radioDevelopment/&quot;&gt;here&lt;/a&gt;, and you can subscribe to it by clicking &lt;a href=&quot;http://127.0.0.1:5335/system/pages/subscriptions?url=http%3A%2F%2Fradio.weblogs.com%2F0001000%2Fcategories%2FradioDevelopment%2Frss.xml&quot;&gt;this link&lt;/a&gt;.</description>			</item>		<item>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/01/14.html#a184</link>			<description>Here&apos;s a macro that lists all of your stories by title, with links to the stories. The list isn&apos;t sorted, but a somewhat adventuresome macro-writer should be able to figure out how to do that without much trouble. &quot;;-&gt;&quot;&lt;pre&gt;&amp;lt;%local (s = &quot;&quot;, pc = file.getPathChar ());local (folder);folder = user.radio.prefs.wwwFolder + &quot;stories&quot; + pc;fileloop (f in folder, infinity) {   if file.fileFromPath (f) == &quot;index.txt&quot; {continue};   local (adrfile = @user.radio.settings.files.[f]);   if defined (adrfile^) and (adrfile^.upstream.url != &quot;&quot;) {      s = s + &quot;&amp;lt;a href=&amp;#092;&quot;&quot; + adrfile^.upstream.url + &quot;&amp;#092;&quot;&gt;&quot;;      s = s + adrfile^.title;      s = s + &quot;&amp;lt;/a&gt;&quot;;      s = s + &quot; (&quot; + date.shortString (adrfile^.postTime) + &quot;)&quot;;      };   };return (s)%&gt;&lt;/pre&gt;</description>			</item>		<item>			<link>http://radio.weblogs.com/0001000/categories/macros/2002/01/12.html#a173</link>			<description>&lt;i&gt;This is the first post to my &lt;a href=&quot;http://radio.weblogs.com/0001000/categories/macros/&quot;&gt;Macros&lt;/a&gt; category!&lt;/i&gt;&lt;br&gt;&lt;br&gt;Here&apos;s a neat little trick for changing the date format in your &lt;a href=&quot;http://127.0.0.1:5335/system/pages/prefs?page=3.3&quot;&gt;Day template&lt;/a&gt;. I wanted my dates to show up in YYYY.MM.DD format, so I changed &amp;lt;%longDate%&gt; in my Day template to the following:&lt;br&gt;&lt;br&gt;&lt;code&gt;&amp;lt;%local (d = date (&quot;&amp;lt;%shortDate%&gt;&quot;));&lt;br&gt;local (month = string.padWithZeros (date.month (d), 2));&lt;br&gt;local (day = string.padWithZeros (date.day (d), 2));&lt;br&gt;return (date.year (d) + &quot;.&quot; + month + &quot;.&quot; + day)%&gt;&lt;/code&gt;</description>			</item>		</channel>	</rss>