I am using SharePoint Server 2007 on Windows Server 2008. If there is an existing web site, how to tell whether it is built from collaboration portal template or publishing portal template quickly?
regards, George
Taken from http://www.go4sharepoint.com/Forum/determine-site-template-site-11323.aspx
The site definition used when building a site isn't available anywhere in the user interface. The only other way to get the underlying site definition, without writing code, would be to do the following:
Save the site as a template
Download the template to your local harddrive
Change the extension from .stp to .cab (the .stp is a normal compressed cabinet file)
Open the .cab file and extract the manifest.xml file to your hard drive
Open the manifest.xml file in an editor and find the TemplateID and Configuration elements. These reference a specific site definition value listed in one of the Webtemp.xml files stored in the 12 hive at template/1033/xml.
Personally, I find it easier to write a quick command line utility program. Again, these values will only give you the base site definition from which the site was built, not the site template if one was used. There is no way that I know of to get the site template (.STP) file used to create an existing site.
More details can be found here and here.
Another approach is to check the content DB if you have access. In the Webs table find the site using the url (FullUrl) or the title (Title) and then check the WebTemplate column and the ProvisionConfig column, then check the {SharePoint Root}\TEMPLATE\1033\xml for the correct site definition.
Do not fiddle with the DB, just look at the table - now I said it...