Results 1 to 7 of 7

Thread: [XML+XSLT+CSS] XSL Stylesheet for vBulletin Private Message Archive

Threaded View

  1. #1

    Thread Starter
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Arrow [XML+XSLT+CSS] XSL Stylesheet for vBulletin Private Message Archive

    I have created an XSLT stylesheet for applying to vBulletin Private Message archive files in XML format. This stylesheet will present the XML archive as readable XHTML/HTML with expandable and contractable folders/messages.

    Demonstration screenshot:


    Browser compatibility:
    The XSLT file is available in two versions. One is a XHTML 1.1 version for standards compliant browsers, the other is an Internet Explorer-specific version.

    I have tested the appropriate versions in Firefox and IE. Opera does not (yet, version 9 should) support XSLT. Safari does, but I am unable to test in it (if anyone has Safari could you please tell me?) Other Gecko based browsers (Flock, Camino, etc.) should work as Firefox does.

    The expansion/contraction feature requires Javascript. By default all nodes are shown expanded, so the page remains compatible if Javascript is disabled. In the non-IE stylesheet, with Javascript enabled the appearance defaults to all contracted. For some reason, Expand/Contract All is extremely slow in IE, so appearance defaults to all expanded to reduce the load time.

    Features:
    Standards compliant version features embedded expand/contract images (through data URIs) and a fixed position quick links bar at the top right hand corner of the screen.

    Fixed positioning is possible in IE through some trickery but I did not feel it was worth it so that is omitted from the IE version. Data URI images in that version are replaced with text (does not look quite as good but no functional difference).

    To use:
    1. Download and extract the attached ZIP file;
    2. Save the appropriate version XSL file to the same directory where your XML Private Message archives are stored (for non-IE users: vb-private-messages-std.xsl, for IE users: vb-private-messages-ie.xsl);
    3. Open each XML file, underneath the XML prolog (this line:
      <?xml version="1.0" encoding="ISO-8859-1"?>
      ) insert one of these two lines to link it to the stylesheet:
      • For non-IE users:
        <?xml-stylesheet type="text/xsl" href="vb-private-messages-std.xsl"?>
      • For IE users:
        <?xml-stylesheet type="text/xsl" href="vb-private-messages-ie.xsl"?>
    4. Open the XML file in your browser. You should see a formatted usable version of the Private Message archive file.


    I hope this assists forum users who download their PM archives in XML format and have been finding them difficult to make use of.


    Note: There is one drawback and that is that vB codes are not parsed but rather simply shown as they appear in the message text. There is no way to convert vB codes into (X)HTML using an XSL transformation alone.

    - P
    Attached Files Attached Files
    Last edited by penagate; Mar 15th, 2006 at 07:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width