Skip to main content

Posts

Showing posts from March, 2008

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.