Results 1 to 7 of 7

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

  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.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,927

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

    Very nice, I'm sure I'll make good use of this.

    Would it be possible to have the From/To listed for each item, as well as the subject?

    If so.. I realise there is no way to tell which of the two fields is yourself, would it be possible to have a hidden field somewhere, to hide whichever of the from/to is yourself?

  3. #3

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

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

    From and To are already present

    I'll see what I can do about hiding self.

  4. #4

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

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

    Oh, did you mean when the message is collapsed?

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,927

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

    Time to clarify

    I meant on the same line as the subject - so you don't need to "open" a message to see who it was from/to.

  6. #6

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

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

    Updates requested by si!

    - To/From user now displays on the message heading line. In the Inbox the From field is shown, in Sent Items the To field is shown. In all other folders both are displayed.

    - Also various IE fixes.

    The latest zip is attached to the first post.

    Edit: Fixed AWOL attachment
    Last edited by penagate; Mar 15th, 2006 at 07:14 AM.

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

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

    Finally, I have been downloading my PMs for a long time now and this will make it easier to locate/read archived messages.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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