Tuesday, December 2, 2008

Create a Managed Path Embedded Site Collection

Create a Managed Path Embedded Site Collection

Have you ever want to create a site collection in the root of a managed path?
For example, create a site collection at http://portal.foo.bar/sitecollection.
It can be done and is particularly useful on publishing sites when you don't
want a managed path like sites in the URL. It can also be used for division
portals like http://portal.foo.bat/HR and http://portal.foo.bar/IT

To create an embedded managed path site collection, do the following:

1. Open Central Administration > Application Management > SharePoint Web Application Management > Define Managed Paths.

2. Select the Web application in which you wish to create the managed path.

3. In the Add A New Path field, enter the name you wish for the embedded managed path site collection.
In the earlier example, the name is accounting.

4. You must select Explicit Inclusion as the Type .

5. Open Central Administration > Application Management > SharePoint Site Management > Create Site Collection.
This action must be performed from Central Administration.
You cannot create an embedded managed path site collection using self-service site management.

6. Select the correct Web application from the list.

7. Select the Explicit Inclusion you created earlier as the URL path.

Tuesday, November 4, 2008

Custom Advanced Search Code

1. Add code to Button Click Event
Microsoft.Office.Server.Search.Query.FullTextSqlQuery kwQuery = new Microsoft.Office.Server.Search.Query.FullTextSqlQuery(new SPSite("Top Level Site Name"));
kwQuery.QueryText = "SELECT Title, URL FROM Scope() WHERE FREETEXT(Contents, '" + Custom Text Values + "') and Competitor='"+Custom Values+"'";
kwQuery.ResultTypes = Microsoft.Office.Server.Search.Query.ResultType.RelevantResults; Microsoft.Office.Server.Search.Query.ResultTableCollection results = kwQuery.Execute(); Microsoft.Office.Server.Search.Query.ResultTable tblResult = results[Microsoft.Office.Server.Search.Query.ResultType.RelevantResults];
if (tblResult.TotalRows == 0)
{
lblQueryResult.Text = "No Search Results Returned.";
}
else
{
ReadResultTable(tblResult);
}


2.
public void ReadResultTable(Microsoft.Office.Server.Search.Query.ResultTable rt)
{
#region Create a DataSet and load the returned ResultTable into it
DataTable relResultsTbl = new DataTable();
relResultsTbl.TableName = "Relevant Results";
DataSet ds = new DataSet("resultsset");
ds.Tables.Add(relResultsTbl);
ds.Load(rt, LoadOption.OverwriteChanges, relResultsTbl);
#endregion
#region Add the results to the DataGrid
fillResultsGrid(ds);
#endregion
}

Friday, October 17, 2008

Icons are not displayed for Adobe PDF documents that are listed in the search results when you search your portal site in SharePoint Server 2007

Step 1: Download Adobe PDF IFilter 5.0 from the following Adobe Web site:
http://www.adobe.com/support/downloads/detail.jsp?ftpID=1276

Step 2: Stop the IIS Admin service. To do this, follow these steps:

a. Click Start, point to Administrative Tools, and then click Services.
b. Right-click IIS Admin Service, and then click Stop.

Step 3: Run the Adobe PDF IFilter 5.0 Setup program to install the filter on the server.
(For MOSS 2007, install the PDF iFilter on the Index servers)
After installing the iFilter, perform Steps 5, 6, and 7 on all the Web Front End servers in the farm.

Step 4: Register the Adobe PDF IFilter. To do this, follow these steps:

a. Click Start, and then click Run.
b. In the Open box, type cmd, and then click OK.
c. Switch to the folder that contains the Adobe PDF Filter 5.0 files. For example, switch to the following folder:
Drive:\Program Files\Adobe\PDF IFilter 5.0
d. Type regsvr32.exe pdffilt.dll, and then press ENTER.
e. If you receive a message that states that the operation was successful, click OK .
f. Type exit, and then press ENTER to exit the command prompt.

Step 5: Copy the .gif file that you want to use for the icon to the following folder on the server, as appropriate for your situation: Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images

Step 6: Edit the Docicon.xml file to include the .pdf extension. To do this, follow these steps:

