Monday, February 27, 2012

Repairing missing My Site and My Profile links in SharePoint 2010

Recently came across a very odd issue where the My Site and My Profile links were missing from the User Menu – thats the little drop box with your username on it in the top right corner of a SharePoint 2010 site.
Interestingly enough, they were both visible within Central Administration, but not on any of the child site collections.

To get this working I had to check or modify the following items :
  1. Make sure the Social Tags and Note Board Ribbon Controls Farm Feature is Enabled.
  2. Make sure the User Profile Service Application is associated with your Web Application.
  3. Make sure the User Permissions are set appropriately in the User Profile Service Application.
  4. Finally if its still not showing up, try toggling the Self Service Site Creation on.  Refresh your site, and then toggle it back off.I dont really understand why this works, but it seems to for two of my farms.
And now with those steps you should be able to see the My Sites and My Profile link in your User menu.

How to Configure Alternate Access Maping ?

I have been deploy SharePoint Server 2010 for my Organization, but I have two different url
1. Intrantnet url: example(http://sharepointserver2010)
2. Internet url: example(http://mycompanyname.sharepointserver2010)
my problem like this:
I have completed configure enterprise search for my Intranet url it is working correctly.
but for my Internet url it not working. the search result appear like this,
The Web application at http://mycompanyname.sharepointserver2010/could not be found. Verify that you have typed the URL correctly. If the URLshould be serving existing content, the system administrator may need to add a
new request URL mapping to the intended application.

So how can I sole this problem?


Answer
1. Central Admin ==> Select Web App ==> Extent Web App
2. Go to IIS manager and Check your Site make sure your site is correctly 
3. Go to c://windows/system32/drivers/etc/host (edit it in not page) set your url and save 
4. Try your url and see.

Tuesday, January 31, 2012

SharePoint search and anonymous users

If you have a public Sharepoint site (MOSS 2010, MOSF,MOSS 2007 or WSS 3.0) that is accessible to anonymous users and you’re not using custom scopes, you probably already noticed that every time users try to search they get a user prompt. To get pass this prompt you must enter valid username, otherwise you’ll get famous “Access Denied” page. So much for anonymous access, right?
Anyway, the problem is with SearchResult.aspx page, specifically with one of the inheritance reference that ASPX page. I’m talking about the part of the code that sets the inheritance of the page from the generic application page base class, which is not really required for this page to function properly.  
To allow anonymous users to search your publicly available sites you need to remove that inheritance from the code, so find part of the code inside the <Page>  tag that states “Inherits="Microsoft.SharePoint.ApplicationPages.SearchResultsPage"  and remove that part of the code (not the whole line, just the part that inhertis the application page base.) SearchResult.aspx page is usually stored at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SearchResult.aspx on your SharePoint server. Make sure you backup the file before making any changes!
Making those changes will not only allow anonymous users to search the SharePoint content, but also will keep the SharePoint search secure, meaning that anonymous users will only be able to search the part of the SharePoint they have permissions to view.

Sunday, October 2, 2011

Global Navigation style

I have been searching for a simple tab web part for SharePoint but mostly came up empty handed… I was looking for something that a user can easily drag and drop a web part onto a specific tab within the page. There are quite a few free tab web parts out there but most of them were not just quite what I wanted. I checked out the following Tab web part solutions.
  1. Easy Tabs: From Path To SharePoint
    • Pro: The tabs automatically take the name of the web part.
    • Con: There is no option to add more than one web part per tab, and the User Interface is not that intuitive.
  2. Zone Tabs: From MSDN
    • Pro: You have a lot of options for tab customization
    • Con: It’s a web part that you have to install on the server. From what I remember it’s not that easy to re-arrange the web parts on the page.
I finally found this article from Bits Of SharePoint Site:
http://www.bitsofsharepoint.com/ExamplePoint/Site/TabPage.aspx
His code was exactly what I needed. All I had to do was make a few adjustments of the HTML and create my own tab styles. The process to get this to work is you simply edit the page layout in the source link below (Code is already included in header control) and change the name of the tabs to what ever you want. You can have as many tabs as you want but if you go over 8 you will need to add more web part zones.
<li><a href="#tab-1" class="selected"><span>Tab1</span></a></li>
<li><a href="#tab-2" ><span>Tab2</span></a></li>
<li><a href="#tab-3" ><span>Tab3</span></a></li>
Once you have your tabs specified, simply choose what design you want. I created a few example designs that will get you started. To change the designs simply remove the commented out referenced style sheet and comment out the one you don’t want. You can place the support files anywhere you want but the links in the page layout point to the 12 hive: /_layouts/1033/styles/tabstyles/
For inspiration, I looked around the web and found a few unique styles that I wanted to replicate, and I also came up with a few of my own. Please download the Source Files HERE and give it a try!
Design 1: MSN
msntab
Design 2: Yahoo
yahootab
Design 3: WebMD
webmdtab
Design 3a: WebMD Alt
webmdalttab
Design 4: Rounded Tabs 1
roundtab
Design 5: Rounded Tabs 2
round2tab
 http://erikswenson.blogspot.com/2010/04/sharepoint-tab-web-part-jquery-java-and.html

SharePoint Global Navigations Customizations

Customizing SharePoint 2010 global navigation with Css and jQuery – Part 1

The global navigation in SharePoint is an important factor for the SharePoint site, this navigation are there to help orient users so they easily can move around the site. So when it comes to branding and customizing a SharePoint site it´s one of the key factors. When you branding the global navigation don´t forget to think simple but attractive, users may use the site navigation more than they use the search to find information.
In SharePoint 2010 the global navigation renders with unordered lists and list items (UL and LI), which gives us a simpler and more standard way for customization, especially compared to previous versions of SharePoint when the navigation rendered in a nestled table markup. There are a couple of ways and tools when it comes to build a custom navigation in SharePoint. The central point for the navigation is the functionality and the look and feel that means that we have to deal with CSS 2.1 or 3.0 and the SharePoint ASP menu control and its data source.

Friday, September 2, 2011

SharePoint 2010: Hide Recently Modified Items


http://ranaictiu-technicalblog.blogspot.com/2010/07/sharepoint-2010-hide-recently-modified.html
In SharePoint 2010 we all are familiar with the following annoying quicklaunch menu:
image
In SharePoint 2010, the recently modified items is one of many less-used feature. In software industry we are familiar with 80-20 principal. If 80% custom wants a feature then we should go with it and if you can satisfy 80% users then you have the successful product. I guess the ‘Recently Modified’ quick link doesn’t even needed by 10% people but the link is enable by default. Maybe this is a security feature to let administrator know what files have been modified recently. But there should have an on/off option as this is less wanted feature and most of the administrators want to hide this link. Justin has already found a way to hide the option by modifying template file asdescribed in his blog. However, we can fix the issue without modifying the shared file. Specially in case of shared hosting we don’t want to modify the files from 14 hive. The two approaches described here is implemented by modifying master page. The first approach is acceptable but may have unknown side effects. On the other hand second approach is much better and less chance of side effects.

 

First solution:

1. Open your master page (default one is V4.master) and find the content place holder ‘PlaceHolderLeftActions’ as shown below:
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server">                
</asp:ContentPlaceHolder>
2. Now set the content place holder visible property to false. as shown below:
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server" Visible="false">            
</asp:ContentPlaceHolder>
Why it works?
The above trick works as in the aspx files the recently changed menu is put inside the placeholder. If you open a file in SharePoint Designer  you can find that the recently modified menu is put under the placeholder with id ‘PlaceHolderLeftActions’ as shown below:
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
    <SharePoint:RecentChangesMenu runat="server" id="RecentChanges" />
</asp:Content>
Warning
The content placeholder ‘PlaceHolderLeftActions’ mainly used in blog and wiki sites. So if you are using any of this kind of template then hiding the content place holder will hide others related links too. However, I have found that hiding the content placeholder in team site works perfectly.

Second and Better Solution

However, the above trick may have side effects, if the same place holder (‘PlaceHolderLeftActions’) is  used by other pages. Another solution (which I think less side effects or no side effects) is to apply a css. As shown in the following screen, the ‘recently modified’ quick launch uses a css class named ‘s4-recentchanges’ (shown with firebug).
image
So we can another property ‘display:none’ to the same css class by adding the following extra attribute to master page’s header section:
<style type="text/css">
    .s4-recentchanges
    {
        display:none;
    }
</style>
You can even put the above section in a css file and refer the file in master page. The following image shows the master page with the css class:
image

In SharePoint 2010 we all are familiar with the following annoying quicklaunch menu:
image
In SharePoint 2010, the recently modified items is one of many less-used feature. In software industry we are familiar with 80-20 principal. If 80% custom wants a feature then we should go with it and if you can satisfy 80% users then you have the successful product. I guess the ‘Recently Modified’ quick link doesn’t even needed by 10% people but the link is enable by default. Maybe this is a security feature to let administrator know what files have been modified recently. But there should have an on/off option as this is less wanted feature and most of the administrators want to hide this link. Justin has already found a way to hide the option by modifying template file asdescribed in his blog. However, we can fix the issue without modifying the shared file. Specially in case of shared hosting we don’t want to modify the files from 14 hive. The two approaches described here is implemented by modifying master page. The first approach is acceptable but may have unknown side effects. On the other hand second approach is much better and less chance of side effects.

 

First solution:

1. Open your master page (default one is V4.master) and find the content place holder ‘PlaceHolderLeftActions’ as shown below:
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server">                
</asp:ContentPlaceHolder>
2. Now set the content place holder visible property to false. as shown below:
<asp:ContentPlaceHolder id="PlaceHolderLeftActions" runat="server" Visible="false">            
</asp:ContentPlaceHolder>
Why it works?
The above trick works as in the aspx files the recently changed menu is put inside the placeholder. If you open a file in SharePoint Designer  you can find that the recently modified menu is put under the placeholder with id ‘PlaceHolderLeftActions’ as shown below:
<asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
    <SharePoint:RecentChangesMenu runat="server" id="RecentChanges" />
</asp:Content>
Warning
The content placeholder ‘PlaceHolderLeftActions’ mainly used in blog and wiki sites. So if you are using any of this kind of template then hiding the content place holder will hide others related links too. However, I have found that hiding the content placeholder in team site works perfectly.

Second and Better Solution

However, the above trick may have side effects, if the same place holder (‘PlaceHolderLeftActions’) is  used by other pages. Another solution (which I think less side effects or no side effects) is to apply a css. As shown in the following screen, the ‘recently modified’ quick launch uses a css class named ‘s4-recentchanges’ (shown with firebug).
image
So we can another property ‘display:none’ to the same css class by adding the following extra attribute to master page’s header section:
<style type="text/css">
    .s4-recentchanges
    {
        display:none;
    }
</style>
You can even put the above section in a css file and refer the file in master page. The following image shows the master page with the css class:
image

Wednesday, August 24, 2011

SharePoint 2007/2010 PDF


SharePoint 2010 and Adobe PDF

The following post is an update from the original ‘SharePoint 2007 and Adobe PDF‘ post written in 2007. These notes are based on SharePoint 2010 Beta 2 (made publicly available in November 2009). Once the product has officially launched on 12 May 2010, an update will be posted if any changes are made to the process. The process is very similar to SharePoint 2007, with minor changes to folder location (14 instead of 12) and a slightly different administration user interface in the browser.
Click the following link