Tuesday, February 09, 2010
Jan
3
Sat
Posted by Subodh on Saturday, January 03, 2009
| 1452 Views | 12 Comments

DotNetNuke Blog Module and FeedBurner issues

Maybe its the sign of old age. I’m not used to people ignoring me. Alright, so DNN Blog module has been bugging me coz of its incompatibility with Feedburner. If you try to import your DNN Blog module feed into feedburner, you would notice the images are all missing. Here’s a quick fix for a happy feed burning.

Before you go any further, please read the standard disclaimer1.

If you are noticing the missing images in the screenshot below when you try to import the RSS feed into feedburner, you may be able to use the solution below

DNN's Blog URL does not provide the absoluted URL. Hence the missing images

Make sure you backup your DNN database before applying the changes below! You’ve been forewarned.

 

USE [DNN]
GO
/****** Object:  StoredProcedure [dbo].[Blog_ListEntriesByBlog]    Script Date: 01/03/2009 22:26:22 ******/
/* This procedure was modified by Subodh on 2/1/2008; Any subsequent upgrade/update of DNN Blog module will overwrite this procedure
It is advisable that you create a backup copy of this procedure before modifying this stored proc and do a database backup
*/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[Blog_ListEntriesByBlog]
    @BlogID int,
    @BlogDate datetime = null,
    @ShowNonPublic bit = 0,
    @ShowNonPublished bit=0,
    @MaxEntries int =10
 
AS
 
 
DECLARE @Prefix varchar(53)
select top 1 @Prefix='http://'+RTRIM( LTRIM(PA.HTTPAlias))
from 
    Blog_Blogs B,
    Users U, UserPortals UP, PortalAlias PA
where B.BlogId=@BlogID and B.UserID= U.UserID and UP.UserID =U.UserID and PA.PortalID = UP.PortalID
order by PA.PortalAliasID asc
 
If @BlogDate IS NULL SET @BlogDate = GetUTCDate()
 
    SET rowcount @MaxEntries
    SELECT
        U.[UserID],
        U.[Username],
        U.[FirstName] + ' ' + U.[LastName] AS UserFullName,
        E.[EntryID],
        E.[BlogID], 
        E.[Title],
        cast(
Replace(
REPLACE(cast(E.[Description] as varchar(max)),'"/Portals/','"'+@Prefix+'/Portals/') 
,'"/Portals/','"'+@Prefix+'/Portals/') 
 
as ntext) as [Description],
        E.[Entry],
        E.[AddedDate],
        E.[Published],
        E.[Copyright],
        E.[PermaLink],
        IsNull(E.[AllowComments],B.[AllowComments]) As AllowComments,
        (Select Count(*) FROM dbo.Blog_Comments WHERE EntryID = E.EntryID AND (Approved = 1 OR Approved <> @ShowNonPublic)) As CommentCount,
 
        B.[PortalID] As BlogPortalID,
        B.[ParentBlogID],
        B.[Title] As BlogTitle,
        B.[Description] As BlogDescription,
        B.[Public] As BlogPublic,
        B.[AllowComments] As BlogAllowComments,
        B.[AllowAnonymous] As BlogAllowAnonymous,
        B.[LastEntry] As BlogLastEntry,
        B.[Created] As BlogCreated,
        B.[Culture] As BlogCulture,
        B.[ShowFullname] As BlogShowFullName,
        B.[DateFormat] As BlogDateFormat,
        B.[TimeZone] As BlogTimeZone,
        B.[Syndicated] As BlogSyndicated,
        B.[SyndicateIndependant] As BlogSyndicateIndependant,
        B.[SyndicationEmail] As SyndicationEmail
 
 
    FROM   dbo.Blog_Blogs B INNER JOIN
        dbo.Blog_Entries E ON B.[BlogID] = E.[BlogID] INNER JOIN
        dbo.Users U ON B.[UserID] = U.[UserID]
    WHERE (B.[BlogID] = @BlogID OR B.[ParentBlogID] = @BlogID)
    AND E.AddedDate <=@BlogDate
    AND (E.[Published] = 1 OR E.[Published] <> @ShowNonPublished)
    AND (B.[Public] = 1 OR B.[Public] <> @ShowNonPublic)
    ORDER BY E.AddedDate DESC

After applying these changes, my feed appears as expected. Phew!

 

DNN Blog and Feedburner issues Fixed

Alright, back to work.

 

1

DISCLAIMER This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

Posted in



 You may also be interested in
Packaging multiple DNN Modules in DotnetNuke 5.0+

Packaging multiple DNN modules via Command line

by Subodh
505 Views
0 Comments
SEO optimizations built into SpeedBlog

SpeedBlog & Search Engine Optimization (SEO)

by Innovation Mill
254 Views
1 Comments
Is PowerDNN hosting a rip-off? Or is it really worth it?

