SharePoint 2013 Overlay Events to be Opened on Popup

Standard

 Yesterday we got a customer request that asked us to make all events on SharePoint calendar list to be opened on popup instead of open it on a new page

 We simply go to list setting and change dialog setting from list’s advanced settings. However this is doesn’t work for overlay events and continued to open it on a new tab Continue reading

Advertisements

Use Signalr with SharePoint Webparts

Standard

Update 1: Download sample source code at https://1drv.ms/u/s!Ao7Q-78sQy60gcdrmHFyndmR_HWEMQ

Last month I got a task to make Signalr working on SharePoint environment. As all developers used to do on starting new tasks, I started my task with a search on Google to know how people made this task. I have found a lot of blogs speaks about that , however I didn’t get my answer as all people use SharePoint App-part in doing such scenario but no one made it on SharePoint web-part

It is totally different scenarios to use Signalr in app-part and web-part. App part simply is a separated ASP.NET and you can easily configure it away from SharePoint environment. To use Signalr in web-part or SharePoint user control you have to make extra configurations for Signalr and OWIN that are configured by default on ASP.NET web application. This made me deep dive into Signalr and OWIN architecture and make it work on SharePoint

Continue reading

Necessary of SharePoint Specific Antivirus Product

Standard

To ensure your website is secure from viruses and other malicious files, you must install an effective antivirus product. Malicious files could be uploaded via any missing validation on upload file controls or any other Vulnerability.

All antivirus monitor the hard disk and scan files periodically for any changes then alert you about these viruses. This is a good idea to make your website files safe, but what if your website saves the uploaded files into database? The answer is antivirus has no control on these files and you can’t detect you have a malicious files on you website

SharePoint saves contents including files into content database so you need to install SharePoint specific antivirus product that scan the files before saving it into the content database. Microsoft Forefront has such plugin that protect your SharePoint farm against malicious files. Continue reading

Add New SharePoint Rich Content Editor Styles

Standard

All of us as a developers face a problem of misuse of the rich content editor that makes SharePoint site content looks very bad.

We always blame SharePoint power users (Content Editors) because we think that they must add a new content in a right way that make their content fits well with the whole site look and feel. On the other hand power users is not a web developer they don’t know about HTML and how to use it.

To eliminate this gab between developers and power users, it is good idea to provide them with a predefined custom styles to be used in editing content. To do this follow the following steps:

  1. Add a new CSS file or use any one referenced by that site
  2. Add new CSS class with the same conventions of the SharePoint Content Editor
  3. Save your file and open the SharePoint Content Editor to make sure your new style is their

Continue reading

Compare Content Types in SharePoint List

Standard

Did you try to get a content type attached to list by its Id? for example you need to add a condition if a list item is Folder content type

I tried, it was simple but tricky because it seems to have a new ID inherited from the original content type so you must get the item content type first then compare its Parent with the Content type you need.

Here is an example to know if the current item is Folder content type or not (Folder content type has Id = 0x0120) :

If you use the following code it will give false although the content type is folder type

item.ContentType.Id == new SPContentTypeId(“0x0120”)

you have to use the following code to make it work

item.ContentType.Id.Parent == new SPContentTypeId(“0x0120”)