a. Start Notepad, and then open the Docicon.xml file. The Docicon.xml file is located in one of the following folders on the server: Drive:\Program Files\Common Files\Microsoft Shared\Web server extensions\12\Template\Xml
b. Add an entry for the .pdf extension.
For example, add a line that is similar to the following to the Docicon.xml file, where NameofIconFile is the name of the .gif file:
c. On the File menu, click Save, and then quit Notepad.

Step 7: Restart the server.

Step 8. Add the .pdf file type to the content index. To do this, follow these steps:

a. Connect to the portal site, and then click Site Settings.
b. On the Site Settings page, click Configure search and indexing under Search Settings and Indexed Content.
c. On the Configure Search and Indexing page, click Include file types under General Content Settings and Indexing Status.
d. On the Specify File Types to Include page, click New File Type.
e. On the Add File Type page, type pdf in the File extension box, and then click OK.

Step 9. Update the context indexes for portal content and for non-portal content. To do this, follow these steps:

a. On the Site Settings page of the portal site, click Configure search and indexing under Search Settings and Indexed Content.
b. On the Configure search and indexing page, click Manage content indexes under Content Indexes.
c. On the Manage Content Indexes page, click the down arrow next to the name of the index that you want to update, and then click Start Full Update.

How to hide or omit certain auto-populate fields from "Announcements"

The default view being used is called the "Summary View", which unfortunately, is not directly editable through the normal "Edit the current view" option in the webpart...or more to the point, is limited to what you can edit on it. The default columns being displayed in this view cannot be removed, although you can add more columns if you want. This of course does not help you, but what we can do is modify it through SharePoint Designer.

In SPD, connect to the site and open the "default.aspx" page. On the page (in code view), do a search for each of the following and delete them from the page:

<HTML>by </HTML><Field Name="Author"/> (this references the user who created the item)
<Field Name="Modified"/> (this references the datetime is was last modified)
Once these is removed, you'll no longer see the "By" or "Modified" information. This will not have any impact of the list itself, just on the "Summary" view being used on the page that holds the webpart. Alternatively, you can also just create a new view conatining just the columns you want to display and apply that view to the webpart.

If Apply to All the Sites (Note: Applicable for newly create announcement)

1. Added a "no author" view to the announcement list schema
(C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\AnnouncementsList\Announce\schema.xml).

2. Done by copying the summary view ... node,

3. Then making a change to the node similar to the allitems view (BaseViewID="1"), but giving it the name "No Author" and the URL "NoAuthor.aspx".

4. IISReset the server.

5. Create a new announcement list and bam! No Author view is available in the newly added web part.

The problems with this solution are:

It does not change all existing Announcement lists to add the No Author view.
It adds a new view to the actual list rather than just giving me more options for setting the web part's view.

So... anyone got any ideas of how I can get the Summary View to be selectable on displaying the author info?

PS - this is a way you can take out the By: Author line on all Announcement list view web parts if that is what you want. Just remove the related sections from view zero, do an IISReset, and the author info will be removed from all announcement list web parts that are on summary view.


Hope this helps,
Prabhakar.T

Thursday, October 16, 2008

Opening Document Library Items in MOSS 2007 in a New Window

One issue that came up during a recent project was how to open items sitting in document libraries in Microsoft Office SharePoint Server (MOSS) 2007 in a new window. I had found various neat ways on how to do this in SharePoint Portal Server (SPS) 2003, including Todd Bleeker’s awesome Content Editor Web Part solution which entails adding a normal content editor web part with some slick JavaScript to a doc lib page that where upon the page loading most “A” tags on the page are modified to open in a new window.

This web part solution is great, and even works in MOSS 2007 interestingly, but my customer on this project was looking for an even easier solution that did not involve having to manually touch each document library at some point. After some further searching I found the steps to modify site definition files to change the inherit behavior of document libraries so that each time one is created it will automatically have this “new window opening” behavior. Andrew Connell had a great blog post on this.

All of this info was helpful, however the problem of course is that the site definition structure in MOSS 2007 is quite different from SPS 2003 and so the steps to make these granular modifications have changed. After some tinkering around I finally figured it out (or so it seems, the behavior seems expected so far, no weirdness has yet emerged!).

Steps to modify the site definition files in MOSS 2007 to open document library items in a new window:

1. Open the folder: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\XML

