How to add Collaboration Tools functionality to additional Sharepoint site or list templates

  • 24 February 2022
  • 0 replies
  • 8 views

Userlevel 3
Badge +8
 

How to add Collaboration Tools functionality to additional Sharepoint site or list templates

KB000158

PRODUCT
K2.net 2003
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Collaboration Tools offers additional functionality to users of Windows Sharepoint Services and Sharepoint Portal Server, allowing them to create ad-hoc document centric workflows without any code. The installation adds functionality to Sharepoint document libraries, but it does this only by adding two links to the standard document library templates. All the power behind the functionality is kept away from the original Sharepoint files, with only these two links providing access to those added capabilities. This document will show you how to add those links to additional non-standard templates, or foreign language templates, that you may have running on your Sharepoint installation. Note: knowledge of the Sharepoint template system is a pre-requisite to completing this HowTo.

 

Introduction

The links for this functionality must be added to the relevant Microsoft SharePoint document library List Templates inside SharePoint.  List Templates are contained within Site Templates, and even if your customizations to SharePoint are mainly cosmetic in nature, if you have deployed a custom Site Template, you will have also had to deploy custom List Templates.

Find your custom Site Template, or foreign language Site Template, under 'C:Program FilesCommon FilesMicrosoft sharedweb server extensions60Templatexxxx', with 'xxxx' being the locale ID you have installed (the default US-English is 1033).

Inside this folder, there will be a LISTS sub-folder, which contains your List Templates.  Inside this LISTS folder there will be one sub-folder for each List Template.  The naming of these folders is arbitrary, as you can name a List Template whatever you wish, therefore it is impossible for us to provide you with a complete list of exactly which files you should change.  However the default name for the List Template that provides document library functionality is 'DOCLIB'.

Repeat the following for each of the List Templates that you wish to add this functionality to:

  1. Take a backup of the SCHEMA.XML file and place it in a safe location.
  2. Open the SCHEMA.XML file in an editor.
  3. Scroll through the XML file and find the section titled '<Toolbar Type="RelatedTasks">'.  This element occurs under the <List.> then <Metadata> elements, and it should be the last occurring toolbar section in the xml file.
  4. Scroll to the end of this section and find the closing tag '</Toolbar>'.
  5. If you read backwards from the closing tag, you will find very nearby a closing Table tag '</TABLE>'.
  6. Place you cursor just before the '<' character, and insert a line break.
  7. Now insert the following XML which contains the important links. 
Note: Copy and paste from here to avoid mistakes
<!--K2ConfigureWorkflowOpen-->
<TR><TD width=100%>&nbsp;</TD></TD></TR>
<TR><TD width=100% ID="">Advanced</TD></TR>
<TR><TD><IMG src="/_layouts/images/blank.gif" width=1 height=1 alt=""></TD></TR>
<tr> <td style="padding-left: 2px;padding-bottom: 2px" width=100%> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td width=100% colspan=2> <table cellpadding=0 cellspacing=0 border=0> <tr> <td valign=top> <img src="/_layouts/images/rect.gif">&nbsp; </td> <td><A ACCESSKEY="C" ID="diidCustomizeButton" HREF="]]></HTML>
      <HttpVDir />
      <HTML><![CDATA[/_layouts/K2V3/SWS/ConfigureWorkflow.aspx?List=]]></HTML>
      <List />
      <HTML><![CDATA[">]]></HTML>
      <HTML>Configure Workflow</HTML>
      <HTML><![CDATA[</A></td> </tr> </table> </td> </tr> </table> </td> </tr>
<tr> <td style="padding-left: 2px;padding-bottom: 2px" width=100%> <table border=0 cellpadding=0 cellspacing=0 width=100%> <tr> <td width=100% class="ms-unselectednav" colspan=2> <table cellpadding=0 cellspacing=0 border=0> <tr> <td valign=top> <img src="/_layouts/images/rect.gif">&nbsp; </td> <td><A ACCESSKEY="C" ID="diidCustomizeButton" HREF="]]></HTML>
      <HttpVDir />
      <HTML><![CDATA[/_layouts/K2V3/SWS/FolderWorkflowReport.aspx?List=]]></HTML>
      <List />
      <HTML><![CDATA[">]]></HTML>
      <HTML>K2.net Workflow Services Reports</HTML>
      <HTML><![CDATA[</A></td> </tr> </table> </td> </tr> </table> </td> </tr>
<!--K2ConfigureWorkflowClose-->
 

 

8. Now save this document.

Once you have completed the changes for all your List Templates, restart IIS (Microsoft Internet Information Services). 

* Open a command prompt, and type 'iisreset'.

You should now find these links are present in all lists based on these templates.

Note: This should only be done to List Templates that derive from the Document Library Base Type.  Doing this to another list will almost certainly prevent the list from working, and will definitely not add workflow functionality to that list.

Once you publish your first workflow attached to this document library, you will notice some further changes.  The K2.net Collaboration Tools adds a number of columns to the library, to track the progress and data in a workflow.  It also adds some JavaScript code to the 'All Items' view in order to present you with additional items on the item context menu, that are relevant to the workflow system.  SharePoint allows for this through the use of a function entitled 'Custom_AddDocLibMenuItems'

A possible issue arises here, as there can only be one function in the page with this name.  If you are using a custom template that includes this type of customization, the results will generally be unpredictable.  Although this is unlikely to cause any damage or errors, the most likely result is that either the K2.net Collaboration Tools menu items do not appear, or your own custom menu items do not.  In essence, it is very difficult to create a working environment when this type of customization is present in a custom template, and the only real solution is to remove the conflict by removing the JavaScript in the template.

 


0 replies

Be the first to reply!

Reply