Go Back
  • Enabling CAPTCHA on a Sitefinity Blog

    Out of the box, Sitefinity ASP.NET CMS provides several tools to help manage the web site.  One of these tools is the SpamProtector control; this control can be used to prevent SPAM from being posted through public facing forms (blog comments, forums, guestbook, etc).

    The SpamProtector control uses several techniques to identify SPAM.  One of these techniques is CAPTCHA.  By default, CAPTCHA is not enabled on Sitefinity blog comments.  Recently, I was forced to enable CAPTCHA for this blog. 

    Below are the steps involved in enabling CAPTCHA for Sitefinity blog comments:

    Locate the Blog Post SpamProtector Control

    It’s very easy to modify many properties for the Sitefinity’s Blog Posts control.  However, the Basic Blog Posts control editor does not include an option to enable CAPTCHA.

    Sitefinity BlogPosts Control Basic Options

    To get access to the SpamProtector control, the embedded template used by the BlogPosts control needs extracted and modified

    Extract the Blog ...

  • Deleting Sitefinity Blog Comment SPAM

    Terry presents his Internet Marketing Idea Robert quickly entered the conference room as everyone waited expectedly.  Sales had been down for 3 months in a row and rumors foretold the sh*t was about to hit the fan.

    “Listen people” Robert began “we’ve had a few rough months.”

    The words had the same impact as a cinder block being dropped onto the conference table.  Robert paused and dramatically let his gaze wander from person to person.  Without saying it, he was incriminating everyone and assigning each their portion of the blame.

    Robert then let the hammer fall, “What I’m looking for, from each of you, are solutions!  How do we turn this ship around?”

    The question was met with silence.  Everyone looked like a deer caught in the headlights.

    Robert paused, but then pressed on. “Terry, you’re marketing, how do we raise awareness of our products?”

    Terry cleared his throat and began sputtering nonsense in an attempt ...

  • Search-Engine Friendly Blog Post Paging

    In the past, I've not liked that Javascript, ViewState and a full PostBack is required to page through the posts on this blog:

     Sitefinity Unfriendly Postback Navigation

    The bots search engines use to “crawl” web sites have difficulty interacting with navigation that requires complex client-side behavior (Javascript, Flash, Silverlight, completing a form, etc).  Here is a quote from Google's Webmaster Central Blog:

    Googlebot is great at following and understanding the structure of HTML links, [but] it can have a difficult time finding its way around sites which use JavaScript for navigation. While we are working to better understand JavaScript, your best bet for creating a site that's crawlable by Google and other search engines is to provide HTML links to your content.

    Even aside from the search-engine concerns, navigating to page 2 simply should not require Javascript, Postbacks, ViewState, server-side events, etc, etc.  The same results could be accomplished with the ...

  • Blogging about your Code

    I frequently need to post code samples to this blog.  This seemingly easy task has been a source of almost constant aggravation.  I've been unhappy with almost every technique I've found for publishing code to my Sitefinity blog.  Below we're going to look at the various methods I've used and the associated problems. 

    The Easiest & Cleanest Solution

    Let's first look at the easiest & cleanest solution available...the <pre> tag.  This HTML tag has been around forever.  It simply designates a block of preformatted text.  Spacing, tabs and line breaks will be rendered in the browser rather than filtered.  Let's look at an example:

    <pre>
        using System;
        using System.Web;
    
        public partial class Default : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                Response.Write("Truffle Shuffle!");
            }
        }
    </pre>

    This is perfect!  There aren't any obscure HTML or stylesheet tricks here.  Just a block of text you could easily read in ...

  • Automatic HTML Closures in Blog Summaries

    In my last blog post I described how Sitefinity can summarize your blog posts by enforcing an automatic cut-off point (for example, 150 words).  I use this feature on Sitefinity Watch to prevent my rambling blog posts from overwhelming the main page.

    Last week I noticed something concerning however.

    Sitefinity Cropping Mid HTML

    My 150 word cut-off landed right in the middle of a code sample.  The HTML used to display code samples is often ugly and contains lots of nested tags.  Let's look at a quick example:

    <pre  class="csharpcode">
    <span class="kwrd">&lt;</span>
    <span class="html">httpModules</span>
    <span class="kwrd">&gt;</span>
    <span class="kwrd">&lt;/</span>
    <span class="html">httpModules</span>
    <span class="kwrd">&gt;</span>
    </pre>

    Keep in mind, ...

  • Formatting your Sitefinity Blog Summaries

    If you visit the main page of this blog you'll notice each blog post gets cut-off at 150 words.  This prevents one long blog post from monopolizing the entire front page.

    Configuring Sitefinity to summarize each blog post is extremely easy.  However, in addition to summarizing your posts, Sitefinity also has some powerful filters that can be applied to your summaries.  These filters can be configured to automatically strip HTML tags.

    In this article we'll explore how to make use of these features.

    Switching the Display Mode for your Sitefinity Blog

    Inside the Sitefinity Admin click Pages and locate the page where you've placed your Blog Posts control.  Select this page and click Edit this page.

    Sitefinity Edit this page

    Once in edit mode click Edit for the Blog Post control.

    Sitefinity Blog Post Edit

    Select List & Page for the Display Mode and then click I'm Done.

    Sitefinity Blog Post Settings

    This alone will configure Sitefinity to display ...

  • Blogging with ease using Sitefinity & Windows Live Writer

    windows-live-writer I've used Sitefinity as my blogging platform for around 2 years now.  Prior to this, I used many other blogging platforms.  For most of this time, production and publication has largely been an awkward experience.

    However, after many years of pain I have finally settled on a production process I'm happy with.  This all started a couple months ago with with a small post Ivan made to the Sitefinity forums:

    Yes the Live Writer support is fully functional.  As a matter of fact all the guys and girls on blogs.telerik.com are using Live Writer for their everyday blogging.

    Windows Live Writer is a free desktop application that can be used to compose your blog offline.  When you're finished composing, you can publish with a 'click' of a button.  I've now written several blog posts using Live Writer, it's a nice little editor that makes publishing online extremely easy.

    If you're ...