Looks interesting, what is the list objects variable for "
Keep the following number of major versions:"



________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Gavin Barron [EMAIL 
PROTECTED]
Sent: Thursday, May 01, 2008 11:40 AM
To: [email protected]
Subject: RE: [OzMOSS] Changing default settings

1)

Yes, but you’ll need to create a new list definition or Template and use that 
in place of the existing document library.

You simply add VersioningEnabled="TRUE" to the List element at the top level of 
the schema.xml file for your list definition.

To change all existing libraries, also rather easy, something like this in a 
console app on the server should do the job.

            using (SPSite baseSite = new SPSite("http://mysite";))
            {
                Microsoft.SharePoint.Administration.SPWebApplication webApp = 
baseSite.WebApplication;
                foreach (SPSite currentsite in webApp.Sites)
                {
                    foreach (SPWeb currentWeb in currentsite.AllWebs)
                    {
                        foreach (SPList currentList in currentWeb.Lists)
                        {
                            if (currentList.GetType() is SPDocumentLibrary)
                            {
                                currentList.EnableVersioning = true;
                                currentList.Update();
                            }
                        }
                        currentWeb.Dispose();
                    }
                    currentsite.Dispose();
                }
            }

As for 2) not all that sure, there is a NoCrawl attribute for the ListTemplate 
element that does this, not sure how you go about setting that on your existing 
site though.

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nigel Hertz
Sent: Thursday, 1 May 2008 12:33 p.m.
To: [email protected]
Subject: [OzMOSS] Changing default settings

Hi all,

I have 2 questions that I’m hoping someone might be able to answer:


1)    Does anyone know how to change the settings of document libraries so that 
versioning is enabled by default when creating new libraries? (and following 
on, a way to change all existing libraries programmatically)

2)    Is there a way to change the settings of surveys to disable ‘include in 
search results’ by default?

Thanks for any tips

Nigel

-------------------------------------------------

Nigel Hertz
Software Developer | Information Technology
Stockland
Level 25 | 133 Castlereagh Street | Sydney NSW 2000
T: 02 9035 2617 | F: 02 8988 2617
________________________________
Stockland Notice: If this communication has been sent to you by mistake, please 
delete and notify us.  If it has been sent you by mistake, legal privilege is 
not waived or lost and you are not entitled to use it in any way. Stockland and 
its subsidiaries reserve the right to monitor e-mail communication through its 
networks.
------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com
------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.
Powered by mailenable.com

________________________________
IMPORTANT: This e-mail, including any attachments, may contain private or 
confidential information. If you think you may not be the intended recipient, 
or if you have received this e-mail in error, please contact the sender 
immediately and delete all copies of this e-mail. If you are not the intended 
recipient, you must not reproduce any part of this e-mail or disclose its 
contents to any other party. This email represents the views of the individual 
sender, which do not necessarily reflect those of education.au limited except 
where the sender expressly states otherwise. It is your responsibility to scan 
this email and any files transmitted with it for viruses or any other defects. 
education.au limited will not be liable for any loss, damage or consequence 
caused directly or indirectly by this email.



------------------------------------------------------------------- OzMOSS.com 
- to unsubscribe from this list, send a message back to the list with 
'unsubscribe' as the subject.

Powered by mailenable.com

Reply via email to