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); |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|