Skip to main content

Posts

Showing posts from 2008

Custom Theme in SharePoint

1. On the SharePoint Server go to the Themes folder e.g. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES 2. Copy any one of the theme folders from there and paste it in the same directory and give the folder a unique name, say "MyCustomTheme". 3. Find the .inf file in the copied folder, and rename it with the name given to the folder i.e. in this example rename that .inf file with MyCustomTheme.INF. 4. Open the .inf file and assign the same name i.e. MyCustomTheme to the title in the [info] section of the file, and in the [titles] section replace the previous names with your new name. 5. There is one theme.css file in that MyCustomTheme folder, open that, delete all the classes from that file and place your own css classes in that file. 6. Open “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML” file with notepad 7. Add the following...

Adding validation to a custom list control in Sharepoint

You should know how to create a Sharepoint list and how to open the site in Sharepoint designer. Following is a list with Email fields. Let's say we have to validate so that only a valid email can be entered. If not valid then the Error Message appears next to the field Now open the site in the sharepoint designer and then expand the list and open the Newform.aspx of the list to be validated As you can see in the image above the Newform.aspx of Validation list is being opened in the sharepoint Designer. Now right click on this Validation list web part in sharepoint Designer and choose Web Part properties. The properties dialog box will open for the Validation list here. Choose Hidden under layout and say ok. (This web part can be deleted as well, but due to some Known problems because of deletion it is best to hide this). Now click exactly underneath the hidden list web part and go to Insert->Sharepoint Controls-> Custom List Form… and Wizard will ask to choose a List or Docu...

How to: Create a Minimal Master Page

1. To create a minimal master page Open SharePoint Designer. On the File menu, click New, point to SharePoint Content, and then click the Page tab. Double-click Master Page to create a new master page. Click Design to show the master page in design view. You should see header and left margin areas and several content placeholders in the master page. Click Code to show the master page in code view. Copy the following code into the master page. Xml 7. On the File menu, click Save As, provide a unique file name with the .master extension, and then save the file to the master page gallery (/_catalogs/masterpage) in your site collection.

Create a Feature: Add Custom Master Pages to your Site Collections

One way master pages can be stored and used in MOSS 2007 sites is through creation in SharePoint Designer and storage in the Master Page Gallery. This method will create a master page in the content database. But what if you need to use one or two master page across multiple site collections? For ease of updates and maintenance, we don't necessarily want to store a copy of the master page in each site collection. Instead we can create and store master pages on the file system as a SharePoint Feature and make it available for new and existing site collections. http://heathersolomon.com/blog/articles/servermstpageforsitecollect_feature.aspx

Sharepoint Interview questions

What is Microsoft Windows SharePoint Services? How is it related to Microsoft Office SharePoint Server 2007? Windows SharePoint Services is the solution that enables you to create Web sites for information sharing and document collaboration. Windows SharePoint Services -- a key piece of the information worker infrastructure delivered in Microsoft Windows Server 2003 -- provides additional functionality to the Microsoft Office system and other desktop applications, and it serves as a platform for application development. Office SharePoint Server 2007 builds on top of Windows SharePoint Services 3.0 to provide additional capabilities including collaboration, portal, search, enterprise content management, business process and forms, and business intelligence. What is Microsoft SharePoint Portal Server? SharePoint Portal Server is a portal server that connects people, teams, and knowledge across business processes. SharePoint Portal Server integrates information from various systems into o...

Send Email with HTTP File attachment

This activity allows sending emails with attachments retrieved using a web request . Executing Reporting Services report and sending it as an attachment from within SPD workflow would be one such example. Request url is fully customizable and can include workflow variables. Both http and https requests are supported

Add a site template to Central Administration so it's available when you create a new site collection

When you create a new site collection, Central Administration creates a top level site and offers you the standard set of templates for that top level site. If you want to add a custom template to the list of templates offered by Central Administration, simply: From the command prompt, use STSADM -O ADDTEMPLATE: stsadm.exe -o addtemplate -filename filename -title "friendly name" -description "description" Type stsadm -help addtemplate for details. Then restart IIS by typing iisreset.

