Wednesday, 23 May 2012

How to check SharePoint 2010 installation type

For getting SharePoint installation type in your SharePoint farm this is the quick way to check the SharePoint installation type.

1. Open regedit.exe from windows button --> type regedit
   and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS




2. In WSS check your " ServerRole "
   Here you can get your ServerRole which type of your installation

   SINGLESERVER is knows as - Stand Alone

   APPLICATION - Farm Complete

   WFE - Web Front End
 

Wednesday, 16 May 2012

Hide the SharePoint ribbon from anonymous users and in SharePoint List display page


 


For hide the SharePoint ribbon from anonymous users we can use below STYLE in masterpage 
AnonymousTemplate.
  
<style type="text/css">
body #s4-ribbonrow {
display: none;
}
</style> 
 
Example 1: 
 
<asp:LoginView id="LoginView2" runat="server" >
<AnonymousTemplate>
<div class="customLogin"> 
<a href="/_layouts/authenticate.aspx"><span class="style3">Login</span></a>
</div>  
<style type="text/css">
body #s4-ribbonrow {
display: none;
}
</style>
</AnonymousTemplate>
<LoggedInTemplate> 
<style type="text/css">
.customLogin {
display: none;
}
</style>
</LoggedInTemplate>
</asp:LoginView>
 
 
and sometimes SharePoint lists may have a workflows for update and insert the items, so this time Ribbon features will visible to users like edit, new item, delete like that.
User should have update skills through workflow but he should not have editable features in ribbon. So you will have to remove/hide the ribbon for user view.
 
 
In order to completely hide the ribbon either add Content Editor Web part and you can add the below script in Content Editor Web part html source
I don’t want to display the ribbon in list item display page, so i have added CEWP in DispForm.aspx page and added below script in it.

<script type="text/javascript">
        document.getElementById("s4-ribbonrow").style.display = "none";
    </script>