Year: 2009

Dropbox – File-sync tool for backup and sharing of files

For a few days now, I’m using Dropbox. It’s a service that lets you store your files online, but with a really great integration into your operating system (they support Windows, Linux, and MacOS!), so that you can access them nearly everywhere very comfortably.

I’m using it so that I can now easily access some shared files on my netbook, my laptop, my office laptop, and even my iPhone without having multiple copies floating around! Before that, I always had to copy a document on my thumbdrive and carry it with me (and no, I did not always have the latest version with me, and yes, I sometimes had a few copies of a document….)
Dropbox

The 2GB version is free (which can be slightly expanded, please see the end of this posting for more info), if you need more space they offer a 50GB and a 100GB version for a monthly fee.

Their Features page gives a good overview of their service:

File Sync
Dropbox allows you to sync your files online and across your computers automatically.

File Sharing
Sharing files is simple and can be done with only a few clicks.

Online Backup
Dropbox backs up your files online without you having to think about it. 

Web Access
A copy of your files are stored on Dropbox’s secure servers. This lets you access them from any computer or mobile device.

Security & Privacy
Dropbox takes the security and privacy of your files very seriously.

Mobile Device Access
Free Dropbox iPhone app

 

Also, if you edit or delete a file, a history of the change is kept and you can go back to a previous state within 30 days:

Dropbox

 

You can also see what was changed when in a nice overview tab (web version):
Dropbox

 

Files can be stored within folders (web version):
Dropbox

 

Here’s the menu for a file as seen on the web version:

Dropbox

 

As I said, Dropbox can also be tightly integrated into your operating system. As I’m using Windows, I’ll show some examples of the Dropbox Window ‘client’ here.

During installation, you can specify where Dropbox should store the documents. Yes, that means a local version of the documents inside your Dropbox will be available!
After the installation, you can find the Dropbox symbol in the taskbar:
Dropbox

A single click opens the settings for it:
Dropbox

 

Double-clicking opens the location that you specified during the installation (of course you can also simply navigate there through Explorer):
Dropbox

 

Additionally, for the folders within your Dropbox, you get the following menu for viewing deleted files and sharing the folder when you right-click:
Dropbox

 

This is how the contents of the folder look like. Not much difference to a regular folder in Windows, but the difference is that any changes made here (e.g. copy&pasting a document into here, or editing a doc) will be synchronised to the Dropbox server, and from there then to all other locations that you set up. For example, if I upload a document via the web interface from my office laptop, I can later on access that document on my laptop, netbook, AND iPhone.
Dropbox

 

 

The difference between the Windows version and the iPhone version is that the documents in the iPhone version do not get synchronised immediately, but only when you access them. But you have the option to set favourites, which are documents that get downloaded immediately and are available for ‘offline access’

Startscreen for the iPhone application
Dropbox

 

Overview of all folders inside my Dropbox:
Dropbox

 

Inside the ‘SharePoint’ folder:
Dropbox

 

Viewing the document list:
Dropbox

 

My favourites (documents that are stored directly on the iPhone):
Dropbox

 

Here’s how an Excel spreadsheet looks like on the iPhone (in landscape mode):
Dropbox

 

And this is the internal PDF viewer (portrait mode)
Dropbox
 

 

As I said before, the service is free for the 2GB version. Additionally, if you refer a friend or sign up through a referral, you get an additional 250MB:

 Dropbox

So if you’re interested in testing or even using it, here’s my referral link: https://www.dropbox.com/referrals/NTI4MzQ1ODQ5

PS: If you complete the first 5 steps on the Getting Started page, you’ll get an additional 250MB:
Dropbox

Cheap new lens – ultra wide angle + fisheye

Last weekend, I bought a 0.38x converter lens for just $5 at the ‘Thieves Market’ (you could say it’s a flea market). Naturally, it isn’t worth much more than those $5….

Today, I bought a step-down ring to be able to add it onto my existing 14-45mm lens, and went towards the Boat Quay area to take some first pictures with it. The results:

This is how much I see with the 14-45mm lens at 14mm regularly:
New Lens

Once I add the converter, I get this at 14mm:
New Lens
Already a lot more to see! But clearly, I can also see the inside of the lens….

If I zoom in a bit until I don’t see any black corners of the inside of the lens anymore, I get this angle (24mm):New Lens
Still a lot more than at the regular 14mm.

 

Of course, you get what you pay for, so the quality is not really good if I use this lens. But given the extremly cheap price, it’s a nice toy!

SharePoint 2010 Sneak Peak

The SharePoint team has released a sneak peak into SharePoint 2010:

 http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx

The preview is divided into three areas: Overview, IT Professional, and Developer

SharePoint surveys and the order of the questions during export to Excel

I noticed some interesting, and in my case not desirable behaviour when I was exporting the results from a SharePoint survey to Excel: the order of the questions in Excel differed from the order in SharePoint.

Some further analysis showed the following:
When you export to Excel, the order is determined by the creation time of a question, so the questions that were create first appear before the others. This even happens after you reordered your questions in your survey, which was what I did.

To give an example:
I create a survey with 3 questions in the order 1,2,3:
SharePoint Survey Questions Order

I then reorder them to 3,1,2:
SharePoint Survey Questions Order

If I export them now to Excel, the order of the columns however is still 1,2,3:
SharePoint Survey Questions Order

So in case you need to export to Excel and don’t want to reorder your columns there afterwards, make sure you got the order right when you create your survey questions.

Displaying the total number of postings by users in a SharePoint discussion board

Recently, I wanted to display some small statistics about how often people participated in the discussions in a SharePoint discussion board. I wanted to show the total number of postings in a small web part. The solution for this requires SharePoint Designer, as it makes use of the Data View Web Part.

I’ll show the steps to display the list of people who participated in a discussion board and their total number of postings from the beginning:
First, I create a new blank site and add a discussion board:
Discussion Board Postings

I open the site in SharePoint Designer and add a Data View Web Part into the right web part zone. In the Data Source Library to the right, I select the discussion board, and then Show Data:
Discussion Board Postings

Right now, only the discussion topics are contained in the rows returned, but not all postings. To change this, click on the name of your Data Source, in my case Discussion Board:
Discussion Board Postings

In the following dialog, select RecursiveAll under Item and folder scope:
Discussion Board Postings

Next, select Created By (if wanted also additional fields), and choose Insert Selected Fields as…. Multiple Item View. The Data View Web Part is now populated with the selected fields.

In the Data View Web Part, select Sort and Group from its menu:
Discussion Board Postings

Sort by Created By, and select Show group header and Collapse group by default:
Discussion Board Postings

You will get something similar to the left part of the following image:
Discussion Board Postings
I then removed the unnecessary parts as seen in the image above, and added a new column for the number of postings. 

Click inside the cell underneath Postings, and in the source code add the following line into it:

<xsl:value-of select="count($nodeset)" />

Next we need to change the query fetching the rows. Find the following line 

<xsl:with-param name="nodeset" select="msxsl:node-set($dvt_Rows)/root//Row[((@Author)=$groupheader0 or ((not(@Author) or @Author=”) and $groupheader0=’ ‘))]" />

and replace it with 

      <xsl:with-param name="nodeset" select="msxsl:node-set($dvt_Rows)/root//Row[substring-before(substring-after(string(@Author),’userdisp.aspx?ID=’),’&quot;’)=substring-before(substring-after(string($groupheader0),’userdisp.aspx?ID=’),’&quot;’)]" />

 

That’s it, the result will look like this:
Discussion Board Postings

 

The drawback at the moment here is that it doesn’t sort by the number of Postings, which I haven’t found out (yet) how to do. 

Displaying a preview of a wiki's contents in SharePoint

Update 14 December 2009: Improved slightly, first the tags are stripped, then content shortened. 

Displaying a textual preview of an wiki’s article in SharePoint is quite easy. All one needs to do is create a data view web part with SharePoint Designer (free since April 1) and have it display the field ‘Wiki Contents’ from the wiki’s pages library. Now the contents of this field contain all the HTML markup of the article, which we now need to strip of the tags and also reduce in size.

In order to strip the ‘Wiki Contents’ of the HTML markup, we need to apply XSLT. In the xsl:stylesheet section of the data view web part, add the following template:

<xsl:template name="strip-tags">
  <xsl:param name="text"/>
  <xsl:choose>
    <xsl:when test="contains($text, ‘&lt;’)">
     <xsl:value-of select="substring-before($text, ‘&lt;’)"/>
     <xsl:call-template name="strip-tags">
      <xsl:with-param name="text" select="substring-after($text, ‘&gt;’)"/>
     </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
     <xsl:value-of select="$text"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Afterwards, find <xsl:value-of select="@WikiField" /> and replace it with the following

<xsl:variable name="strippedWiki">
  <xsl:call-template name="strip-tags">
     <xsl:with-param name="text" select="string(@WikiField)"/>
  </xsl:call-template>
</xsl:variable>
<xsl:value-of select="concat(substring($strippedWiki,1,800),
        substring-before(substring($strippedWiki,801,850),’ ‘))"/>
<a href="{@LinkFilenameNoMenu}" mce_href="{@LinkFilenameNoMenu}">….(more)</a>

This calls the template above with a part of the wiki article’s content (replace 800, 801, and 850 accordingly if you want to show more/less) and adds a link to it add the end. The concetanation here is to avoid having a word cut off by adding text add the end of the first substring until the first space is encountered.

The result looks like this:

sharepoint wiki preview

Showing only this week's events of a SharePoint calendar

Update: There was a mistake in the IsInCurrentWeek formula (ignored the year….), the updated version is now here. 

Recently a colleague asked me for some modifications on one of her calendars. Basically, she wanted to display only the events of the current week in the corresponding web part.

In order to get the default web part to do this, I had to find out whether a calendar entry is in the current week or not. At http://blogs.microsoft.co.il/blogs/sps/archive/2008/06/26/how-to-calculate-week-number-by-sharepoint-formula.aspx, I found the necessary information to calculate the week number of a given day.

What I did was to create 4 calculated columns for the calendar, namely WeekNumberStart, WeekNumberEnd, CurrentWeek, and IsInCurrentWeek. WeekNumberStart and WeekNumberEnd calculate the week number for the start day and end day of a calendar. IsInCurrentWeek returns a string (“Yes”, “No”) by comparing the current week number from CurrentWeek with the one from WeekNumberStart and WeekNumberEnd, and also checking if it lies in between these two.
CurrentWeek itself is actually a redundant value, as it is the same for all entries. So instead of using this extra column, the calculation could’ve also been used in the IsInCurrentWeek directly. I chose to create the extra column to make the calculations more readable at the expense of the redundancy.

The two calculated columns WeekNumberStart and WeekNumberEnd are calculated with the following formular (Replace Start Time with End Time for WeekNumberEnd):

=INT(([Start Time]-DATE(YEAR([Start Time]),1,1)+(TEXT(WEEKDAY(DATE(YEAR([Start Time]),1,1)),"d")))/7)+1

This calculated column returns a number, namely the actual week number of the given day.

The same calculation is done for CurrentWeek, but with SharePoint’s built-in Today as the given day:

=INT((Today-DATE(YEAR(Today),1,1)+(TEXT(WEEKDAY(DATE(YEAR(Today),1,1)),"d")))/7)+1

As SharePoint doesn’t allow to use Today in a calculated column, I had to create a single line of text column called Today first before I could create the CurrentWeek column. Afterwards, it could be deleted again.

Lastly, IsInCurrentWeek is used to check if the WeekNumberStart or WeekNumber end are equal to CurrentWeek, or if CurrentWeek falls between these two.

=IF(OR(AND(YEAR([Start Time])<Year(Today),YEAR([End Time])>Year(Today)),OR(YEAR([Start Time])=Year(Today),YEAR([End Time])=Year(Today))), IF(WeekNumberStart=CurrentWeek,"Yes",IF(WeekNumberEnd=CurrentWeek,"Yes", IF(WeekNumberStart<CurrentWeek,IF(WeekNumberEnd>CurrentWeek,"Yes","No"),"No"))) , "No")

On the web part to display the calendar, the filter settings are updated to IsInCurrentWeek Equals to Yes

 The final result: