Instant Outline Manager Macro

Dann Sheridan radio-outline@userland.com
Sat, 30 Mar 2002 13:44:24 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0332_01C1D7F1.011BBDD0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_001_0333_01C1D7F1.011BBDD0"


------=_NextPart_001_0333_01C1D7F1.011BBDD0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

One of the things that I think people can do with Instant Outlines is =
produce topical outlines that represent a very concise, targeted bodies =
of knowledge.  This means that you will be managing multiple outlines.  =
This would be kind of like managing the links in your left hand =
navigation.  I took Dave's drawLeftLinks macro and hacked it for =
managing multiple I/O's.

I have attached the macro, ioLinks.txt.  It takes a single parameter, a =
URL to the OPML file that contains the I/O descriptions and links.  Here =
is a sample call to this macro:

<%ioLinks("http://radio.weblogs.com/[usernum]/instantOutliner/Outlines.op=
ml")%>

Once in your templates, it will produce a list of I/O's on your page =
with a link and an orange OPML button linked to the outlinerSubscribe =
page in Radio.  You can see an example of this macro at work on my =
weblog under the calendar:

http://radio.weblogs.com/0001134/

Enjoy!

-Dann


------=_NextPart_001_0333_01C1D7F1.011BBDD0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>
<DIV><FONT face=3DArial size=3D2>One of the things that I =
think&nbsp;people=20
can&nbsp;do with Instant Outlines is produce topical outlines that =
represent a=20
very concise, targeted bodies of knowledge.&nbsp; This means that you =
will be=20
managing multiple outlines.&nbsp; This would be kind of like managing =
the links=20
in your left hand navigation.&nbsp; I took Dave's drawLeftLinks macro =
and hacked=20
it for managing multiple I/O's.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have attached the macro, =
ioLinks.txt.&nbsp; It=20
takes a single parameter, a URL to the OPML file that contains the I/O=20
descriptions and links.&nbsp; Here is a sample call to this =
macro:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;%ioLinks("<A=20
href=3D'http://radio.weblogs.com/[usernum]/instantOutliner/Outlines.opml"=
)%'>http://radio.weblogs.com/[usernum]/instantOutliner/Outlines.opml")%</=
A>&gt;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Once in your templates,&nbsp;it will =
produce a list=20
of I/O's on your page with a link and an orange OPML button linked to =
the=20
outlinerSubscribe page in Radio.&nbsp; You can see an example of this =
macro at=20
work on my weblog under the calendar:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><A=20
href=3D"http://radio.weblogs.com/0001134/">http://radio.weblogs.com/00011=
34/</A></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Enjoy!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-Dann</FONT></DIV>
<DIV>&nbsp;</DIV></DIV></BODY></HTML>

------=_NextPart_001_0333_01C1D7F1.011BBDD0--

------=_NextPart_000_0332_01C1D7F1.011BBDD0
Content-Type: text/plain;
	name="ioLinks.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="ioLinks.txt"

on ioLinks (url) {
	local (xmltext =3D tcp.httpReadUrl (url), xstruct);
	xml.compile (xmltext, @xstruct);
	local (adropml =3D xml.getAddress (@xstruct, "opml"));
	local (adrbody =3D xml.getAddress (adropml, "body"));
	local (htmltext =3D "", indentlevel =3D 0);
	on add (s) {
		htmltext =3D htmltext + string.filledstring ("\t", indentlevel) + s + =
"\r"};
	local (adr);
	for adr in adrbody {
		if nameof (adr^) contains "outline" {
			local (ioUrl=3Dadr^.["/atts"].url);
			local (ioDescription=3Dadr^.["/atts"].text);
			local (subUrl =3D =
"http://127.0.0.1:5335/system/pages/outlinerSubscribe?url=3D" + =
string.urlencode(ioUrl) + "&author=3D" + string.urlencode(ioDescription) =
+ "&weblog=3D" + string.urlencode (radio.weblog.getUrl ()));
			add ("<a href=3D\"" + subUrl + "\">" + ioDescription + "</a><br><a =
href=3D\"" + subUrl + "\"><img =
src=3D\"http://radio.weblogs.com/0001134/images/opml.gif\" =
width=3D\"36\" height=3D\"14\" border=3D\"0\" alt=3D\"Click on image to =
add this Instant Outline to your Radio UserLand buddy =
list.\"></a><br><br>")}};
	return (htmltext)}
------=_NextPart_000_0332_01C1D7F1.011BBDD0--