Press This « WordPress Codex

I don’t know how I missed this feature in WordPress before but if you’ve never tried it have a look at “Press This”, it enables quick blogging of an article from another site through the browser.

It works by getting you to create a bookmark which is in fact a JavaScript snippet. While using the browser the bookmark was added to, if you visit a site with content you want to blog about just click the bookmark and a new post edit window opens with the title and source reference already added. Add your own text and publishing and you are done, couldn’t be simpler!

Check out the details at the link below (this post was created using Press This).

Source: Press This « WordPress Codex

Forced due to logging gap {0}

I have seen this error appearing many times in the SharePoint ULS logs and often wondered why the {0} is never replaced with a value. Turns out someone has already carried out this investigation already in this excellent blog post:

“_ULS_EXPAND_FORCED_LOGGING_MESSAGES_” Environment Variable Explained

I would recommend reading the blog post in it’s entirety but basically to get this value to populate you need to add an environmental variable. The easiest way is to use the Powershell Script in the article:

[System.Environment]::SetEnvironmentVariable(“_ULS_EXPAND_FORCED_LOGGING_MESSAGES_”, “true”, “Machine”)

SharePoint 2013 Custom Picture Library Creation & Deployment

I have had many painful experiences attempting to deploy picture libraries with custom fields from Visual Studio with previous versions of SharePoint but with 2013 I have come up with this method (which may not be the best but seems to work consistently). With any luck this will aid someone else and save them the time I have wasted previously. This guide is for SharePoint 2013 and the solution is developed in Visual Studio 2013, I have not tested this method with any other combination so outside of this environment you’re on your own.

  1. Open Visual Studio 2013 and create and SharePoint 2013 – Empty Project
    1. Create Empty Project
  2. Enter the name of the local URL of the SharePoint site you are going to test against, for this solution select Deploy as a sandboxed solution as there is no code required.
    2. Project Deployment
  3. As we are not developing any code for this solution set the project property Include Assembly in Package to False.
    3. Project Properties
  4. Now we have our empty SharePoint project ready to go, in Solution Explorer right click the project name and select Add > New Item. Under the Office/SharePoint templates select List, give the list a name and click Add
    4. Add New Item
  5. On the list settings screen select Create a customizable list template and a list instance of it. From the templates available in the drop down select Document Library
    5. List Settings
  6. All going well the list has been added to the project and schema designer window for the new list has opened. Currently this is the schema for a document library so the content type needs to be changed. Click the Content Type button
    6. Select Content Types
  7. In the Content Type Settings window right click the current default Document type and select Delete, in this example I also removed the Folder content type as it was not required
    7. Content Type Settings Remove
  8. Click in the empty Content Type Name box if it is not automatically selected for you and select Picture from the drop down list and click OK
    8. Content Type Settings Select
  9. In the main window you can now see a different set of columns reflecting the content type change. In the solution explorer you can also see a bunch of files have been added under the list, select all the files under the list (not list instance) except Elements.xml (include Schema.xml, not selected in this screenshot) and delete them
    9. Content Type Updated
  10. Next the files that were deleted need to be replaced with picture library ones. Right click the list name in Solution Explorer and select Add > Existing Item.
    Next browse to the SharePoint 15 hive features and locate the Picture Library feature (default path):C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\FEATURES\PictureLibrary\Select all the files in the PicLib directory and click OK
    10. Add Supporting Files
  11. The screenshot below shows the above location and files contained in the PicLib directory in Windows Explorer
    11. Hive Files
  12. The Solution Explorer list structure should now look as follows. Click the Show All Files button at the top of the Solution Explorer window, you should now see the SharePoint managed file SharePointProjectItem.spdata under the list definition, open it up
    12. Solution with files
  13. The contents of the file should be similar to the one shown below. This file defines which files are included in the list feature when SharePoint packages the WSP solution, we need to adjust this to include the files we just added so they are deployed
    13. SharePointProjectItem
  14. Copy the existing line and create a new entry for each file to be included.Note it is very important to make sure only the Elements.xml file has a type attribute of ElementManifest, all other files should have a type of ElementFile.You should end up with the file looking similar to the screenshot below
    14. SharePointProjectItem Updated
  15. Next open the Elements.xml file from under the list and update the ListTemplate Type attribute to 109 as shown (109 is the type of the Picture Library)
    15. Update List Elements
  16. Now open the Schema.xml file from under the list. Update the List attributes for Title and URL to exactly match the ListTemplate Name attribute from the Elements.xml file.
    Add the EnableContentTypes attribute with a value of TRUE.
    Finally Edit the ContentTypes node so it matches the screenshot shown. Note there will be an extra item required if folders are required
    16. Update List Schema
  17. The list definition is now configured, on to the list instance. Open the Elements.xml file and update the TemplateType attribute to 109 to match the list definition. At this point save everything that is open and close and reopen the Visual Studio solution, this is required for Visual Studio to pick up the changes we made to the SharePoint project item file we made earlier.Note if this is not done the new files will not be packaged and the feature cannot be activated.After closing and reopening you can make any customizations required to the list and add any custom field columns required using the schema designer. This can be opened by double clicking on the list name in Solution Explorer
    17. Update List Instance
  18. Once all customizations have been made you are ready to deploy and test the solution right click the project in Solution Explorer and select Deploy. Visual Studio will now build and package the solution and attempt to deploy and activate the feature on the SharePoint site defined at the start
    18. Deploy
  19. In your browser open the SharePoint site and navigate to the Site Contents, your list should be listed with a new! flag next to it, click the list
    19. New Picture Library
  20. Your Picture Library is now deployed and ready to go!
    20. Ready For Action

FreeOTT Player Part 2

This will be a brief post as the experience with the FreeOTT player was not exactly outstanding. I already own a couple of the Popcorn Hour (now Cloud Media) devices which have an inbuilt app store with Smart TV style apps. The FreeOTT player is basically just this element of the Popcorn players, the main issue is that after visiting the store for a few years now very little changes and the apps available are very limited.

The device itself is adequate (barely), it is not the most responsive to the remote and while an operation is progress there is no way to cancel you just have to wait. From my experience the only two apps of any repeat value are YouTube and Plex (which is still relatively new and feels more like a beta product). There is no facility to plug-in an external drive and play media, using Plex the media has to be transcoded by the server if it is in any format other than MP4.

To sum up by giving away the players I assume Cloud Media is hoping to drum up enough interest for other developers to create content for the platform, however I am not sure it brings enough to the table to achieve this and the most likely outcome is a lot of these players will end up sitting in drawers. I had hoped this would give a rich Smart TV experience for cheaper dumb TV’s and give the ability to play content from USB sticks and the like but this is not the case. For the moment a better option is to stump up the $50 or so for one of the Android media playing sticks, I hope in the future a revised player with greater functionality is released and more apps created but for now sorry but this is not for me.

FreeOTT Player Part 1 – Unboxing

After a few weeks of waiting my FreeOTT player from Cloud Media arrived today. Cloud Media ran a social media promotion on Facebook where anyone could sign up for the chance of a free box ($5 shipping) and were giving 200 units! I guess the take up was slow as the promotion was extended by a couple of weeks. For those who have never heard of Cloud Media they were formerly known as Popcorn Hour and a few other subsidiaries and primarily produced high quality media players (two of which I already own). The FreeOTT player is their latest release and is aimed more at streamed content and online services, is minimalist and small enough to put in your pocket. Below are the unboxing photos, a post detailing the workings will follow.

FreeOTT Box FreeOTT Open Box FreeOTT Included Items FreeOTT Front Side FreeOTT Rear

As you can see there is very little to it. The main connections are HDMI for video (cable not included but offered as option), Micro USB power in (cable supplied adapter an option), Composite connector for additional video/audio (cable optional), all on the rear of the device. The front has the receiver for the remote control, what looks like a hard reset button and a Micro SD card slot.

I can see some people complaining about the lack of included cables but they are offered as options to purchase (reasonably priced too) and for me it was not an issue as I have them lying around anyway. Next up plugging the FreeOTT in!

Node.js Development Part 2 – Visual Studio and Node.js

In this second part of my node.js development investigation we will look at using Visual Studio as a development environment.

To begin open Visual Studio and select New Project.

New Project
New Project

From the available project categories select Web and then from the template select ASP.NET Empty Web Application. Select a location for the project and then give it an appropriate name.

Create Empty Web Application
Create Empty Web Application

You should now be faced with an empty web project in the Visual Studio IDE.

Visual Studio Solution
Visual Studio Solution

Delete all default files/folders that were created with the project. Now create a JavaScript file called app.js with the following contents:

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, '');
console.log('Server running at');

This is the sample code from homepage that creates a basic webserver that will respond to http requests on port 1337 with the plain text Hello World.


Next the Visual Studio project needs to be configured to start up node.js when run so we can test the webserver just created.

Project Properties
Project Properties

From the top menu select DEBUG and Start Without Debugging or launch with Ctrl + F5

Run Project
Run Project

A command window should now open with the address of the running server.

Command Window
Command Window

Copy this address into a browser and voila the page is served by node.js.

Running In Browser
Running In Browser

You now have a running server that is responding to requests and serving responses over http. At this point there is little you can actually do with this, the next posts will cover adding packages to serve CSS files and HTML pages in a structured way, connecting to a database to serve content and running node.js under IIS stay tuned!

Node.js Development Part 1 – Installing Node.js

Node.js is a very fast application platform for building network applications, it is free to use for both personal and commercial applications. A simple webserver can be written in a few simple lines of code and there are currently over 30,000 Node Package Modules to extend the core functionality.

Applications are written in JavaScript which enables deployment across a large number of platforms. Installers/binaries are available for Windows, Mac, Linux and Sun OS with source also available for download. This series of posts will be focused on the Windows platform as this is where I do a majority of my work and will include advice on using Visual Studio 2012 as a development tool.

To install node.js simply browse to:

and click the Install button in the centre of the page. This will download the Windows x64 msi installer.

After the installer has downloaded run the msi and accept the defaults as shown below.

Setup wizard
Setup wizard
End User License Agreement
End User License Agreement
Destination Folder
Destination Folder
Custom Setup
Custom Setup

And that’s it node should now be successfully installed, the next part will cover testing the installation by setting up a Visual Studio web project and creating a basic webserver in node.js.


Recently I discovered a new service CloudFlare which I have been testing on this blog, I stumbled across it while visiting another site that had an outage. CloudFlare works by adding an extra layer between your website and the rest of the internet. It provides CDN, optimzation, security and analytics as well as offering integration with other apps.

The best feature of CloudFlare is that it has a free tier so you get to experiment with many of the features without having to sign up for a lengthy contract or even get your credit card out. Since setting it up I have created a deliberate outage and then when testing, yes my site was still available, outstanding!

The ability to combine javascript files into a single request and minify HTML, CSS & javscript files to reduce requests and bandwidth alone is worth signing up for. I have now implemented it across all the sites I manage without any issues, just benefits.

My recommendation give it a try today, you may be suprised and if you don’t like it just turn it off again!

I am in no way associated with CloudFlare other than being a free user.

SharePoint 2010 – User Profile Synchronisation Issues

After struggling with even getting the User Profile Synchronisation service set up within SharePoint 2010 my syncs were failing every time. The ULS and event logs both let me down by not providing anything but generic messages.

Finally through much Google searching I found not the solution but a way to diagnose issues I was not aware of. The MIIS client, Synchronisation Service Manager. This tool can be found already installed (!) in %programfiles%\Microsoft Office Servers\14.0\Synchronisation Service\UIShell\miisclient.exe

Running this brings up a window with a log of all User Profile synchronisation attempts and more importantly their associated error messages as shown below:

MIIS Client
MIIS Client

This enabled me to quickly decide where the issue was and then resolve it, hope it saves someone else a few hours of searching for User Profile Synchronisation error messages!