Hiding the Ribbon for Anonymous Users

by Vipul Bhavsar 28. October 2011 01:39

Ribbon is a great new feature introduced by SharePoint 2010. It provides great user experience for users with elevated privileges, like contributors and site owners. However, for users with lease privilege, such as visitors and anonymous users, it seems like a big waste of page real estate. Because for those users, all ribbon provides are navigation breadcrumb and welcome control (user name with a drop down list on top-right corner).

So I have been asked to figure out a way to remove or hide the ribbon area from user with lease privilege, and here is how:


1. Open your SharePoint master page




<div id="signinlink"><a href="/_layouts/authenticate.aspx">User Login</a></div>

<Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageLists">
  Put Your Control Here ... such as ...
  <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
  ..........
  </div>

<style>
#signinlink{display:none;}
</style>
</SharePoint:SPSecurityTrimmedControl>

2. Save and publish master page


OR



<div class="signinlink">
<a href="/_layouts/authenticate.aspx">User Login</a>
<a href="/_layouts/signout.aspx" class="signout">Sign Out</a>

</div>

    <asp:LoginView runat="server">
    <AnonymousTemplate>
        <style type="text/css">
            #s4-ribbonrow { display: none; }
        </style>
    </AnonymousTemplate>
    <LoggedInTemplate>
    <style type="text/css">
            .signinlink { display: none; }
            .signout { display: block; }
      </style>
    </LoggedInTemplate>
</asp:LoginView>


Class in style.CSS
.signinlink
{
color:#093762 !important;
font:12px Arial;
font-weight:bold;
text-decoration:none;
padding-top:20px;
}
.signout
{
color:#093762 !important;
font:12px Arial;
font-weight:bold;
text-decoration:none;
display:none;
}

Tags: , , ,

SharePoint 2010

New master page -Style.CSS code with center align layout

by Altaf Pinjari 24. October 2011 09:01

body {
background-color:#FFFFFF;
color:#676767;
font-family:Verdana,Arial,sans-serif;
font-size:8pt;
margin:0;
padding:0;
}

body #s4-bodyContainer{
min-width:760px;
background-color:#F1F0DF;
height:100%;
}

body #s4-ribbonrow{
min-height:43px;
/* [ReplaceColor(themeColor:"Dark2",themeShade:"0.9")] */ background-color:#7c7258;
overflow-y:hidden;
}
.ms-cui-topBar2 {
    border-bottom: 1px solid wheat;
    height: 43px;
}

.ms-siteactionsmenuhover{
/* [ReplaceColor(themeColor:"Dark2-Lighter")] */ border-color:wheat;
/* [RecolorImage(themeColor:"Dark2-Lightest",method:"Filling",includeRectangle:{x:0,y:489,width:1,height:11})] */ background:url("/_layouts/images/bgximg.png") repeat-x -0px -489px;
/* [ReplaceColor(themeColor:"Dark2",themeShade:"0.8")] */ background-color:#7c7258;
}

.ms-welcomeMenu.ms-SpLinkButtonActive{
/* [ReplaceColor(themeColor:"Dark2-Lighter")] */ border-color:wheat;
/* [RecolorImage(themeColor:"Dark2-Lightest",includeRectangle:{x:0,y:489,width:1,height:11})] */ background:url("/_layouts/images/bgximg.png") repeat-x -0px -489px;
/* [ReplaceColor(themeColor:"Dark2",themeShade:"0.8")] */ background-color:#7c7258;
}

.s4-breadcrumb-anchor:hover,.s4-breadcrumb-anchor-open,.ms-qatbutton:hover{
/* [ReplaceColor(themeColor:"Dark2-Lighter")] */ border-color:wheat;
/* [RecolorImage(themeColor:"Dark2-Lightest",includeRectangle:{x:0,y:489,width:1,height:11})] */ background:url("/_layouts/images/bgximg.png") repeat-x -0px -489px;
/* [ReplaceColor(themeColor:"Dark2")] */ background-color:#7c7258;
}

.ms-cui-tt-a:hover{
/* [ReplaceColor(themeColor:"Dark2",themeTint:"0.8")] */ border-color:wheat;
background:url("/_layouts/images/bgximg.png") repeat-x -0px -1000px;
color:#fff !important;
}


.s4-titletext
{   
    display:none;
}
.s4-socialdata-notif
{   
    display:none;
}
.s4-title {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:white none repeat-x scroll 0 -1013px;
margin:0;
min-height:64px;
overflow-x:hidden;
padding:0 0 0 0px;
word-wrap:break-word;
width:1000px;
margin-left:auto;
margin-right:auto;
}

.s4-titlelogo {
padding:12px 10px 12px 0;
text-align:left;
vertical-align:middle;
}
body #s4-topheader2 {

