Attachments in WSS 3.0 Blog Sites


WSS 3.0 Blog site does not have the capability of uploading attachments along with a blog post and my client desperately wanted to have this feature. We could implement this feature into WSS 3.0 blog site by doing some custom coding and configurations.

Step 1: Enable Attachments button on new post and edit post pages
    Open the file C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\DefaultTemplates.ascx in a text editor. Search for the tag with ID ‘BlogNewFormToolBar’ and place the following code in the <Template_Buttons> tag inside it.
 Code: <SharePoint:AttachmentButton runat=”server”/>
    Search for the tag with ID ‘BlogEditFormToolBar’ in the above file and placed the following code in the <Template_Buttons> tag inside it.
 Code: <SharePoint:AttachmentButton runat=”server”/>

Step 2: Develop a custom web part for listing the attachments in the Blog page (post.aspx)
Take the post list item id from the query string and find attachment collection for the item. Iterate through each attachment and list them with link to the actual attachment. The custom developed web part is deployed into the server and addedd into the post.aspx page.

Step 3: Develop a custom web part for replacing the exisiting web part for listing blogs in the main page (default.aspx)
Develop a web part for replacing the existing web part in the default.aspx page of the blog site. In the footer section add a link Attachments ([number of attachmets]). Deploy this web part into the server and add it into the default.aspx page replacing the existing web part.

Advertisements

One thought on “Attachments in WSS 3.0 Blog Sites

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s