SLAPfiles Developer resources

So, you are interested in the tech that drives SLAPfiles, eh?
In fact you can do a ton of neat stuff with SLAPfiles, for some example check out our existing SLAPfile tools:

Click here to see all the neat SLAPfile tools

All tools have a link to its PHP source code on the SLAPfile tool page.

If you need help creating a SLAPfile tool, then check out our support forums

SLAPfiles file format

SLAPfiles use a simple XML format to hold the contents of your download list. If you are interested in writing code that generates SLAPfiles, you can use this page as a reference for the file format.

A basic SLAPfile starts like this:

<pimpfish_shared_downloads version='4.0'>
  <comment>
    <![CDATA[Message for the user goes here...]]>
  </comment>
</pimpfish_shared_downloads>



The <comment> tag is optional. If you add a <comment> tag, the text inside the tag is shown to the user when he loads the SLAPfile in PimpFish.

PimpFish includes a shell extension that shows a tooltip when the user points the mouse cursor at a SLAPfile. You can customize the text that appears in the tooltip by adding a couple more tags: <info> and <usercomment>. For example:

<pimpfish_shared_downloads version='4.0'>
  <info>
    <attr name='grab_date' value='03/21/2006' />
    <attr name='grab_site' value='example.com' />
    <attr name='grab_page' value='buffypics.html' />
  </info>
  <comment>
    <![CDATA[Message for the user goes here...]]>
  </comment>
  <usercomment>SLAPfile generated by example.com/sharepics</usercomment>
</pimpfish_shared_downloads>


The <info> tag contains one or more <attr> tags. The allowable attributes are:
"grab_date" - The date on which the grab was done, always in MM/DD/YYYY format.
"grab_site" - The host name where the grabbed page is located.
"grab_page" - The filename of the page where the grab was done.

If the <usercomment> tag is present, the text within the tag is shown in the tooltip after the <info> attributes. If there is no <usercomment> tag, then the text in the <comment> tag is shown in the tooltip. <usercomment> is meant for scripts that insert a logo or long message into the <comment> tag, but don't want that same logo or message to appear in the tooltip.

The saved downloads are kept in one or more <grab> tags. Each <grab> represents a use of one of PimpFish's grab commands: grab pictures, grab any URL, and so on. Each <grab> tag has one required and one optional attribute:
"type" - The type of item being grabbed. Allowable values are "picture", "movie", and "file".
"source_url" - The web page that the files were grabbed from. If present, the user will be able to open that web page from the PimpFish downloader. This attribute is not used if the type is "file". When the type is "file", PimpFish infers the original web page from the URL of the file that was grabbed.

Under the <grab> tag is a <contents> tag. Under <contents> is one <file> tag for each URL that was grabbed. For example:

<grab type="picture" source_url="http://www.pimpfish.com/walkthrough/toolbarguide1.html">
  <contents>
    <file url="http://www.pimpfish.com/walkthrough/pix/b1furry007_thumb.jpg" />
    <file url="http://www.pimpfish.com/walkthrough/pix/b1furry008_thumb.jpg"/>
  </contents>
</grab>


Each <file> tag has one required and one optional attribute:
"url" - The full URL to the file to grab.
"probeurl" - If this attribute is present and the value is "1", PimpFish will check the URL to see if it points to a picture or movie (according to the grab type); this feature is used when downloading bulletin board attachments.