Is PowerDNN Hosting a Rip-Off? Maybe not.

by Subodh
823 Views
8 Comments


Hello SpeedBlog for DotNetNuke

by Subodh
694 Views
6 Comments
  

Comments and Discussions

  • Sunday, January 04, 2009 at 7:57 AM
    Fixing the DNN Blog and Feedburner issues
    Maybe its the sign of old age. I’m not used to people ignoring me. Alright, so DNN Blog module has been bugging me coz of its incompatibility with Feedburner. If you try to import your DNN Blog module feed into feedburner, you would notice the image...
    # Subodh's Blog

  • Don Worthley Tuesday, January 06, 2009 at 6:57 PM
    Re: Fixing the DNN Blog and Feedburner issues
    Thanks Subodh! The fact that you were able to alter a sproc to create this fix is great since people can apply it without re-compiling.

    Your contribution to the community is very much appreciated!

    Don

  • Andrew Friday, January 16, 2009 at 4:23 AM
    Re: Fixing the DNN Blog and Feedburner issues
    Thanks for taking the time to put this up here. I tried it on my dnn site (changing dnn in the first line to my database name) and got it to run when I checked off "run as script". It ran successfully but the feed still shows broken photos... Anything else special you did that I might not be doing right?

  • Andrew Monday, January 26, 2009 at 12:30 AM
    a bit more
    I did a little sleuthing and it looks like the replace isn't firing. Copying the blog post text into notepad and searching for "/Portals/ finds the string, but for some reason the SQL replace can't. Even if I replace your search string with something entirely different that I know exists in the posts, it doesn't work. I'm pulling data straight from the sp in sql studio, and the replace command just won't fire! Looks like your code should work fine--it's just my sql server that is being goofy... Ever seen this before?

    • Subodh Monday, February 23, 2009 at 5:59 AM
      Re: Fixing the DNN Blog and Feedburner issues
      @Andrew

      If it works when you run as script and doesn't when it runs as part of the stored proc, you probably need to check ErrorMessage() property in the catch block. You might be missing some permissions. Unless of course if didn't work as a script in the first place you might be needing some other fields as posted by Don above.
      Let me know if I can help debug.

  • Don Worthley Wednesday, February 11, 2009 at 3:39 PM
    Re: Fixing the DNN Blog and Feedburner issues
    Thanks again Subodh. Thomas Kohler had the same problem and came up with a modified version of your workaround that he posted in the metaPost forums here:

    dnn.itcrossing.com/support-forums/forumid/7/threadid/520/scope/posts/

    Thanks Thomas!

  • Subodh Monday, February 23, 2009 at 5:54 AM
    Re: Fixing the DNN Blog and Feedburner issues
    @Don Worthley

    Sweet!
    Glad to know someone found it useful! winking
    Does this mean this issue is not going to be fixed in the next version?

    • Don Worthley Monday, February 23, 2009 at 1:43 PM
      Re: Fixing the DNN Blog and Feedburner issues
      Hey Subodh,

      I just received a nice little email notifying me that a reply had been left in the comments here at your blog. Is this an extension you wrote or a third party utility? I like it.

      Don

      • Subodh Monday, February 23, 2009 at 3:39 PM
        Re: Fixing the DNN Blog and Feedburner issues
        @Don Worthley

        You do ? big grin I just wrote a small INSTEAD OF trigger to the Blog_AddComment procedure. Not a very elegant method but until I have the time to modify the Blog module (or I'm presuming the next version will already have this functionality --no?) this seems to work.

        • Don Worthley Monday, February 23, 2009 at 4:01 PM
          Re: Fixing the DNN Blog and Feedburner issues
          Did you fire the email from the Trigger? I would love to see this added in the next version.

          • Subodh Monday, February 23, 2009 at 4:10 PM
            Re: I would love to see this added in the next version.
            @Don Worthley

            Me too. happy And the next logical step would be to include threading. Yes, the email was sent from the database (that's why its not an elegant solution).
            Oh wait, maybe winking I can write a blog post about it (although I know people wouldn't like/actually implement it that way). The right way to do this is probably via the blog module itself.

  • Don Worthley Tuesday, March 03, 2009 at 7:36 PM
    Re: Fixing the DNN Blog and Feedburner issues
    I like the threaded comments, Subodh. Very nice.

  • Locations of visitors to this page Clicky Web Analytics 

    Subodh's Blog Rating

     

    DISCLAIMER

    The opinion expressed
    on this page 
    is strictly that
    of the page author
    who has a
    habit of animating
    day-dreaming
    and
    fictionalizing
    out of thin air.
     

    The contents of this page
    have not been
    reviewed 
    nor
    approved
    by 
    Yahoo!

    Follow this blog

    Minimize
     
    Monthly
    Yearly
     Tag Cloud
      

    ADVERTISEMENT

    Minimize
      
    {Powered by SpeedBlog}