Apparently there is now a “global” folder for site definition files, I am still trying to understand the mapping of things from SPS 2003 and MOSS 2007.


2. Find and open the file named “ONET.XML” in your favorite XML/text editor (good old notepad for me please)


3. On line 693 you will find this line of XML:



Changing this line to as shown below will change the behavior of the textual links to open in a new window




4. On line 838 you will find this similar line of XML:



Changing this line to as shown below will change the behavior of the image icon links to open in a new window




5. Save changes do an IISRESET and you should be good to go. Of course if you are in a medium or large farm scenario you will need to perform these steps for each front-end web server

Source: http://www.jjfblog.com/2006/12/one-issue-that-came-up-during-recent.html

Wednesday, October 15, 2008

Creating a Custom Advanced Search Box in MOSS 2007

Reference:

1. http://aidangarnish.net/blog/post/2007/12/Creating-an-advanced-search-box-and-results-web-part.aspx

2. http://www.jjfblog.com/2007/01/searching-custom-column-values-in-moss.html


The Search Results Core web part is quite easy to customise with XSL, which makes it a good out of the box solution for displaying data that comes from multiple sites or even multiple farms.

Unfortunately specifying the query to use is not quite so easy, limiting you to a hardcoded query with the fixed keyword query properties or whatever the user can type in to the standard search box. Sometimes this is enough, but the keyword syntax is too limited if you want to do something like return results newer than a certain date. For that you need to be using the SQL search syntax.

The advanced search web part uses SQL syntax and can get just about any result set you want. However, the UI is not really simple enough for the average user and isn't that convenient for searching lookup fields. Time to try customising the advanced search interface.

My first thought was to override the Advanced Search webpart. However, I on looking through the code in reflector I noticed that the advanced search webpart doesn't contain any code to build the query. That happens in a control called SearchResultHiddenObject, which is marked internal so there is no way to modify the construction of queries in code. On the other hand, the fact that the Advanced Search webpart doesn't do any special processing means that it can be safely removed.

Copying the html source for the webpart into a content editor webpart works quite well, or at least it did once I removed some of the table structure - "?Contents=1" is a very useful query string if your html breaks the menus. Note that you probably shouldn't edit the html directly in the cewp source editor, as it is difficult to get at the editor again if it is wrong, and you probably don't want to delete all your code, which is the only option the recovery interface gives you.

As well as the web part itself, you need to copy some script and hidden fields - the script block starts with the function DisplayNextProp and the hidden fields are ASB_TextDTProps, ASB_DateTimeDT_Props and ASB_ResType_Query.

Next step is to make a cut down version, getting rid of the table structure, giving me a relatively easy to modify form with all the original fields. The javascript can also be safely removed as it is only for updating the UI, and the whole point of the customisation is to replace that UI. I'm not sure what ResetPageHashCode does, but removing it doesn't seem to have any effect.

What we are left with is a set of html controls that can be modified as needed. There is no need to register the controls anywhere and the first part of the name is ignored - the SRHO just checks the part of the name starting with "ASB". All of the fields are optional, and the SRHO will ignore any missing values. The numbering of the controls with multiple instances such as the property controls has no special requirements - as long as they match the pattern ASB_PS_ they will work.

ASB_TextDT_Props and ASB_DateTimeDT_Props Are lists separated by "#;#" which specify the properties which will be treated as text and datetimes respectively when building the query. All others are treated as numbers.

ASB_ResType_Query is set by the result type dropdown and can be used to include some raw SQL. However, the SRHO requires at least one other piece of the query to be used.

ASB_PS_lolb_0 is the operator to use between properties - either "And" or "Or". This is required if multiple properties are checked and the same operator is used for all properties.


ASB_TQS_AndQ_tb is the "All of these words" search box.

ASB_TQS_PhraseQ_tb is for an exact phrase.

ASB_TQS_OrQ_tb is for "Any of these words".

ASB_TQS_NotQ_tb is for words to exclude. It can only be used if another search term is also specified.

The language checkboxes are named in the format ASB_SS_lcb_0_12 with a value of "on". The first number is a zero based index, while the last number corresponds to langdef values in the properties of a default search box. I'm not sure where those values come from.

