Catégorie : Niveau intermédiaire

Send an email to several recipients from a String in a workflow [Sharepoint 2013]

I found the case in which I have to send 1 email to several recipients. I have the names stored into a Sharepoint list. Using REST API and a call into my Workflow I’ve been able to get a list of login names (using $expand=MyUserField and $select=MyUserField/Name), then you just need to concatenate them separate […]

Load a script once a DispForm is fully shown in Sharepoint 2013

Sharepoint 2013 introduced the JSLink. This is very useful to play with forms and views. My attempt here is to remove some rows from the DispForm. To do so I needed to trigger an action as soon as the fields rendering has been done. After different tries, I finally came up with the PostRender option. […]

Add a SharePointWebControls into a HTML version of a MasterPage [Sharepoint 2013]

In Sharepoint 2013 it’s now possible to create the MasterPage based on an HTML file. Here is the snippet you need to add into your HTML page to get a SharePointWebControls: <!–SPM<%@ Register Tagprefix= »SharePointWebControls » Namespace= »Microsoft.SharePoint.WebControls » Assembly= »Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c » %>–> <!–CS: Start Create Snippets From Custom ASP.NET Markup Snippet–> <!–SPM:<SharePointWebControls:TextField runat= »server » FieldName= »Title » />–> <!–CE: End […]

Illegal use of $_SERVER. You must use the request class or request_var() to access input data. [phpBB]

When I want to update my phpBB forum I get this annoying message because I’m using a homemade auth file where $_SERVER is used. I found the solution on the phpBB forum: Modified /forums/config/parameters.yml. Set core.disable_super_globals to false and delete the cache

Get color_id from a Google Calendar using API [PHP]

For a project I needed to get the events from a Google Calendar, as well as the colors from it. It’s been a pain, but after a couple of days I’ve been able to create a PHP page to do so. It will use the server-to-server auth mechanism. I’ll try to provide the different steps […]

Play with ribbon on Sharepoint

In Sharepoint 2010 and 2013, there are some existing functions to deal with the ribbon. Below an example of what we can do: // we need the file « sp.ribbon.js » SP.SOD.executeOrDelayUntilScriptLoaded(function () { // use PageManager var pm = SP.Ribbon.PageManager.get_instance(); // define a function to call when the ribbon is loaded var DoSomethingWithRibbon=function(ribbon) { // For […]

How to change the default logon name on Windows 7

On a remote PC it was another logon name that appeared by default… In that case I had to click on « Switch User », then « Other User », and finally enter my username and password. Very frustrating. After a few searches I found we can change the default name using the registry and with the below commands […]

Change screen saver timeout [Windows]

Let’s say your network admin blocked the default screensaver timeout to 15 minutes, but you want more…. You can change this timeout by running as an administrator the regedit then use the « Find… » command to look for « ScreenSaveTimeOut ». It should be under Computer\HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Control Panel\Desktop The timeout is defined in seconds. Just change the value and […]

Excel file as an HTML table and Date formatting

If you create an Excel file using an HTML Table, then it exists a way to format the cells based on some CSS rules. Some examples can be found on this blog post. I spent some time trying to figure out how to display correctly the dates, whatever your regional settings are ; for exemple […]

Pure Javascript Drag and Drop cross browser from IE8

I was looking for a simple JavaScript to drag a div element around, and that would work with IE8 and without any third party libraries (like jQuery). It’s been very difficult to find a simple code ! Finally http://news.qooxdoo.org/mouse-capturing saved me with some code… but there was still a problem with IE8 due to the […]