Showing posts with label SharePoint 2007. Show all posts
Showing posts with label SharePoint 2007. Show all posts

SharePoint Recycle Bins

What if you deleted a SharePoint list item/document or a site by mistake? SharePoint provides you recycle Bin to recover such items and save you a day. The idea is similar to the recycle bin on your windows, however SharePoint has taken it to a level up.

In most of the SharePoint sites , you can get to a recycle bin by clicking on the link provided in the left navigation bar. Alternatively you can click on Site Actions -> View all site Content and you will see the recycle bin option at the bottom. This Recycle Bin is Site recycle bin

On the recycle bin you should be able to see the documents being deleted. The documents stay in this recycle bin unless some one manulally deletes them or it is past the retention period. Your SharePoint administrator can set up the retention period as shown here

If the documents are manually deleted from the Site recycle bin, they go to next level of recycle bin called Site Collection Recycle Bin.  You can check this recycle bin using the link(marked in orange) as shown below, however you should have Site Collection administrator permission to do this.

On both these Recycle bins, you will find option to restore or delete the items. If you choose to restore the item, it will be restored to the same location where it was before being deleted originally.





If you want to restore deleted site collection visit this article: Restore deleted site collection

Managing alerts for other users

As a SharePoint site administrator or editor, you might want to create or delete alerts for other users. The steps given below can help you manage other user's alerts.

To delete the alert you can follow the steps below



For creating an alert for other user, you just need to follow the steps to create a new alert as given in the article SharePoint Alert Basics.

Once the alert window is open, in the Send Alert to section(Circled below), delete your name and add the other users name.





 

SharePoint: Using Content class property to refine search result


In the enterprise level SharePoint instance, Search Plays a very important part. Yet, due a large quantity of data, search results can be diluted to the extent that it is almost unusable.

Using content class to refine the search results can be very helpful. Here is an example. Let us suppose that in your organization, many users search for Announcement (SharePoint announcements) on a daily basis. However due to common keyword used in many sites, documents and announcements, your search results are cluttered with unwanted results of sites and documents. This is what you can do:

1.       On the search site, go the Site Actions > Site Settings > Search Scope (Site Collection administrator)  

2.       Click on “New Scope” to create a new scope. While creating the scope, choose check box “Search Dropdown” to make sure your new scope is available in the dropdown.

3.       On the view scope page, click on the scope just create and choose “Edit properties and rules”

4.       In the page opened, click on “New rule” link.

5.       In the new rule page, choose “Property Query” in the “Scope rule type” section.

6.       In the property query drop down choose the value as “contentclass” and in the text box provide the value as “STS_List_Announcements”

7.       Click ok and wait for the time till the Scope is ready to use. (this depends on how search is configured)

Once the scope is ready to use, users can search for just announcements when the choose the new scope.

Here are few other contentclass values that you can use for creating new search scopes to refine the results:

·         Search Query: urn:content-class:SPSSearchQuery

·         News Listing: urn:content-class:SPSListing:News

·         People: urn:content-class:SPSPeople

·         Category: urn:content-classes:SPSCategory

·         Listing: urn:content-classes:SPSListing

·         Person Listing: urn:content-classes:SPSPersonListing

·         Text Listing: urn:content-classes:SPSTextListing

·         Site Listing: urn:content-classes:SPSSiteListing

·         Site Registry Listing: urn:content-classes:SPSSiteRegistry

·         Site: STS_Web

·         List: STS_List

·         List Item: STS_ListItem

·         Events: STS_List_Events

·         Tasks: STS_List_Tasks

·         Announcements: STS_List_Announcements

·         Discussions: STS_List_DiscussionBoard

·         Contacts: STS_List_Contacts

·         Links: STS_List_Links

·         Document Library: STS_List_DocumentLibrary

·         Document Library Items: STS_ListItem_DocumentLibrary

·         Picture Library: STS_List_PictureLibrary

·         Picture Library Items: STS_ListItem_PictureLibrary
   ·        Site Collections: STS_Site

Creating List/Document Library with Terms and Conditions sections

Often business comes with a requirement that they need to store data in the sharepoint list, however they need some information to be displayed on the New item page.
 
