Customizing the Site Collection Retention Warning Email


If configured by the SharePoint administrator, site collection retention warnings are sent to site collection owners whose sites have not been accessed for a predefined length of time. These emails should prompt owners to delete unused content, thereby conserving SharePoint server hard disk space.

The customization of retention warnings is a bit simpler than alerts. There is only one fileDEADWEB.XMLand the available CAML is significantly restricted. An example retention warning email is shown in Figure 5.8.

Figure 5.8. Inactive site collection email.


DEADWEB.XML is located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\1033\XML. Its default contents are shown in Listing 5.5.

Listing 5.5. DEADWEB.XML

<?xml version="1.0" encoding="utf-8" ?> <!-- _lc _version="11.0.5510" _dal="1" --> <!-- _LocalBinding --> <Email>   <Confirmation>     <ConfirmationSubject>        Confirm SharePoint Web site in use     </ConfirmationSubject>     <ConfirmationBody>       <![CDATA[Please follow the link below to your SharePoint Web                site to confirm that it is still in use.                <br><a href="|0">|0</a><br><br>                If the site is not being used, please go to                <a href="|1">|1</a>,                and select "Delete This Site" to remove the Web site.                <br><br>                You will receive reminders of this until you confirm                the site is in use, or delete it.]]>     </ConfirmationBody>   </Confirmation>   <AutoDeleteWarning>     <AutoDeleteSubject>       ACTION REQUIRED: Your SharePoint site collection is about to       expire     </AutoDeleteSubject>     <AutoDeleteBody>       <![CDATA[To extend the expiration date for this site                collection, click the link below:                <br><a href="|0">|0</a><br><br>                Otherwise this site collection, including all of its                subsites, might be deleted.<br><br>                If this site collection is no longer needed, you can                delete it by going to <a href="|1">|1</a>, and                selecting "Delete this site".<br><br>                Please note - When a SharePoint Web site collection is                deleted, all Web sites, content and information which                were part of the site collection are                completely erased.                The site can only be restored if a backup exists.]]>     </AutoDeleteBody>   </AutoDeleteWarning> </Email> 

DEADWEB.XML is divided between two xml elements: Confirmation and AutoDeleteWarning. AutoDeleteWarning defines the email when the site will be deleted automatically ("Automatically delete the site collection if use is not confirmed" is checked in Figure 5.9). Confirmation defines the email when the site will not be automatically deleted ("Automatically delete the site collection if use is not confirmed" is not checked).

Figure 5.9. Confirmation and Auto-Deletion Settings.


Confirmation and AutoDeleteWarning subject and body tags in Listing 5.5 are self-explanatory. The interesting references are |0 and |1. These reference the use confirmation and site collection deletion full URLs, respectively. In our example, they were translated to http://moose:81//_layouts/1033/useconfirmation.aspx and http://moose:81//_layouts/1033/WebAdmin.aspx.




SharePoint 2003 Advanced Concepts. Site Definitions, Custom Templates, and Global Customizations
SharePoint 2003 Advanced Concepts: Site Definitions, Custom Templates, and Global Customizations
ISBN: 0321336615
EAN: 2147483647
Year: 2006
Pages: 64

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net