Skip to main content

Posts

Showing posts with the label SharePoint

Add Custom Buttons to Edit or Save & Close a SharePoint Page

We all know that in a SharePoint page users can edit it by clicking "Site Actions->Edit Page". Currently the client I am working with wants to display a custom "Edit" button directly on the article page if the user has 'contributor' permission, when editing the page the button should show and do "Save & Close". For this specific requirement I did custom buttons in the page layout and made it work. Please see the code snippet below: Enjoy:-)

Some good SharePoint blogs to follow

I have to admit that this post is a refinement from 25+ SharePoint Bloggers to Follow. The reason I did this is I want to provide a little bit more information about the blogs which I found are great from a developer/architect's perspective. Path to SharePoint   Have to say the layout of this blog is a bit old-dated, with categories but no tags, makes it a bit hard to target the specific content you're interested.   Content is mixed with overviews of some solutions plus a few post taking about the "Easy Tabs" (guess it is their product). No code snippet and details.   Richard Harbridge: Insights This blog provides some general overviews/comparisons for SharePoint, could be a good resource for entry level devs or business users.   SharePoint Javascript As the name indicates, this blog contains a lot of posts talking about implementing Javascript with SharePoint to achieve some nice customization.   SharePoint Rescue Rat...

Map SharePoint with local file drive - A complete guide

If you google around you can find quite a few posts talking about this 'simple' solution, but I find none of them gets into deepth, especially on prerequisites. So I write this post and hope it can provide meaningful information for users who need map SharePoint with local file drives. And I will give a short overview and the advantages and comments about this implementation.   Prerequisites You need to make sure the the "WebClient" service is up and runing on your server. If this service is disabled or missing on your server, you will have an error saying "The folder you entered does not appear to be valie. Please choose another"   To check if "WebClient" service is in your services list, just open services and see. If it is missing, please follow the steps to make it available:   Start the Windows Server Manager . In the tree view, highlight the Features node. In the details pane, click Add Features . In the Add Features Wizard ,...

A Step-by-Step guide to use HttpModule in SharePoint with SPContext

I guess you must be familiar with what is HttpModule and how can we leverage it for our web applications. But if not, better have a good read of this article . SharePoint is built on top of .NET, so it has all the rights to use the beauties of .NET. Here I want to demo a simple case of httpmodule on SharePoint. Say if in a company it has lots of site collections and user 'Picky Docky' has access for all of them, for a reason farm administrator want to block him for one of the specific site without change his SharePoint permissions. Here are the steps to do it:-)   Create a empty SharePoint solution add a class file to it named  CustomSecurityModule.cs , code as below Create a feature and scope to "WebApplication" Create a feature receiver. Code as below When activate the feature it will create a modle in the web.config file for the SharePoint web applicaiton you deployed to as below: Enjoy!

User Profile Service Sync Scenarios

Some research about how the user profile service app, and how it stores and cleans up profiles for the following scenarios: - What happens when a user is “Disabled” - What happens when a user is “Moved” into an OU that is NOT flagged for import from AD) - What happens when a user is “Removed” from active directory. When a user is "Disabled" in AD User profile sync will NOT remove the user from SP user profiles. Because this user may still have meta information in site collections. This disabled user will loss previous accesses associated with him, but all the files items/documents/files he was working with will be kept. When a user is "Moved" into an OU that is NOT flagged for import from AD or when user is "Removed" from AD User Profile is marked for deletion in the Profile database. You can't retrive user information from user profile service anymore. User won't be in search result once search crawl refre...

Content Type Hub - It's hard to say I love you

Recently some other developers suggested using content type hub for a client project and it created massive overhead: Added complexity for deployment Lots of errors from content type publishing Lookup fields are not supported and we have to use metadata fields, again.. more overhead. My suggestions for anyone what to try content type hub: Do NOT use it if there's no requirement to consume content types by multiple web applications Do NOT use it even you need simular content types in different web applications but you need different customization

SharePoint 2013: Unexpected response from server issue and how to fix

From time to time when you do some operations such as search using SharePoint 2013 you may see the following error: Unexpected response from server. The status code of response is ’500′. The status text of response is ‘System.ServiceModel.ServiceActivationException’ After having this issue on newly installed SharePoint 2013 farm in production environment, I figure it out that Single server is running out of memory. Especially, thanks to one new process noderunner.exe. Noderunner.exe is the new executable of search service on SharePoint 2013. This process can’t turn it off because Search is one of essential service application in SharePoint 2013, and it is integrated in many features. So, there are some things you can do to reduce the impact of Search on your system. Solution 1 Reduce the Search Service Performance Level with this PowerShell command: Set-SPEnterpriseSearchService -PerformanceLevel Reduced or Set-SPEnterpriseSearchService -PerformanceLevel PartiallyReduced,...

A SharePoint 2013 weather web part

I created a nice SharePoint 2013 weather web part. It has extremely simple code-behind and so easy for you to use or extend.  The core is using Yahoo! Weather Feed Plugin for jQuery Please go to https://weatherwebpartsp2013.codeplex.com/  to grab it. It is free with all the source code. Enjoy!

How to add Lync presence to a SharePoint 2013 page

1. Add a "Snippet Editor" web part to the web part zone 2. Press "Edit Snippet" 3. Insert the following Snippet, replace the highlighte d parts with correct value <span class="ms-imnSpan"><a class="ms-imnlink ms-spimn-presenceLink" onclick="IMNImageOnClick(event);return false;" href="#"><span class="ms-spimn-presenceWrapper ms-imnImg ms-spimn-imgSize-10x10"><img name="imnmark" title="" class="ms-spimn-img ms-spimn-presence-offline-10x10x32" id="imn_1,type=smtp" alt="Offline" src="http://dpgintranettldev/_layouts/15/images/spimn.png" sip=" Your Email Address " showofflinepawn="1"></span></a></span><span class="ms-noWrap ms-imnSpan"><a class="ms-subtleLink" href="#"> Your Name </a></span> 4. Save - ...