Search Scope checkboxes are similar, with the format ASB_SS_scb_0_16 but no value set. The last number is the scope ID, which you can find in shared service administration.

Finally there are the property selectors. You can have as many of these as you want - just change the number at the end.

ASB_PS_plb_1 is the internal name of the property to search

ASB_PS_olb_1 is the operator, which will be one of the following values:
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorContain)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorNotContain)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorEqual)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorNotEqual)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorLater)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorGreater)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorEarlier)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorLess)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorTrue)
WebPartPlatform.Current.GetLocResourceString(LocStringId.AdvancedSearch_OperatorFalse)
or in English:
Contains
Does not contain
Equals
Does not equal
Later than
Greater than
Earlier than
Less than
Is true
Is false
ASB_PS_pvtb_1 is the value to search for.


Putting this all together, we get the following code which when placed in a content editor webpart will provide a dropdown to choose from a list of known authors and display the results in a search core results web part on the same page (assuming the url in the submit button is set to the current page).

---
---
Author:
---
---
---
---
---





I have a pulldown menu (Status) and then two checkbox (Knowlegde) and I want the following function Status AND (Knowlegde checkbox 1 OR Knowlegde checkbox 2)..but how must I do that? I got the following code:

Status:

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

Knowlegde:
---
---
---

---

---
---
---

Monday, October 13, 2008

Searching Custom Column Values in MOSS 2007

Searching Custom Column Values in MOSS 2007

An issue that came up on a recent project was how can we search custom meta-data on document libraries in MOSS 2007? So for instance, let’s say that in a set of document libraries in a site or across a number of sites each will have a custom column named “Department” that is of a data type “Choice” and the possible values are each department in an organization. Now let’s say that end-users would like to use advanced search to use the Department field as search criteria.

I knew this was possible with SPS 2003, however, I sadly never had a chance or a reason to try it out – but now I did with SharePoint 2007, yippee! So in order to figure this out, I did a cursory search online and hit TechNet’s MOSS section, but alas, I could not find anything showing exactly what I was looking for. So through some brainstorming with a colleague and also some trial and error I was able to get it.

First off, let's create a custom column of type "Choice" in a sample document library. I've named mine "Department" and given it three possible value options ("Sales", "IT", "Marketing").



Now that we have our column created, we need to run a full crawl in the Shared Service Provider (SSP) to make SharePoint aware of this new piece of meta-data. After the crawl is run, our new property will be captured as (what in SharePoint parlance is called) a "Crawled Property", however that is not enough to perform searching on it, we need to also then create a separate "Managed Property" and map the crawled property to the manually created Managed Property (also as a side note, you can map more than one crawled property to a managed property). Once we do this, SharePoint will be fully aware of the property's existence and we can use it as search criteria. The steps for all of this are below:
1. Open up the admin page to the SSP that is hosting the web application your document library is sitting in
2. Click on “Search Setting”, then “Content sources and crawl schedules”


3. Find the content source that contains your site and perform a full crawl on it

Now SharePoint is aware our your new piece of meta-data and we can create a "Managed Property" to map to it.


4. Go back to the "Search Settings" page for your SSP and click "Metadata property mappings"



5. On the "Metadata Property Mappings" page click the "New Managed Property" link



Now on this page, we need to fill out the form for our new managed property. We need to give it a unique name (be careful here because many are already used, such as "Department"), select the correct data type, and then choose which crawled properties map to this new managed property. In this case, it will be only one crawled property and it will be the custom column we had created earlier named "Department".


1. Give a name for the managed property (I chose "OrgDepartment" to make it unique).
2. Select the correct data type, in this case "Text"
3. Now in the "Mappings to crawled properties" section of the form, click "Add Mapping" to bring up the crawled property selection dialog



4. This is a cool little widget in that you can actually search for the property you are looking for, in this case "Department". So enter "Department" in the "Crawled property name" text box and click "Find"




5. In the results I found one named "Department(Text)" and chose that. Now this is something I am still not completely clear on because also in the results list was a crawled property named "ows_Department(Text)" and I am not sure which one is best to use, but I can say that choosing the one without the "ows_" prefix worked just fine. Maybe when better documentation comes out I can get to the bottom of this!

6. Once that we have this form filled out, click OK and perform another full crawl on the necessary content source

