OCDProgrammer.com

It's Microsoft's World, and I'm just living in it
View Clarence Klopfstein's profile on LinkedIn

Clarence Klopfstein's Facebook profile

This site is under construction...

Categories

New Comments

Referring Sites


Disclaimer

  • This is MY blog. The views represented here are not in relation to anybody else. Please read my full disclaimer for a more complete disclaimer.

Feedburner Email list and DotNetBlogEngine.net - How To

November 10, 2007 07:09 by ckincincy

As I posted about earlier I was made aware of a feature from FeedBurner that allows you to get my post via email.  I wanted to add a side bar item to make it easy for folks, but the supplied code from FeedBurner wouldn't work in ASP.NET.  So I had to make a few changes to how it works.

First I had to add the item to the left bar.  Pretty easy, here is my HTML... yours could be different based on your theme.  This is in my site.master file in my theme directory. 

<h2>Get Post via Email</h2>
<ul>
    <li>
        <asp:TextBox ID="txtFBEmail" runat="server" Width="115px" Height="17px" ></asp:TextBox>
        <asp:Button ID="submit" runat="server" Text="Subscribe" OnClick="submit_Click" Width="75px" />
    </li>
</ul>

Then I had to go to the code behind and add a function to it.  Here is my code, please note the three areas where you need to put your own feedburner information in the URL.  I have also edited my code slightly to post correctly on this blog.  

protected void submit_Click(object sender, EventArgs e)
{
    //This is where I create the CSM
    ClientScriptManager csm = Page.ClientScript;
   
    //This is the money code... this is what makes it work.
    csm.RegisterClientScriptBlock(this.GetType(), "OpenWin",
        "window.open('http://www.feedburner.com/fb/a/" +
        "emailverifySubmit?feedId=YOUR_FEED_ID&email=" +
        txtFBEmail.Text + "&url=http://feeds.feedburner." +
        "com/~e?ffid=YOUR_FEED_ID&title=" +
        "YOUR_BLOG_NAME&loc=en_US', 'popupwindow', " +
        "'scrollbars=yes,width=550,height=520')", true);
   
    //This is just clearing the text box.
    txtFBEmail.Text = "";
}

Now I know there is another way to do this via JavaScript and Client click, but I did this late at night and just wanted something that worked.  Hope it helps you!  And if you're not using FeedBurner... do IT!  


BlogEngine Extension - Quick Links

November 7, 2007 18:42 by ckincincy

I have developed a new extension for the dotnetblogengine.net platform.  This feature will replace certain key words with a link to a site you specify.  I have named it "Quick Links", and using it is rather easy.

After following the README.txt file in the zip file you will see a new tab in your administrative section of your site.

In that page you can specify what words to replace with what links.  For example, I have specified the short cut bcc to be replaced with a link to my church.

The syntax for this would look like: [bcc]Visit my church[/bcc].  I have not installed this on my public blog yet, so this is not a short cut :-)

So download it for yourself! 

QuickLinks.zip (5.41 kb)

One quick note to make is that this will account for some human error but not all.  If you have the following post, with the entry above:

Visit [bcc]my church.

This will not be replaced with a link due to the lack of a closing tag.  However if you have this:

Visit [bcc]my church or some other [some other link]church[/some other link].  But I would prefer if you visit [bcc]my church[/bcc].  

The extension will wrap a link from the first bcc to the last /bcc.  But the middle link would mess it up a bit and the rendering is up to your browser.  So be careful!

Enjoy!