The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Script to unpack template.xml files
I wrote a small script that extracts all templates from a template.xml.
This script can be quite useful for everyone who prefers to upgrade hacks manually and who needs to compare template changes. Why extract into .html files first? Comparing two xml files is not so useful, because the order in which templates are stored into the .xml file could have changed. Output looks like this: Quote:
Code:
!/usr/bin/perl -w unless( @ARGV == 1 ) { die <<EOF; VBULLETIN V3.0 TEMPLATE EXTRACTOR 0.1 haxored by AlexanderT ------------------------------------- This script parses vBulletin V3.0 template.xml files and extracts individual templates (as .html). USAGE: extract.pl filename EOF } ($file) = @ARGV; open(INPUT, "<", glob($file)) or die "Couldn't open '$file' for reading.\nError: $!\n\n"; print "\n VBULLETIN V3.0 TEMPLATE EXTRACTOR 0.1\n"; print " haxored by AlexanderT\n"; print " -------------------------------------\n\n"; print "Working on '$file'.\n\n"; local $/ = undef; while (<INPUT>) { while (m#<template name="([^"]*)[^>]*><!\[CDATA\[(.*?)]]></template>#gis) { print("Extracting $1.html...\n"); open(OUTFILE, ">", "$1.html"); print OUTFILE $2; close(OUTFILE); } } print "\ndone.\n\n"; close(INPUT); |
#2
|
||||
|
||||
Isn't this perl? This code looks very odd
|
#3
|
||||
|
||||
Heh yes, that is perl. You have to run it from console. Btw, I fixed the script, it now fully unpacks vbulletin-style.xml (and others) as well :P
|
#4
|
|||
|
|||
How do u run this? Where do I upload it to?
|
#5
|
||||
|
||||
This is a perl script which you run from console. I run FreeBSD here, and have Perl installed by default. If you have Windows, you must install something like Activeperl (free) or some WAMP system.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|