These kind of requirements although look very simple from business point of view, it becomes a nightmare if you want to create custom pages for it.
 
"Terms and conditions" option is one such requirement. Although you can implement it in various ways, here is a good option to create "T&C" text on new items page and enable the form only when these "T&C" are agreed. 
 
1. Create a List/Document library. http://spsite/Lists/ExampleList
2. Create the desired columns for the List/Document Library created
3. Open the http://spsite/Lists/ExampleList/Newform.aspx for that List/Document Library with the following query parameter “toolpaneview=2”. So your URL will look likehttp://spsite/Lists/ExampleList/Newform.aspx?toolpaneview=2
4. Now the newform.aspx page opens in edit mode.
5. Add a content editor webpart in the page. This content editor webpart should be added just above the fields of the form.
6. Add following HTML code in the webpart.

<div style="text-align: left">&#160;</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="text-align: left"><tbody><tr><td>
REPLACE THIS WITH YOUR TERMS AND CONDITIONS
<br/><br/> <font style="font-size: 12pt">
<input id="chkAgreement" onclick="apply()" type="checkbox" value="on"/>
<strong>I AGREE</strong></font><br/><br/><font style="font-size: 10pt
<br/></font></td></tr></tbody></table>
<script type="text/javascript">
function hideload()
{
var imag = document.getElementsByTagName('table');
for(var i=0;i<imag.length;i++)
{
if(imag[i].className.indexOf('ms-formtable') != -1 ) { var tbl = imag[i];}
if(imag[i].className.indexOf('ms-formtoolbar') != -1 ) { var tbl2 = imag[i];}
}
var ribbonhide = document.getElementById("s4-ribbonrow");
var stylechng = tbl.style;
var stylechng2 = tbl2.style;
var stylechng3 = ribbonhide.style;
stylechng.display = 'none';
stylechng2.display = 'none';
stylechng3.display = 'none';
}

function apply()
{
var imag = document.getElementsByTagName('table');
for(var i=0;i<imag.length;i++)
{
if(imag[i].className.indexOf('ms-formtable') != -1 ) { var tbl = imag[i];}
if(imag[i].className.indexOf('ms-formtoolbar') != -1 ) { var tbl2 = imag[i];}
}

var ribbonhide = document.getElementById("s4-ribbonrow");
var chkBx = document.getElementById("chkAgreement");
var stylechng = tbl.style;
var stylechng2 = tbl2.style;
var stylechng3 = ribbonhide.style;

if(chkBx.checked==false) {
stylechng.display = 'none';
stylechng2.display = 'none';
stylechng3.display = 'none';
}
else {
stylechng.display = 'block';
stylechng2.display = 'block';
stylechng3.display = 'none';
}
}
hideload();</script>
7. Add a content editor webpart in the page. This content editor webpart should be added just below the fields of the form.
8. Add following HTML code in the webpart.
<script>
hideload();</script>
Done.
If you don’t want to touch the ribbon control please remove the greyed out line above. Hiding the ribbon can be tricky as you might find it difficult to modify the webparts. But it gives a very good look and feel to the page if you remove it.
 
So if you have hidden the ribbon, you can edit the page by first closing content webpart, deployed in step 7 and 8. Then edit the page and redeploy the closed webpart.
 
 
 
 

How to insert webparts in Default SharePoint pages

Many times new requirements come in SharePoint projects where users want little customization in the default pages like Newform.aspx, Allitems.aspx.
These requirements are generally very easy to make on a custom page and thats why developers end up creating new pages.

However, such requirements can often be easily implemented by just inserting a Content editor webpart in these pages. It may be possible that you are not getting edit page option on the page. This trick will help to edit such pages.

Add "?toolpaneview=2" at the end of the page URL. So if your page URL is http://sharepointsite/sites/site1/lists/list1/newform.aspx so change the URL to http://sharepointsite/sites/site1/lists/list1/newform.aspx?toolpaneview=2.

Now you will get the page in the edit mode. Add whatever you want to and save the page.

This trick is helpful in almost all the pages in all the versions of SharePoint i.e. 2003,2007 and 2010.