Tuesday, May 8, 2012

Change the Content Index location for Sharepoint Search Index (MOSS 2007)

There may be several reasons to change the Content Index Location (like Low Disk Space etc) for an Index Server. The important thing is that this must be done step by step after complete analysis as it is very risky and may result in search data loss if not processed properly.

Before changing location:
Please make sure that you are logged-in as Search Service administrator and must be a member of the Administrators group on the index server.


Step 1:  GOTO Central Administration --> Shared Services Administration --> Click the Shared Service you want to configure.





Step 2:  Click on Search administration  or Search settings under Search section.

 Now Click on Content Sources under Crawling on the Quick Launch

Step 3:  Now check the Status of the Content Sources, if the status is Idle for all the sources then GoTo Step 4 else select the content source and Click on Pause Crawl, repeat this for all the sources which are not Idle. It will pause the crawling of the source.

Step 4:




Thursday, April 5, 2012

Sharepoint Quick Launch expand/collapse by JQuery


Follow the below mentioned steps to make the Quick Launch expand/collapse:

1. Edit the Sharepoint site Master page ( Right click on Master page --> Send To --> Download a copy)

 2. Copy the below mentioned script code to the master page under the <body> tag:

 <script type="text/javascript" src="http://www.google.com/jsapi"></script>  
 <script type="text/javascript">  
  // Load jQuery  
  google.load("jquery", "1.2.6");  
 </script>  
 <script type="text/javascript">  
 $(function(){  
 //initialize menus  
   var menuRows = $("[id$='QuickLaunchMenu'] > tbody > tr");  
   var menuHd = menuRows.filter("[id!='']:has(+tr[id=''])");  
   //set img path for when submenu is hidden  
   var closedImg = "/_layouts/images/plus.gif";  
   //set img path for when submenu is visible  
   var openedImg = "/_layouts/images/minus.gif";  
   var cssInit = {  
     "background-image": "url('"+closedImg+"')",  
     "background-repeat": "no-repeat",  
     "background-position": "100% 50%"  
   }  
   var cssClosed = {"background-image": "url('"+closedImg+"')"}  
   var cssOpen = {"background-image": "url('"+openedImg+"')"}  
   //hide submenus  
   menuRows.filter("[id='']").hide();  
   //apply initial inline style to menu headers  
   menuHd.find("td:last").css(cssInit);  
   menuHd.click(function () {   
     var styleElm = $(this).find("td:last")  
     var nextTR = $(this).next("tr[id='']");  
     if (nextTR.is(':visible')) {  
       nextTR.hide();  
       styleElm.css(cssClosed);  
     } else {  
       nextTR.show();  
       styleElm.css(cssOpen);  
     }  
   });  
 });  
 </script>  

3. Upload the master page, checkin and approve it.
4. Now the quick launch on the Sharepoint site will be collapsed.

Feel free to let me know if you face any issue. 

Wednesday, April 4, 2012

Edit Sharepoint Breadcrumb by JQuery/Javascript



Folks,

You can follow the below mention steps to edit the Sharepoint Breadcrumb.
  • Create a new master page ("defaultNew.master").
  • Insert the jquery code: 
  • <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">
      // Load jQuery
      google.load("jquery", "1.2.6");
    </script>
    <script type="text/javascript">
    $(document).ready(function(){ 
                    $('a[class="ms-sitemapdirectional"]').each(function(i)
                                    {
              $(this).attr('href', $(this).attr('href').replace('Wiki%20Pages/Forms/AllPages.aspx', 'Wiki%20Pages/Home.aspx'));
                                          $(this).attr('href', $(this).attr('href').replace('/Forms/AllPages.aspx', ''));
                                    });
    });
    </script>
  • Upload the "defaultNew.master" to the masterpage gallery of root site.
  • Set the "defaultNew.master"  as the System Master Page of site.
Note: I am replacing the URL in the breadcrumb list, you can modify in other ways as well.


Feel free to let me know if you face any issue.

Sharepoint Utility - Get all admin users on Sharepoint Site

Wednesday, March 28, 2012

Welcome to the Fly Sharepoint Blog



Hi Folks,

Welcome to the Fly Sharepoint Blog, I would like to take initiative to help people understanding and coding Sharepoint with maximum ease and minimum efforts.

This blog will guide you with all the possible articles, tips & tricks and codes to develop the sharepoint components/applications and you will feel that you are Flying Sharepoint without any complex pilot training and License.

Ha ha ha ha.....

I wish you all a very Happy journey with this blog.

Cheers & Smiles !!!!!!!
Saurabh Sharma