display:block;
width:63%;
min-width:996px;
margin:0px auto;
border-left:1px #aca082 solid;
border-right:1px #aca082 solid;
background-color:#7c7258;

}


.s4-toplinks .s4-tn a.selected {
/* [ReplaceColor(themeColor:"Accent1-Medium")] */ border-color:wheat;
/* [ReplaceColor(themeColor:"Accent1-Lighter")] */ border-bottom-color:wheat;
/* [ReplaceColor(themeColor:"Accent1-Lightest")] */ border-top-color:wheat;
/* [RecolorImage(themeColor:"Light1")] */ background:url("/_layouts/images/selbg.png") repeat-x left top;
/* [ReplaceColor(themeColor:"Accent1",themeTint:"0.35")] */ background-color:#F1F0DF;
/* [ReplaceColor(themeColor:"Accent1",themeShade:"0.20")] */ color:black!important;
padding:4px 5px;
margin:0px 0px;
}

.s4-tn li.static > a:hover
{
/* [ReplaceColor(themeColor:"Accent1")] */ color:white;
text-decoration:underline;
}

.s4-tn li.static > .menu-item{
/* [ReplaceColor(themeColor:"Dark2")] */ color:white;
white-space:nowrap;
border:1px solid transparent;
padding:4px 10px;
display:inline-block;
height:15px;
vertical-align:middle;
}



body #s4-mainarea
{
clear:none;
    width:63%;
    min-width:996px;
    float:none;
    margin-left:auto;
    margin-right:auto;
    padding-top:36px;
    background-color:white;
    border:1px #aca082 solid;
    height:100%;
}
.Fmenu {
font-family:Arial,Helvetica,sans-serif;
font-size:11px;
height:30px;
margin-right:0;
text-transform:uppercase;
width:85%;
margin-left:auto;
margin-right:auto;
text-align:center;
}
.Fmenu ul {
color:#6A72A3;
font-size:11px;
list-style-image:none;
margin:0;
padding:10px 0px 0 0;
}
.Fmenu ul li {
font-family:Arial;
font-size:11px !important;
}

.Fmenu ul li {
list-style-type:none;
}

.Fmenu ul li {
color:#6A72A3;
display:inline;
list-style-type:none;
margin:0;
padding:0;
}
.Fmenu ul li a {
color:#6A72A3 !important;
display:inline;
list-style-type:none;
margin:0;
padding:0;
font-size:11px !important;
font-family:Arial !important;
}
body #s4-leftpanel-content {
background-color:white;
border-color:gray;
border-style:solid;
border-width:0 1px 0 0;
padding:0 0 5px;
}
.s4-ql ul.root ul > li > a {
border-style:solid;
color:#6A72A3;
word-wrap:break-word;
}
.s4-ql ul.root > li > .menu-item, .s4-qlheader, .s4-qlheader:visited {
border-style:solid;
color:#6A72A3;
font-size:1.2em;
word-wrap:break-word;
}
.s4-titlelogo {
padding:0px 2px 0px 2px;
text-align:left;
vertical-align:middle;
background-color:#E1DAC8;
border-top:1px #aca082 solid;
border-left:1px #aca082 solid;
border-right:1px #aca082 solid;
border-bottom:1px #aca082 solid;


}
.s4-ql ul.root > li > .menu-item, .s4-qlheader, .s4-qlheader:visited {
border-style:solid;
color:#6A72A3;
font-size:8pt;
font-weight:normal;
word-wrap:break-word;
}
body #s4-leftpanel {
float:left;
width:180px;
}
.s4-ca {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:#FFFFFF none repeat scroll 0 0;
margin-left:195px;
margin-right:0;
min-height:324px;
}
.s4-specialNavLinkList {
display:none;}
body #s4-leftpanel-content {
background-color:white;
border-color:gray;
border-style:solid;
border-width:0 1px 0 0;
min-height:390px;
padding:0 0 5px;
}
.s4-ql ul > li > a:hover, .s4-ql ul.root > li > a:hover, .s4-qlheader:hover
{
    text-decoration:none;
    color:#e19c57;
}
.signinlink
{
color:#666 !important;
font-family:Tahoma;
text-decoration:none;
}
.ms-titlerowborder {
border-right:0 solid #B8BABD;
}
.flashdiv
{
    width:999px;
    margin-left:auto;
    margin-right:auto;
}
.s4-recentchanges {
border-bottom:1px solid #DBDDDE;
display:none;
margin-bottom:10px;
padding:5px 0 10px;
}
.ms-rteTable-default, .ms-rteTableHeaderFirstCol-default, .ms-rteTableHeaderLastCol-default, .ms-rteTableHeaderOddCol-default, .ms-rteTableHeaderEvenCol-default, .ms-rteTableFirstCol-default, .ms-rteTableLastCol-default, .ms-rteTableOddCol-default, .ms-rteTableEvenCol-default, .ms-rteTableFooterFirstCol-default, .ms-rteTableFooterLastCol-default, .ms-rteTableFooterOddCol-default, .ms-rteTableFooterEvenCol-default, td.ms-rteTable-default, th.ms-rteTable-default, .ms-rtetablecells {
border:0px solid #C4C4C4;
padding:2px;
vertical-align:top;
}
.practice a {
color:#000000 !important;
}
.practice a:hover {
color:#d9802c  !important;
}
.ms-WPBody td {
font-family:verdana,arial,helvetica,sans-serif;
font-size:8pt;
}
.heading_text_22 {
color:#939598;
font-family:verdana,arial,helvetica,sans-serif;
font-size:8pt;
font-size-adjust:none;
font-style:normal;
font-variant:normal;
font-weight:bold;
line-height:15px;
text-align:justify;
text-decoration:none;
text-transform:uppercase;
padding-left:16px;

}

