Q-Xpress Technical Information

Okay so you are a site owner and want to incorporate Q-Xpress links into your website?  This page will give you the information needed to do that.  First off, you must have knowledge of either HTML or XML, and knowledge of PHP, ASP or getting information from a database is handy too. :)

Q-Xpress File Format

Q-Xpress uses a customised XML file to input data into the program.  This file contains information about what the download is called, the filename, the unique id (if any), the actual download path (where to get the file from), and where you are getting it from (the page or thread listing information about the download, for example).

The format can have 1 or many files specified inside, so you can automatically queue up multiple files (a set of items, for example, or everything in a single download as on MTS2) without having to make a seperate zip file.

The format is as follows:

Header:

<?xml version="1.0" encoding="ISO-8859-1"?>
<qxpress>

One or more file chunks:

<file>
<attachmentid>attachment/unique id (optional)</attachmentid>
<filename>filename.zip</filename>
<downloadlink>http://www.yoursite.com/files/filename.zip</downloadlink>
<pagelink>http://www.yoursite.com/objects/someobject.html</pagelink>
<pagetitle>My First Object!</pagetitle>
<author>You :)</author>
</file>

attachmentid: This can be a unique identifier for this download - for example on MTS2 it is the attachmentid of the file.
filename: The download filename itself
downloadlink: The actual place where the download is stored on your server, or where to get it
pagelink: A link to information about the double (used when double clicking on an entry in the queue)
pagetitle: The title of the information page
author: The creator of the file

It is recommended that you use <![CDATA[ ]] $gt; XML tags around the filename, pagetitle and author.

Footer:
</qxpress>

Example Q-Xpress file

An example is as follows. This is for Numenor’s Custom All Placement Open/Closed sign from MTS2:


<?xml version="1.0" encoding="ISO-8859-1"?>
<qxpress>
<file>
<attachmentid>317879</attachmentid>
<filename><![CDATA[CUSTOM_AllPlacement-SignOpenClose.rar]]></filename>
<downloadlink>http://files.modthesims2.com/getfile.php?file=317879</downloadlink>
<pagelink>http://www.modthesims2.com/showthread.php?t=167619</pagelink>
<pagetitle><![CDATA[All-placement "Open/Closed" sign (CUSTOM version)]]></pagetitle>
<author><![CDATA[Numenor]]></author>
</file>
</qxpress>

Getting the information into Q-Xpress

Q-Xpress supports 3 methods for getting the information about your download into the queue. Two of these are custom URL protocols that should automatically add the download, and one of them can open up .qxpress files (in the format above) directly.

Custom URL Protocols

As mentioned above, Q-Xpress 1.1.4 supports 2 custom protocols. One of these is deprecated and should not be used.

mts2:// protocols were originally used on MTS2 and specified all of the information now contained in the XML files within the original URL. The limitations were that the actual download host was always set to MTS2, so this is now deprecated. DO NOT USE

qxpress:// is the new protocol in 1.1.4, and basically specifies a host to download the XML format, as defined above, directly into Q-Xpress. The format is:


qxpress://www.sitename.com/generatorscript

generatorscript can be either a PHP/ASP script that generates XML files automatically, or it can be the actual qxpress file itself. 2 examples would be:


qxpress://files.modthesims2.com/qxpress.php?file=317879

or

qxpress://www.modthesims2.com/NumenorsShopWindow.qxpress

Both of these examples would work and when the URL is clicked on, Q-Xpress would grab the XML data and add the file into the queue.

Custom File Format

The XML format as defined above can be saved on disk as a .qxpress file - for example 317879.qxpress. This can then be double clicked on and the information contained within would be added to the queue.

Integrating Q-Xpress To Your Site

There are a number of ways to incorporate Q-Xpress to your site:
- Save the .qxpress file on your site and link directly using http:// calls
- Save the .qxpress file on your site and link using qxpress:// calls
- Generate the .qxpress file using a PHP or ASP script. This saves disk space but at the expense of database calls and CPU

If you need help in writing a script to either autogenerate Q-Xpress files, or incorporating it into your site, contact Delphy via the forum or via MTS2.

Version 1.1.9

31st December 2006

Download!

Navigation

Archives

Meta