Click here to Skip to main content
6,595,854 members and growing! (17,016 online)
Email Password   helpLost your password?
Enterprise Systems » Content Management Server » General     Intermediate License: The Code Project Open License (CPOL)

Microsoft Content Management Server Decline Reason Extension

By Stephen Huen

A Web Author extension that prompts authors to enter a reason when declining postings.
VB, Javascript.NET 1.1, .NET 2.0, Win2K, Win2003, ASP.NET, VS.NET2003, VS2005, Dev
Posted:21 Feb 2004
Updated:17 May 2006
Views:56,905
Bookmarked:15 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
7 votes for this article.
Popularity: 3.66 Rating: 4.33 out of 5

1
1 vote, 14.3%
2

3
2 votes, 28.6%
4
4 votes, 57.1%
5

Sample Image - sample.gif

Introduction

For use in the Microsoft Content Management Server, this Decline Reason Web Author extension (written in VB.NET) prompts authors to enter a reason when declining postings. It works in both single posting declines in the Web Author menu and multiple posting declines in the Approval Assistant dialog. The reason entered can be collected using Request.Form("NC_DeclineReason") within the events CmsPosting_Declining and CmsPosting_Declined in the global.asax, and can be used for email notifications (code sample not included).

A C# version of this extension is available here.

Installation Procedures

  1. Copy all the files in the directory WebControlLibray to the web control library project of your MCMS solution.
  2. Copy the directory WebAuthor into the root of your web site. The file /WebAuthor/Client/Console.js contains the scripts for the custom console actions. If Console.js exists already, copy the new scripts into your existing Console.js.
  3. For the ASP.NET 1.x version only, update ProjectRootNamespace with your project root namespace in DeclineReasonDlg.aspx.
  4. Copy the MCMS Web Author file \Program Files\Microsoft Content Management Server\Server\IIS_CMS\WebAuthor\ Dialogs\TasksAssistant\ApprovalAssistant\ApprovalAssistant.aspx into /WebAuthor/Dialogs/TasksAssistant/ApprovalAssistant/. In VS.NET 2003, when the file is included and you are asked to automatically generate the code behind file for it, say No. Edit the file as follows:
    1. Make sure the page directive remains like:
      <%@ Page language="c#" Codebehind="ApprovalAssistant.aspx.cs" 
         AutoEventWireup="false" 
         Inherits="Microsoft.ContentManagement.WebAuthor.ApprovalAssistant" %>
    2. Change the source of the DialogTitle register:
      <%@ Register tagprefix="WebAuthor" Tagname="DialogTitle" 
          Src="/<MCMS Site Application Name>/CMS/WebAuthor/
               Controls/DialogTitle.ascx" %>
    3. Add a JavaScript include, an onsubmit attribute in the form element, and a hidden element:
      .....
      
      <%=EmbedHeadSection()%>
      <script language="JavaScript" src="ApprovalAssistant.js"
              type="text/javascript"></script>
      </head>
      
          ..... 
      
        <form id="WBC_frmApprovalAssistant" method="post" 
            runat="server" onsubmit="return CMS_onMultipleDecline();">
        <input type="hidden" name="NC_DeclineReason" value="">
      
      .....
  5. Change the console actions to use the new custom classes. For example, if you are using DefaultConsole.ascx:
    <%@ Register TagPrefix="CustomAction" 
      Namespace="WebControlLibraryRootNamespace.McmsCustom.WebAuthor" 
      Assembly="WebControl Library Assembly Name" %>
    
    ......
    
    <CmsConsole:Console runat="server" id="Console1">
    
    <script language="javascript" type="text/javascript"
            src="../WebAuthor/Client/Console.js"></script>
    
    ......
    
    <cms:PresentationModeContainer mode="Unpublished" runat="server"
           id="PresentationUnpublishedModeContainer1">
    
    ......
    
    <CustomAction:ApprovalAssistantCustomAction 
         id="ApprovalAssistantAction1" runat="server">
    <A id="ApprovalAssistantAnchor" href="#"
     onclick="<%# Container.ActionJavascript %>;return false" target=_self>
    <%# Container.Text %>
    </A>
    <BR>
    </CustomAction:ApprovalAssistantCustomAction>
    
    ......
    
    <CustomAction:DeclineReasonAction id="DeclineAction1" runat="server">
    <A id="DeclineAnchor" href="#"
     onclick="<%# Container.ActionJavascript %>;return false" target=_self>
    <%# Container.Text %>
    </A>
    <BR>
    </CustomAction:DeclineReasonAction> 
    
    ......
    
    </cms:PresentationModeContainer>
      
    ......
    
    </CmsConsole:Console>
  6. Rebuild your site solution in VS.NET.

History

  • V1.0 - 2004.02.20 - Base.
  • V1.1 - 2004.04.08 - Code clean up.
  • V1.2 - 2004.07.10
    • Fixed the missing buttons in the dialog due to changes in MCMS SP1a.
    • Split CustomAction.vb into DeclineReasonAction.vb and ApprovalAssistantCustomAction.vb.
  • V1.3 - 2006.05.16 - Added an ASP.NET 2.0 version.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Stephen Huen


Member

Occupation: Web Developer
Company: Questech Systems
Location: Canada Canada

Other popular Content Management Server articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
GeneralUnterminated string constant Pinsusskamil sykora23:24 5 Oct '04  
GeneralRe: Unterminated string constant PinmemberStephen Huen7:37 6 Oct '04  
GeneralRe: Unterminated string constant Pinmemberksasdf0:00 8 Oct '04  
GeneralError on Page when using Single Decline Pinmemberdiver712:26 13 May '04  
GeneralRe: Error on Page when using Single Decline PinmemberStephen Huen13:13 13 May '04  
GeneralRe: Error on Page when using Single Decline Pinmemberdiver717:27 13 May '04  
GeneralRe: Error on Page when using Single Decline PinmemberStephen Huen17:39 13 May '04  
GeneralRe: Error on Page when using Single Decline Pinmemberdiver718:03 13 May '04  
GeneralRe: Error on Page when using Single Decline PinmemberStephen Huen18:25 13 May '04  
GeneralRe: Error on Page when using Single Decline Pinmemberdiver718:49 13 May '04  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 17 May 2006
Editor: Smitha Vijayan
Copyright 2004 by Stephen Huen
Everything else Copyright © CodeProject, 1999-2009
Web10 | Advertise on the Code Project