In order to do this you need to do the following to your master page.
- Download the Milkbox Code. Depending on how you plan to implement this solution you can store the files in a number of places, either in a doc library or on the file system in the 12 hive. In this example I created an STSDEV solution and added the downloaded files into the solution so they would deploy to the TEMPLATE/LAYOUTS directory in the 12 hive. If you choose to save it to another location, be sure to update your references from the '_layouts/...' references I gave to the .js and .css files.
- Ensure the following DOCTYPE declaration is at the top of your masterpage:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
- Ensure the following assembly registration is in the top of your master page:
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=220.127.116.11, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
- In the <head> section of your master page add the following (Also, pay attention that the version numbers match up with the most current version you've downloaded):
<PublishingWebControls:EditModePanel PageDisplayMode="Display" runat=server id="MilkboxPanel">
- In your page content area, ensure that your links include the milkbox 'rel' attribute:
<a href="img/01b.jpg" rel="milkbox" title="Caption goes here...">image #1</a>
After this setup, you should be able to use Milkbox as it is documented on the page