At this point our crawled property is now correctly managed, which is great, but in order to actually use it as search criteria we need to customize our search center advanced search page.


1. Once that we have this form filled out, click OK then go back to the "Manage Content Sources" page and perform another full crawl on the necessary content source
2. Go to a search center site and click "Advanced Search"
3. Click on "Site Actions" then "Edit Page"
4. In the "Advanced Search Box" click "Edit" on the top right then click "Modify Shared Web Part"
5. On the pane to the right expand the "Properties" section



In the "Properties" text box under the "Properties" section is the XML defining which properties are searchable when which "Result type" option is selected (such as "Word Documents" or "Excel Documents"). We need to update this XML snippet with the correct nodes to define our new "Department" meta-data. Copy and paste the XML into your favorite text editor and make the following updates:


1. In the node add the following line:



This now adds a definition for our managed property into the search page, however, we will still need to add one more node to make it searchable on the page. The "Name" attribute must match up to the name of the managed property we created earlier and whatever is in the "DisplayName" attribute will be shown in the drop-down list on the UI of the advanced search page.


2. In one of the nodes (it is your choice, each ResultType node points to a different document type or overarches across all or a set of document types.) add the following node:





At this point you just need to exit edit mode and refresh the page and -kapow!- your new piece of meta-data is available in advanced search as search criteria!

Monday, September 22, 2008

SharePoint 2007 SQL Database Move from one server to another

the SQL Database from one server to another: SharePoint 2007
1. Open up the Central Administration and select the Operations tab.

2. Select the Perform a backup from the Backup and Restore section

3. Select the checkbox next to Farm.

4. After the checkbox is selected, click on the Continue to Backup Options tab.

5. On the Start Backup – Step 2 of 2 page, select Full under the Type of Backup option

6. Specify the Backup location in the text box. You must use a correct share name such as \\MyServerName\c$\backup\SharePoint. Also, the folders need to be created before you begin the backup

7. During the backup, the Backup and Status page will refresh and show the latest stats on the backup operation.

8. When the backup is completed, the status will show the job complete as well as other details

After the backup is completed, you need to remove the servers from the farm.
1. Logon to the server where SharePoint 7 is installed and launch the SharePoint Products and Technologies Configuration Wizard. When the Wizard has launched, click the Next button

2. You will get a warning about services that have to be started or reset. Click Yes to continue

3. Select the Disconnect from this server farm option and click on the Next button

4. A warning message will popup, explaining what the implication is when performing this action. Select the Yes button to continue.

5. When the Wizard has completed the task, click Finish to exit the Wizard

The next phase is to create a new database on the new database server
1. Launch the SharePoint Products and Technologies Configuration Wizard and click Next

2. You will get a warning about services that have to be started or reset. Click Yes to continue

3. Select the option No, I want to create a new server farm on the Connect to a server farm

4. Enter the name of the database server. You can accept the default name of the database name or you can rename it. I named mine MOSS_Config. You also need to specify the Username and Password of an account that will always connect to the database. When you have entered all the required information, click the Next button to continue

5. Specify the port number you want to use to access the Central Administration page inside SharePoint. If you do not want to specify a port number, you can use the port that the Wizard generated. Next, select the type of an authentication provider you want to use. I use NTLM as this SharePoint server is located on the company intranet and is not exposed to the public

6. The next screen will give an overview of the database configuration. Click the Next button to continue

7. When the database configuration is complete, click the Finish button to exit the Wizard

The next phase is to restore the data from the backup that was performed earlier
1. Click on the Operations tab on the Central Administration page. Find the Restore from backup link under the Backup and Restore section, and then click on the link.

2. Enter the path where the backup was created. Then click the OK button

3. A summary page will appear with any backup jobs that have been completed. Select the backup you made from the earlier step, then click on the Continue Restore Process button.

4. Select the component to restore. When restoring the entire farm, select the checkbox next to the Farm option. Then select the Continue Restore Process button

5. On the Step 4 of 4 page, click Same configuration under the Restore Options. A warning message will popup. Click OK to continue.

6. Complete the Login name and Password text boxes. The rest of the text boxes should be pre-filled with the data from the backup and should not have to be changed. Click the OK button to continue

7. You can monitor the status of the restore by keeping the screen up. The page will refresh itself every 15-30 seconds.

8. When the restore is completed, a summary is displayed. During my restore of my development install, I did have three areas that failed during the restore. However, as this is a development machine, I have done a lot of modifications, creation and deletion of web applications and site collections. The main project that I have been working on did restore just fine and that was my main concern as it was the cleanest and most current project I am working on.

9. You need to make sure the Office SharePoint Server Search and the Windows SharePoint Services Search are started. Mine were not started after the restore and I went in and started the services

10. When I attempted to start the services, I had to enter the Username and Password for the Service Account and the Content Access Account.
11. That’s the end of moving SharePoint to another database server



Reference:

1. http://www.precisionnetworks.com/post/Moving-the-SQL-Database-from-one-server-to-another-SharePoint-2007.aspx

2. http://techacid.spaces.live.com/blog/cns!6D62FC28E76BE4B!230.entry

Thursday, August 28, 2008

Sharepoint Imports URL

1. KPI and DashBoard - http://office.microsoft.com/home/video.aspx?assetid=ES102632271033&width=884&height=540&startindex=0&CTT=11&Origin=HA102549161033

2. All Sharepoint Videos- http://office.microsoft.com/en-us/sharepointserver/CH102066971033.aspx?stt=1

3. SharePoint Training URL - http://www.sharepoint-videos.com/

4. Virtual Labs - http://www.microsoft.com/sharepoint/learning/virtual.mspx

Wednesday, August 27, 2008

Add Custom aspx page to Moss 2007

Step 1: Installed application project extension
(Already installed skip step 1)

Step 2: Open Visual Studio 2005 and select Web Application
Project as shown below,

Step 3: Name the project “FirstWebProject”.

Step 4: Delete Default.aspx page Or Rename the Default.aspx and
add new Web Page Or rename the web page name it to “FirstCustomePage.aspx”.

Step 5: You can design this page as you want. Once you are done
with designing run the application once to make sure that there is no error.

Step 6: Now go to the file path where you have created the Web
Application.
file path is “c:\chirag\VortalProject”. You have to copy the DLL file from web
application’s BIN folder to share point site’s BIN folder.

Step 7: To Find BIN folder for your share point site, go to IIS and
select your share point site. Right click on the site name and click on Open.

Step 8: This will open physical location where you site resides.
Copy web application’s DLL file (In my case “FirstWebProject.dll”)
in BIN directory of SharePoint site.

Step 9: Now create a new folder at same level where your SharePoint
site’s BIN directory resides. Name is “CustomePage”. Add the
“FirstCustomePage.aspx” page to “CustomPage” folder.

Step 10: Open Web.Config file of Share Point site and copy safe control
tag shown below to Web.Config file.

TypeName=”*” />
If you have chosen different namespace and assembly names
than you have to use your name instead of this.
You have completed 90% of the task.

Step 11: The last thing is, you have to add tag in share point
site’s Web.Config file. You need to set trust level to “WSS_Medium”
policyFile=”C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config” />
Here you have completed all the required configurations!!!!

Step 12: Now open your share point site in browser and check for newly added page.
In our case the link will be
http://wscepios99:PortNo/CustomePage/FirstCustomePage.aspx
If you have done all the changes as mentioned above you can see your page running
fine in browser.

Add Server Admin Templates & Site Admin Templates to the SharePoint Server 2007

Server Admin Templates:

Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install.
If you do not have Central Server Admin rights, you can still install the site admin templates (see second list below) in the sites/workspaces that you own or administrate
· Absence Request and Vacation Schedule Management
· Help Desk
· Budgeting and Tracking Multiple Projects
· Inventory Tracking
· Bug Database
· IT Team Workspace
· Call Center
· Job Requisition and Interview Management
· Change Request Management
· Knowledge Base
· Compliance Process Support Site
· Lending Library
· Contacts Management
· Physical Asset Tracking and Management
· Document Library and Review
· Project Tracking Workspace
· Event Planning
· Room and Equipment Reservations
· Expense Reimbursement and Approval Site
· Sales Lead Pipeline


Site Admin Templates:

Site admin templates are easy for site administrators to install in a template gallery without requiring server administration access.
· Board of Directors
· Employee Training Scheduling and Materials
· Business Performance Rating
· Equity Research
· Case Management for Government Agencies
· Integrated Marketing Campaign Tracking
· Classroom Management
· Manufacturing Process Management
· Clinical Trial Initiation and Management
· New Store Opening
· Competitive Analysis Site
· Product and Marketing Requirements Planning
· Discussion Database
· Request for Proposal
· Disputed Invoice Management
· Sports League
· Employee Activities Site
· Team Work Site
· Employee Self-Service Benefits
· Timecard Management


Installing a template:
1. Before installing a server admin template, you must first install the Application Template Core solution, ApplicationTemplateCore.wsp.
(Click here to download). If you have already installed this solution, proceed to Step 2.
1. Pull the core file, ApplicationTemplateCore.wsp, from the extracted distribution. The core solution file will be added to the solution store, a table in the Windows SharePoint Services configuration store that holds solution files.

2. Via command line, run stsadm -o addsolution -filename \ApplicationTemplateCore.wsp

3. Next, run stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment(Additional attributes may be required based on your Windows SharePoint Services configuration. For example:Single Server: [ -local | -time


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ApplicationTemplateCore.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name
"ApplicationTemplateCore" -allowgacdeployment -immediate –force

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\BudgetingTrackingMultipleProjects.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\BugDatabase.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\CallCenter.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ChangeRequest.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ComplianceProcessSupport.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ContactsManagement.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\DocumentLibraryReview.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\EventPlanning.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ExpenseReimbursementApproval.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate -force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\HelpDesk.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\InventoryTracking.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ITTeamWorkspace.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate –force

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\JobRequisition.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\KnowledgeBase.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\LendingLibrary.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\PhysicalAssetTracking.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ProjectTrackingWorkspace.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\RoomEquipmentReservations.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate -force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\SalesLeadPipeline.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate -force


Run the batch file.


Reset IIS.


Now go to Site Action and click Create Site.

You will see list of server admin templates inside "Application Templates" tab

Add Server Admin Templates & Site Admin Templates to the SharePoint Server 2007

Server Admin Templates:
Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install.
If you do not have Central Server Admin rights, you can still install the site admin templates (see second list below) in the sites/workspaces that you own or administrate
· Absence Request and Vacation Schedule Management
· Help Desk
· Budgeting and Tracking Multiple Projects
· Inventory Tracking
· Bug Database
· IT Team Workspace
· Call Center
· Job Requisition and Interview Management
· Change Request Management
· Knowledge Base
· Compliance Process Support Site
· Lending Library
· Contacts Management
· Physical Asset Tracking and Management
· Document Library and Review
· Project Tracking Workspace
· Event Planning
· Room and Equipment Reservations
· Expense Reimbursement and Approval Site
· Sales Lead Pipeline

Site Admin Templates:
Site admin templates are easy for site administrators to install in a template gallery without requiring server administration access.
· Board of Directors
· Employee Training Scheduling and Materials
· Business Performance Rating
· Equity Research
· Case Management for Government Agencies
· Integrated Marketing Campaign Tracking
· Classroom Management
· Manufacturing Process Management
· Clinical Trial Initiation and Management
· New Store Opening
· Competitive Analysis Site
· Product and Marketing Requirements Planning
· Discussion Database
· Request for Proposal
· Disputed Invoice Management
· Sports League
· Employee Activities Site
· Team Work Site
· Employee Self-Service Benefits
· Timecard Management


Installing a template:
1. Before installing a server admin template, you must first install the Application Template Core solution, ApplicationTemplateCore.wsp.
(Click here to download). If you have already installed this solution, proceed to Step 2.
1. Pull the core file, ApplicationTemplateCore.wsp, from the extracted distribution. The core solution file will be added to the solution store, a table in the Windows SharePoint Services configuration store that holds solution files.

2. Via command line, run stsadm -o addsolution -filename \ApplicationTemplateCore.wsp

3. Next, run stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment(Additional attributes may be required based on your Windows SharePoint Services configuration. For example:Single Server: [ -local -time

Add Quick Links using Custom Code

try
{
// Get the Site Collection using SPSites
SPSite quickLaunchSite = new SPSite("Top Level Site Name");
using (quickLaunchSite)
{
// Sharepoint have high security Code.
// So we can use to AllowUnsafeupdates keyword to overwrite the security. quickLaunchSite.AllowUnsafeUpdates = true;
//Find the Particular site and open the site using SPWeb
SPWeb quickLaunchWeb = quickLaunchSite.OpenWeb();
using (quickLaunchWeb)
{
quickLaunchWeb.AllowUnsafeUpdates = true;
// Read the Quick Launch Bar Nodes using SPNavigationNodeCollection SPNavigationNodeCollection quickLaunchNodes = quickLaunchWeb.Navigation.QuickLaunch;
// Read the Internal Quick Launch bar Manu Items using SPNavigationNode SPNavigationNode internalMenuItem = new SPNavigationNode("Top Level Sites", "", false);
// Add First Menu to the Quick Launch Bar
quickLaunchNodes.AddAsFirst(internalMenuItem);
// Add Tech Support Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem1 = new SPNavigationNode("IT", "http://ServerName/sites/TechSupport/default.aspx", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem1);
// Add Sales Opreation Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem2 = new SPNavigationNode("HR", "HR SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem2);
// Add Tech Engineering Sub Manu items to the Quick Launch Bar SPNavigationNode externalSubMenuItem3 = new SPNavigationNode("MARKETING", "MARKETING SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem3);
// Add IT Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem4 = new SPNavigationNode("DEVELOPMENT", "DEVELOPMENT SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem4);
// Add Marketing Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem5 = new SPNavigationNode("TESTING", "TESTING SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem5);
// Add Sales Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem6 = new SPNavigationNode("SUPPORTS", "SUPPORTS SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem6);
// Add Senior Management Sub Manu items to the Quick Launch Bar SPNavigationNode externalSubMenuItem7 = new SPNavigationNode("MANAGEMENT", "MANAGEMENT SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem7);
// Add Tech Support Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem8 = new SPNavigationNode("USERS", "USERS SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem8);
//Finally Update menu and sub menus to Quick Launch Bar
quickLaunchWeb.Update();
}
}
}
catch (SPException x)
{
Response.Write(x.Message.ToString());
}

Add my Links using Custom Code

1. Create aspx page and add ASP button to this page. (aspx)
2. Copy the below mention code and paste to Button click events (aspx.cs)
3. Copy the aspx and aspx.cs file and paste to the _layout folder. (IIS --> 80 --> _layout--> Open)
4. Run the custom page through IIS
try
{
#region Basic Declaration
string strTitle = string.Empty;
string sLinkUrl = string.Empty;
string strGroup = string.Empty;
Microsoft.Office.Server.UserProfiles.UserProfile oUserProfile = null;
UserProfileManager upm = null;
SPSite site = null;
ServerContext server = null;
#endregion

#region Open SSP Site and Security Settings
site = new SPSite("SSP Website URL");
SPWeb myWeb = site.OpenWeb();
// Allow to Custom Updation
myWeb.AllowUnsafeUpdates = true;
server = ServerContext.GetContext(site);
upm = new UserProfileManager(server, false);
#endregion
// Assign the User Name
string sAccount = "Domain Name" + "\\" + "Account Name".ToString();
// Assign the Title
strTitle = "Title Name".ToString();
strWorkspace = "Title".ToString();
// Assign the Site URL
sLinkUrl = "Web Site URL";
strGroup = "General";
if (!upm.UserExists(sAccount))
{
// User Profile Not Exist means we need to create the user profile upm.CreateUserProfile(sAccount);
// Get the userprofile
oUserProfile = upm.GetUserProfile(sAccount);
QuickLinkManager qlm = oUserProfile.QuickLinks;
// Add my links to Sharepoint Personal Sites
QuickLink q1 = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.General, strGroup, Privacy.Private); oUserProfile.Commit();
Response.Write("Account Created & My Links Added Successfully");
}
else
{
// Get the userprofile
oUserProfile = upm.GetUserProfile(sAccount);
QuickLinkManager qlm = oUserProfile.QuickLinks;
// Add my links to Sharepoint Personal Sites
QuickLink q1 = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.General, strGroup, Privacy.Private);
oUserProfile.Commit();
Response.Write("My Links Added Successfully");
}
}
catch (Exception ex)
{ throw ex;
}