I've written a handy function Javascript for vBulletin which allows you to switch styles by clicking on a link or image.
Code:
function switch_style(F)
{
E = "style";
if(F == "")
{
return;
}
var B=new String(window.location);
var A=new String("");
B=B.split("#");
if(B[1])
{
A="#"+B[1]
}
B=B[0];
if(B.indexOf(E+"id=")!=-1&&is_regexp)
{
var D=new RegExp(E+"id=\\d+&?");
B=B.replace(D,"")
}
if(B.indexOf("?")==-1)
{
B+="?"
}
else
{
lastchar=B.substr(B.length-1);
if(lastchar!="&"&&lastchar!="?")
{
B+="&"
}
}
window.location=B+E+"id="+F+A
}
The function takes the styleid as its parameter. It either needs to be added to vbulletin_global.js to work, or you can choose to include it in your footer using
Adam
PentaxForums.com Webmaster (
Site Usage Guide |
Site Help |
My Photography)
PentaxForums.com server and development costs are user-supported. You can help cover these costs by
donating or purchasing one of our
Pentax eBooks. Or, buy your photo gear from our affiliates,
Adorama,
B&H Photo,
KEH, or
Topaz Labs, and get
FREE Marketplace access - click here to see how! Trusted Pentax retailers: