• Get the Flash Player to see the slideshow.
  • Categories

  • Authors

  • Great Quotes

    It always seems impossible until its done. — Nelson Mandela

Get in touch...

To have a chat about
your CMS needs...

Call us 0207 193 2014
or
Email us on

Archive for the ‘Articles’ Category

Webmonitor and Travelputer iphone apps

Wednesday, September 23rd, 2009

I wanted to thank everyone who we met yesterday at the adtech event and also provide a little more information around a couple of the iphone apps that I would have discussed with you.

We have the pleasure of working with Andrew Rennard, a very gifted iphone craftsman who has recently launched the following two application:

Webmonitor – a website monitoring and alerting application

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=324305556&mt=8

Travelputer – a gps journey tracker specially designed for cyclists

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=327568760&mt=8

I hope you enjoy these applications as much as we do and I look forward to discussing more about them with you soon!

Tips for Exhibitions

Thursday, July 16th, 2009

As we have done a couple of pretty good exhibitions recently, namely the Internet World and Marketing Week Live,
I wanted to share a couple of learnings we gained from how to best exhit at these events.

Firstly we got these great Roller Banners that are available now, we got ours fromhttp://www.discountdisplays.co.uk/html/budget-rolla.html
and were happy with the quality and delievery.

Take lead capture forms and a stapler to staple a prospects business card to the information you have gathered from them.
Don’t use the electronic readers, they are impersonal and don’t let you freely capture what your prospects requirements are.

A little further note on “Lead capture forms” I found these are useful to be printed in A4 before you attend the exhibition and contain the following fields for capture:

Name,
Company,
Telephone,
Email,
Date you met,
Place of Meeting,
Temperature of Interest with values of  ”Sizzling”, “Hot”, “Warm”, “Cool” and “Cold”.
The agreed next steps from your side
Notes

These sheets are essential and will form a great addition to your CRM system.

Always contact “Sizzling” and “Hot” leads within 24 hours of meeting them.

Smile :)

Always be standing up, it really does not look good to be sat down, far less people will approach and talk to you.

You will definetly get a lot of people trying to sell to you, don’t let them waste your time when you could be speaking to prospects, get rid of them quickly and politely.

Don’t hand out flyers to everyone passing by your stand!

This is a waste of precious materials and also your time. Wait for people who are interested in what your stand has to offer to come over to you.

When someone walks by and appears interested, ask them opening questions to get your prospects talking.
You should prepare some standard questions in advance.

Simple questions like “Do you have a website Sir/Madam?”, “Are you happy with the way your site is currently managed?”.

Once you get someone talking you can then find out their problems and how you can help them.

Once you have had a good discussion with someone, always ask for their contact details to complete in your lead capture form.

Always agree the next steps with someone. For example, “I will drop you an email next week to agree a suitable day to meet in your office…”

Keep conversations short and to the point. Give the person your full attention when speaking with them, don’t be distracted.

Always follow up with hot prospects as soon as possible, the longer you wait the cooler the lead becomes.

Enjoy the show :)

Business Development Tips

Wednesday, June 24th, 2009

I have been doing lots of business development work recently and thought I would share some of the learnings here.

My top learnings, almost in an order :)

1. Listen more than talk
2. Its all about relationships
3. Make someone else successful and you will be successful
4. Be positive everyone likes a winner
5. Be humerous everyone likes to laugh
6. Be memorable, be different, be relevant
7. Be brief and to the point
8. Always suggest next steps
9. Do as you say, follow up
10. Enjoy life and don’t be too hard on yourself

Hope you find them relevant to your life.

Read a Single XML File in Java

Monday, March 2nd, 2009

The following should complement the supplied article for reading XML files (DCRs) based on a directory.  This will read the contents of a singe file

package com.littleforest.examples;
 
import com.interwoven.livesite.dom4j.Dom4jUtils;
import com.interwoven.livesite.external.ParameterHash;
import com.interwoven.livesite.runtime.RequestContext;
import com.interwoven.livesite.external.*;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import org.dom4j.*;
import java.util.Properties; /* Added for proxy use */
import java.io.IOException;
import com.interwoven.livesite.file.FileDALIfc; /* Added to avoid use of CDATA write */
 
public class xmlDcrUtilities{
 
public Document readSingle(RequestContext context)
{
//look in any single directory only
Document doc = Dom4jUtils.newDocument();
Element fileElem = doc.addElement("Records");
 
FileDALIfc fileDAL = context.getFileDal();
 
String absoluteFilePath = context.getParameterString("DCRPath");
 
Document fileDCR = Dom4jUtils.newDocument(fileDAL.read(absoluteFilePath))  ;
fileElem.add(fileDCR.getRootElement().createCopy())  ;
 
return doc;
}
 
}

Read List of XML Files from Directory Tree in Java

Monday, March 2nd, 2009

This is a TeamSite 6.7.2/LiveSite 3.1 compliant mechanism that can be used to read all DCR files into a single XML files for further processing:

 
package com.littleforest.examples;
 
import com.interwoven.livesite.dom4j.Dom4jUtils;
import com.interwoven.livesite.external.ParameterHash;
import com.interwoven.livesite.runtime.RequestContext;
import com.interwoven.livesite.file.FileDALIfc;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
import org.dom4j.*;
import java.util.Properties; /* Added for proxy use */
import com.interwoven.livesite.external.*;
import java.io.IOException;
 
public class xmlFileListContents {
 
public Document fetchTree(RequestContext context)
{
//look in ALL directories
Document doc = Dom4jUtils.newDocument();
Element fileElem = doc.addElement("Records");
 
FileDALIfc fileDAL = context.getFileDal();
 
String areaRelativeBasePath = context.getParameterString("BaseDirectory");
 
String absoluteBasePath = fileDAL.getRoot() + fileDAL.getSeparator() + areaRelativeBasePath;
 
//recurse directories
String[] directories = fileDAL.getChildDirectories(absoluteBasePath);
int dirCount = directories.length;
 
for(int k=0;k<dirCount;k++)
{
String absoluteDirPath = absoluteBasePath + fileDAL.getSeparator() + directories[k];
 
//recurse files in directories
String[] files = fileDAL.getChildFiles(absoluteDirPath);
int count = files.length;
 
for(int j=0;j<count;j++)
{
String absoluteFilePath = absoluteDirPath + fileDAL.getSeparator() + files[j];
Document fileDCR = Dom4jUtils.newDocument(fileDAL.read(absoluteFilePath))  ;
 
//add path as an attribute
fileDCR.getRootElement().addAttribute("path",absoluteFilePath);
// add the dcr to the result doc;
fileElem.add(fileDCR.getRootElement().createCopy())  ;
//optionally, may prefer path as an element
//fileElem.addElement("../path").addText(absoluteFilePath);
}
 
}
 
//ensure we have those in the Base too
String[] baseFiles = fileDAL.getChildFiles(absoluteBasePath);
int fCount = baseFiles.length;
 
for(int i=0;i<fCount;i++)
{
String absoluteFilePath = absoluteBasePath + fileDAL.getSeparator() + baseFiles[i];
Document fileDCR = Dom4jUtils.newDocument(fileDAL.read(absoluteFilePath))  ;
 
//add path as an attribute
fileDCR.getRootElement().addAttribute("path",absoluteFilePath);
// add the dcr to the result doc;
fileElem.add(fileDCR.getRootElement().createCopy())  ;
//optionally, may prefer path as an element
//fileElem.addElement("../path").addText(absoluteFilePath);
}
 
return doc;
}
 
}

XSL:Sort by Date, Organise by Type

Monday, March 2nd, 2009

In this example, we have a collection of material which we want to make available to users: whitepapers, articles, tips etc.  We want to group these by material and show the relevant subheading when this changes, but avoid redisplaying the heading if it remains the same, say:

Whitepaper

Article

As per other examples, the key to doing this is to ensure we have the collection sorted correctly before we consider displaying them:

<xsl:apply-templates select="[list of items being processed]">
<xsl:sort select="./type"/>
<xsl:sort order="descending" select="substring(./created,7,4)"/>
<xsl:sort order="descending" select="substring(./created,4,2)"/>
<xsl:sort order="descending" select="substring(./created,1,2)"/>
</xsl:apply-templates>

At this point we have a set of items in ascending alphabetical types, reverse ordered by date.

We then call the familiar block to begin processing.

There is now some logic required here to say, if repeat type do not display, if a new type display.

In a scripting language, the obvious solution is to store the type in a variable, and do something if the new type differs from the last stored type.

Restrictions on <xsl:variable> mean we cannot do this.

Loosely, in XSLT position() translates to count [forwards].  XLST has a function that is similar to ‘count backwards’ which is preceding-sibling [OK, it means invert the node set and count forwards, but you get the idea].

Therefore by saying preceding-sibling::*[1]/type XPath expression say “go to the first preceding sibling, then get its type element’s contents” and the expression provides a ready means of testing “is the current value the same as the last one”.

It is worth pointing out that this is a sophisticated function, there are similar ones such as following-sibling, preceding, ancestor, or ancestor-or-self which may be more appropriate to the use required.

It is also important to note the use of ‘*[1]/type’.  The * is a wildcard and this would not work if there were multiple child elements type within the given element.  The [1] is important too as this means go-back-one: or, more accurately, reverse the list and read the next … If the [1] was omited, the expression would say, look backwards anywhere in the list.

Finally, reading backwards would return a null value if the top of the list was reached, so a failsafe is required to make sure we are not at the top of the list.

<xsl:choose>
<xsl:when test="position() = 1">
<!-- display the type-->
<xsl:value-of select="./type"/>
</xsl:when>
<xsl:when test="position() &gt; 1">
<!-- only read backwards now we have read at least one record -->
<xsl:if test="./type != preceding-sibling::*[1]/type">
<!-- only if the type has changed-->
<xsl:value-of select="./type"/>
</xsl:if>
</xsl:when>
</xsl:choose>

XSL:Sort By Date, Limit Returned Results

Monday, March 2nd, 2009

In an accompanying article, a simple method to sort by date was introduced.

Normally it is desirable to limit the number of results shown.

There are various complex ways of doing this posted on other sites, the fundamental problem being that <xsl:variable> works as a constant in practice, i.e set only once.

Trying to implement a counter as per scripting languages becomes difficult – although not impossible – so rather than fight against the restrictions XSLT gives, better to use the inbuilt position() function, which will tell you how far it has progressed along the current record set.

Provided all the select criteria have been applied to the record set FIRST, the position() function will effectively map to counter.

To complete the process, set a global variable (probably based on a Datum) to fix the displayed items

<xsl:variable name="x-rows" select="//Datum[@Name='FixLimit']"/>
 
<xsl:template match="/">
 
<xsl:apply-templates select=”[some repeating datum]“&gt;
<xsl:sort order=”descending” select=”substring(//somedate,7,4)> <!-- year->
<xsl:sort order=”descending” select=”substring(//somedate,4,2)> <!-- month-->
<xsl:sort order=”descending” select=”substring(//somedate,1,2)> <-- day-->
 
</xsl:apply-templates>

Now in the add a ‘count’ test for each time the executes:

<xsl:template match=”[match repeating datum]>
   <xsl:if test="position() &lt;= $x-rows">
   ...
   </xsl:if>
</xsl:template>

to stop processing once the row limit has been reached.

XSL:Sort By Date

Monday, March 2nd, 2009

The following  should do the work

<xsl:apply-templates select="[some repeating datum]">
<xsl:sort order="descending" select="substring(//somedate,7,4)"> <!-- year-->
<xsl:sort order="descending" select="substring(//somedate,4,2)"> <!-- month-->
<xsl:sort order="descending" select="substring(//somedate,1,2)"> <!-- day-->
</xsl:apply-templates>

This assumes the date is in the form dd/mm/yyyy: the seperators could be different as they are ignored anyway based on the substring.

The important thing to realise here is that the <xsl:sort> functions do not do anything APART from sort, so there is nothing to see at this point if debugging

The work is done in a receiving

<xsl:template match="[match repeating datum]">
 
...
 
</xsl:template>

The ensures items are delivered to this block in the correct order, what is displayed is determined in the section

Add Local users on Windows Command Line

Friday, November 28th, 2008

I was recently involved in a project where the requirement was to migrate from one server to another.  Part of the requirement was to create all the local users from the previous server to the new server, and later add them to TeamSite.  Initially I thought this may not take long.  However, this was not the case.  I received the number of users, and this came to 800+ users.  I thought this is going to take ages to do!

However, after doing a bit of research I found the command line tool to add local users

NET USER username password /ADD /FULLNAME:”fullname

e.g.

NET USER vealimy oSEinfam /ADD /FULLNAME:”Linda Myllerup”

From this I added this to my create_user Perl script, which in turn created all the users within hour, rather then weeks!!

Command Line SWF Tools for Windows

Wednesday, September 10th, 2008

An excellent set of command line tools for manipulating and generating Flash content, SwfTools, is available at http://www.swftools.org/ 

Tools include :

  • swfc
  • font2swf
  • swfcombine
  • swfextract
  • pdf2swf
  • gif2swf
  • jpeg2swf
  • png2swf
  • avi2swf
  • wav2swf
  • swfdump (will dump out compressed SWF)
  • swfstrings
  • swfbbox