External Link (symlink) Sync

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

External Link (symlink) Sync

Author: Steven Pease

1. Introduction

This guide will quickly walk you through installing and configuring a PHP script that allows you to take a published index block of symlinks from Cascade Server and import them into a provided folder in a running instance of Cascade Server. It assumes that you have a recent version of PHP (5 or greater) installed on your web server and that you are comfortable with Cascade. Knowledge of PHP is also useful, but not necessary to use this guide.

2. Components

There are several components to the script including the script itself, a configuration page, a data definition to render the configuration page, and an example XML feed. The script will read its configuration from a configuration file that you will publish (with the use of a data definition), read through the published index block of symlinks, and then upload each symlink to the CMS (provided the login information from the configuration file).

3. The Configuration Page

Create a page called "symlink-sync-config.xml", and give it a .php publish extension. Then give it the "symlink-sync-config-data-definition.xml" data definition. Supply a valid server URL, username, password, valid system-folder path to import the symlinks into, and the path to the example XML feed relative to the PHP script. Publish this page and "symlink-sync.php" in the same folder, and your script will be ready for use.

4. Usage

To use the script, upload the script to your CMS, and publish it.  Fill in all fields in the configuration page, and then publish it as well.  Once both of these are published, run the script from your server.  All symlinks listed in the example XML feed will be added.

Example Files 

  1. symlink-sync-PHP.zip
    This is the zip file with all the necessary scripts and XML.
  2. symlink-sync-php.txt
    This is the main PHP script to synchronize the external links.
  3. symlink-sync-xml-php.txt
    This is an example XML file whereby external links are created from the XML data.
  4. symlink-sync-config-xml-php.txt
    This is an example XML config file.
  5. symlink-sync-config-data-definition.xml
    This is an example data definition to visually configure the XML config file.
Last modified on Tue, 11 Sep 2007 14:52:49 -0400

Top / Up / Table of Contents