.Heading_text_2 {
-x-system-font:none;
color:#6A72A3;
font-family:verdana,arial,helvetica,sans-serif;
font-size:8pt;
font-size-adjust:none;
font-stretch:normal;
font-style:normal;
font-variant:normal;
font-weight:bold;
line-height:15px;
padding-left:16px;
padding-right:10px;
text-align:justify;
text-decoration:none;
text-transform:uppercase;
vertical-align:top;
white-space:nowrap;
}
.ms-rte-layoutszone-inner {
border:medium none;
margin:0;
overflow:hidden;
padding:0;
word-wrap:break-word;
}
.s4-ql a.selected {
-moz-background-clip:border;
-moz-background-inline-policy:continuous;
-moz-background-origin:padding;
background:transparent no-repeat scroll  left  top  none;
border-color:#C6E5F8 #91CDF2 #91CDF2 !important;
border-width:0px !important;
color:#003759 !important;
padding-left:9px !important;
}
.s4-statusbarcontainer
{
    display:none !important;
}
body #pageStatusBar {
border-style:solid;
border-width:1px 0;
    display:none !important;
font-family:verdana;
font-size:1em;
padding:4px 5px 5px 10px;
}
td.heading_text_33 {
color:#000000;
font-family:Arial,Helvetica,sans-serif;
font-size:12px;
font-weight:normal;
line-height:15px;
padding-left:16px;
text-align:justify;
text-decoration:none;
}
.headingtext
{
    border-bottom:2px solid #6A72A3;
}
.ms-rtetablecells a, .ms-rtetablecells1 a{
    color:#003399;
}
.ms-rtetablecells a:hover, .ms-rtetablecells1 a:hover{
    color:#d9802c;
    text-decoration:none;
}
.emaillink a {
color:#D9802C !important;
}
.uemaillink a {
color:#D9802C !important;
}
.uemaillink a:hover {
color:#848284 !important;
}
.dirlink a {
color:#D9802C !important;
}

Tags: , , , ,

SharePoint 2010 | SharePoint Designing

How To: Disable approval workflow for a publishing site in SP2010

by Vipul Bhavsar 19. October 2011 01:34
Here are the steps to disable the approval process on a publishing site:
1.  Go to the Pages library settings and click on versioning settings and click “no”:
2. The click workflow settings and remove the approval workflow:

Tags: , , ,

SharePoint 2010

SharePoint 2010 site - Mobile View

by Vipul Bhavsar 15. October 2011 08:37

Find this file, look in your IIS directory for your SharePoint site and look for the App_Browsers folder. Mine file was located at:

C:\inetpub\wwwroot\wss\VirtualDirectories\portal.contoso.com80\App_Browsers\compat.browse

 


Option 1 - Modify the compat.broswer file

<capability name="isMobileDevice" value="true" />

 
for each device in the file located at your Web Application system file location e.g.
C:\inetpub\wwwroot\wss\VirtualDirectories\nbsp80\App_Browsers\compat.browse.
To:

<capability name="isMobileDevice" value="false" />


For each device in the file. I actually tried this and did a find replace on all.

Option 2 - Modify the web.config file


For this fix in the web.config file. Simply add this block in the 'configuration/system.web' child elements:

<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<filter>isMobileDevice=false</filter>
</browserCaps>

Tags: ,

SharePoint 2010

About Ignatiuz

Ignatiuz Technologies is an IT company offering technology solutions for customers keeping partner centric approach with a mantra "Compelling IT Solutions". The company is passionate to latest technologies & innovation. Our consulting led approach make our customers become partners & partner's transformation to global corporations.

Ignatiuz QR Code

Month List

Tag cloud