<%
' *****************************************************************************
'
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	This file define the set of Hook functions that can be customized to
'	override all common URL generations in WBC.
'
'	The set of Hook functions exposed are:
'	- Sub OnInternalCustomizeWBCEditSiteModeURL( ByVal pThis, ByRef strURL )
'	- Sub OnInternalCustomizeWBCLiveSiteModeURL( ByVal pThis, ByRef strURL )
'	- Sub OnInternalCustomizeWBCAuthoringModeURL( ByVal pThis, ByRef strURL )
'	- Sub OnInternalCustomizeWBCPreviewModeURL( ByVal pThis, ByRef strURL )
'
' *****************************************************************************


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to override the default
'	behavior of WBC Edit Site Mode URL generation.
'
'	@pThis [in] - the current Channel or Posting
'
'	@strURL [in, out] - the default Edit Site mode URL. Its value can be
'			modified in this function to alter the WBC Edit Site Mode URL
'			generated.
'
' -----------------------------------------------------------------------------
Sub OnInternalCustomizeWBCEditSiteModeURL( ByVal pThis, ByRef strURL )
	' DEFAULT IMPLEMENTATION: do nothing so that URL remains unchanged


	' CUSTOM SCRIPT: modify strURL according to custom logic.
	' 	The following sample code propagates the "ProductID" querystring
	'	paramter in the current URL to the Edit Site Mode URL being generated

	'If (Request.QueryString("ProductID") <> "") Then
	'	Dim strCustomQueryString
	'	strCustomQueryString = "ProductID=" & Server.URLEncode(Request.QueryString("ProductID"))
	'	strURL = AppendQueryString( strURL, strCustomQueryString )
	'End If

	' propagate querystrings for CS2000 Content Connector
	If CS_IsConnectorEnabled Then
		strURL = CS_AppendQueryStringToURL(strURL, CS_GetConnectorQueryStrings)
	End If
		
End Sub


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to override the default
'	behavior of WBC Live Site Mode URL generation.
'
'	@pThis [in] - the current Channel or Posting
'
'	@strURL [in, out] - the default Live Site mode URL. Its value can be
'			modified in this function to alter the WBC Live Site Mode URL
'			generated.
'
' -----------------------------------------------------------------------------
Sub OnInternalCustomizeWBCLiveSiteModeURL( ByVal pThis, ByRef strURL )
	' DEFAULT IMPLEMENTATION: do nothing so that URL remains unchanged


	' CUSTOM SCRIPT: modify strURL according to custom logic.
	' 	The following sample code propagates the "ProductID" querystring
	'	paramter in the current URL to the Live Site Mode URL being generated

	'If (Request.QueryString("ProductID") <> "") Then
	'	Dim strCustomQueryString
	'	strCustomQueryString = "ProductID=" & Server.URLEncode(Request.QueryString("ProductID"))
	'	strURL = AppendQueryString( strURL, strCustomQueryString )
	'End If
	
	' propagate querystrings for CS2000 Content Connector
	If CS_IsConnectorEnabled Then
		strURL = CS_AppendQueryStringToURL(strURL, CS_GetConnectorQueryStrings)
	End If
		
End Sub


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to override the default
'	behavior of WBC Authoring Mode URL generation.
'
'	@pThis [in] - the current Channel or Posting
'
'	@strURL [in, out] - the default Authoring mode URL. Its value can be
'			modified in this function to alter the WBC Authoring Mode URL
'			generated.
'
' -----------------------------------------------------------------------------
Sub OnInternalCustomizeWBCAuthoringModeURL( ByVal pThis, ByRef strURL )
	' DEFAULT IMPLEMENTATION: do nothing so that URL remains unchanged


	' CUSTOM SCRIPT: modify strURL according to custom logic.
	' 	The following sample code propagates the "ProductID" querystring
	'	paramter in the current URL to the Authoring Mode URL being generated

	'If (Request.QueryString("ProductID") <> "") Then
	'	Dim strCustomQueryString
	'	strCustomQueryString = "ProductID=" & Server.URLEncode(Request.QueryString("ProductID"))
	'	strURL = AppendQueryString( strURL, strCustomQueryString )
	'End If
	
	' propagate querystrings for CS2000 Content Connector
	If CS_IsConnectorEnabled Then
		strURL = CS_AppendQueryStringToURL(strURL, CS_GetConnectorQueryStrings)
	End If	

End Sub


' -----------------------------------------------------------------------------
'
'	This function is called to allow site designer to override the default
'	behavior of WBC Preview URL generation.
'
'	@pThis [in] - the current Channel or Posting
'
'	@strURL [in, out] - the default Preview URL. Its value can be modified in
'			this function to alter the WBC Preview URL generated.
'
' -----------------------------------------------------------------------------
Sub OnInternalCustomizeWBCPreviewModeURL( ByVal pThis, ByRef strURL )
	' DEFAULT IMPLEMENTATION: do nothing so that URL remains unchanged

	' CUSTOM SCRIPT: modify strURL according to custom logic.
	' 	The following sample code propagates the "ProductID" querystring
	'	paramter in the current URL to the Authoring Mode URL being generated

	'If (Request.QueryString("ProductID") <> "") Then
	'	Dim strCustomQueryString
	'	strCustomQueryString = "ProductID=" & Server.URLEncode(Request.QueryString("ProductID"))
	'	strURL = AppendQueryString( strURL, strCustomQueryString )
	'End If
	
	' propagate querystrings for CS2000 Content Connector
	If CS_IsConnectorEnabled Then
		strURL = CS_AppendQueryStringToURL(strURL, CS_GetConnectorQueryStrings)
	End If
	
End Sub


%>