How to add a Subscribe with Google Reader link to your blog
I have played around with Google Reader lately. I wanted to add a "subscribe with Google Reader" link to my blogs so I created a basic Google Reader subscription generator. Just enter the complete URL of you RSS feed and it generates the Google Reader subscription url:
I generated the "Sub | Google" button using the Button Maker by Adam Kalsey
Add the following to /blog/Skins/your skin/Controls/MyLinks.ascx if you have .TEXT
<asp:HyperLink
ImageUrl="~/images/SubGoogle.png"
Runat="server"
NavigateUrl="Google Reader Subscription URL"
ID="GoogleReader">
Google Reader
</asp:HyperLink>
Here is the complete source code for the Google Reader subscription generator:
<% Option Explicit
Dim blogURL
dim googleURL
%>
<html>
<body>
<h1>Google Reader subscription generator</h1>
<%
blogURL = Request("BlogUrl")
if blogURL <> "" then
googleURL = "http://www.google.com/reader/preview/" & _
Server.URLEncode(blogURL) & "/feed/" & blogURL
%>
The <a href="http://reader.google.com/">Google Reader</a>
subscription url for <b><%=blogURL%> is:</b><br/>
<textarea cols="75" rows="2"><%=googleURL%></textarea>
<br/><br/>
Example: <a href="<%=googleURL%>">
<img src="http://text2blogger.appspot.com/static/egilh/Images/subGoogle.png"></a>
<%
else
%>
<p>
Enter your entire RSS url in the field below to calculate the
<a href="http://reader.google.com/">Google Reader</a>
subscription url.<br/>
Example: http://www.egilh.com/blog/Rss.aspx
</p>
<form action="SubGoogleReader.asp">
Blog RSS Feed <input type="text" name="BlogUrl" size="50"/><br/>
<input type="submit" value="Calculate URL"/>
</form>
<%
end if
%>
</body>
</html>
No comments:
Post a Comment