Fixing Publishing Pages Page Layout URL

If we open the publishing page in Sharepoint Designer and Detach from Page Layout, when you modify the page then save and check-in the page, the URL ref to http://dev09.4444/_catalogs/masterpage/BlankWebPartPage.aspx ? rather than refering to /_catalogs/masterpage/BlankWebPartPage.aspx. Soultion is Reattcah the page layout then check-in and publish.

Favicon's in a SharePoint Master Page

Favicon's are 'Custom Icon for your websites'. A Favicon is a multi-resolution image included on nearly all professional developed sites I have always preferred to call out favicons specifically with a link tag in the html head tag this way I ensure that my code, not the server, is handling the file. So now, how do you do this in SharePoint? Here are my steps Drag a favicon.ico file to the Images directory of your MOSS site with SharePoint designer. Add the following line to your Master Page at the bottom of the head section right before the /head tag: (link rel="shortcut icon" href="/images/favicon.ico") Check-in, publish, and approve your Master Page so that anonymous folks can see the change. Refresh the site, and you should see the favicon For more details: http://www.chami.com/html-kit/services/favicon/

How to run inline code in SharePoint aspx pages....

"An error occurred during the processing of test.aspx. Code blocks are not allowed in this file".To enable this you need to modify the web.config file for your SharePoint Site Collection. Modify the web.config file 1. Open the web.config file and make the following change: The PageParserPaths xml tags will be there already you just need to add the line in between. 2. Save web.config .

Configuring Alternate access Settings

Alternate access settings provide a mechanism for server farm administrators to identify the different ways in which users access portal sites, ensuring that URLs are displayed appropriately for the manner in which the user accesses the portal site. 1. Administrators often deploy portal sites that users can access by using different URLs. It is important that functionality, such as search results for portal site and document library (Web Storage System-based) content, be appropriate for the URL that was used to access the portal site. External URLs must be provided to the user in a form that is appropriate for how the user is currently accessing the portal site. 2. Without alternate access settings, search results might be displayed in a way that would make them inaccessible to users. Users might receive search results that they cannot access whenever they access the portal site by using a URL that is different from the original URL used for crawling the content. Steps to create AAM. 1...

How to Display Created By and Modified By User names in Custom form.

You Just need to add the SharePoint control to the particular page.

Removing Footer from SharePoint List Items Display...

1. Open the site in SharePoint Designer. 2. Click on your list folder. Usually under the Site Address/Lists 3. Make a copy of DispForm.aspx Name it something like: MyDispForm.aspx 4. Open the new MyDispForm.aspx 5. Select the ListFormWebPart, and delete it. 6. Click Insert -> SharePoint Controls -> Custom List Form… 7. Choose you list or document library from the drop down list. 8. Choose Type of form to create: Display item form (used to view list items) 9. A new Data Form Web Part will be created. 10. Delete the CreatedModifiedInfo control, using either: 1. Design mode: click the control that shows the Created By and Modified By text, and delete. 2. Code Mode: create the following tag: 11. Save the page.

Backup / Restore using STSADM command.

Command to take Backup of a sharepoint site: Go To : 1. \program files\common files\microsoft shared\web server extensions\12\bin. 2. Run stsadm -o backup -url -filename . For ex: stsadm -o backup -url http://dev:8585/ -filename file://dev/filename.dat . Command to restore backup of a sharepoint site: 1.\program files\common files\microsoft shared\web server extensions\12\bin. 2. Run stsadm -o restore-url -filename .For ex: stsadm -o restore -url http://dev:8585/ -filename file://dev/filename.dat . 3. If you want to overwrite the existing site, use -overwrite command.For ex : stsadm -o restore -url http://dev:8585/ -filename file://dev/filename.dat -overwrite.

Hiding sign in control from anonymous users....

Hiding the sign in link, copy and past this code in the Head tag of your master page And then within the body tag put.. (wssuc:Welcome id="signIn" runat="server" Visible="false"/)