Post by SubDevo on Mar 24, 2010 19:42:49 GMT -8
Import/Export Forum Skin Settings v1.0 by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
This code will allow you to export/backup all of your forum colors/settings from the "Modify Skin" page and the "Customize Images" page. You can save these settings to a text file as a backup of your skin and use them later. You can also import your saved settings directly into a new forum or into another skin. Another feature is "partial" importing. Let's say you just want to transfer all your smilie URL's to another forum. No problem there.
Just paste the data from another forum or file and the rest of the settings are left untouched!
Of course, the forum you are transferring data to, must have this code already in place...
I believe these pics will better explain...
Example One
Example Two
Example Three
No editing is required!
Enjoy!!!
SubDevo
Location: Main Footer
<script type="text/javascript">
/* Import/Export Forum/Skin Settings v1.0 by SubDevo */
/* Main Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
if(/^(boardimages|skinsmodify2)$/.test(pb_action)){
function dgt(n,b){return ((b)?b:document).getElementsByTagName(n);}
function gda(n,a){ var nC=0,b,d,x=-1;
while(n[++x]){b=n[x];
if(a&&b.type.match(/submit/i)&&b.value=="Save Changes"){nC++;
b.parentNode.innerHTML+='<br/>'+js+'shd('+nC+');">Show Data</a><br/><textarea style="display:none" id="mskin'+nC+'"'+jp+iM.slice(0,-1)+'</textarea>'; iM="";
}else if((a)?(!b.type.match(/hidden|submit/i)):b.name){ d=b.name+"="+b.value+"&"; iM+=d; iH+=d;}
}}
function shd(a){with(document.getElementById("mskin"+a).style){display=(display=="none")?"":"none";}}
function fs_data(){ var nC=document.getElementById("mydata").value.split("&"),x=-1,nD=[];
while(nC[++x]){nD.push(nC[x].split("="));} x=-1;
while(nD[++x]){if(nD[x][1]){document.getElementsByName(nD[x][0])[0].value=nD[x][1];}}
} var nP=(RegExp.$1.match(/ges/i))?1:0,js='<br/><a href="javascript:void(0);" onclick="';
var nFo=(nP)?document.getElementsByName("skin")[0].parentNode:document.prefs,n;
var jp=' onfocus="this.select();" rows=5; cols=100;>',iM="",iH=""; gda(dgt("input",nFo),1);
if(!nP){gda(dgt("select",nFo),0);} var nL=(nP)?document.links:dgt("b");
var nDi=document.createElement("div"),nM=""; x=-1;
while(nL[++x]){n=nL[x];
if(nP){if(n.href.match(/imagesclear/i)){nM=n.parentNode;break;}
}else if(n.innerHTML=="Forum Colors"){nM=nL[x];break;}
}
nDi.innerHTML=js+'shd(0);">Import/Export Data</a><br/><div style="display:none" id="mskin0"><textarea id="mydata"'+jp+iH.slice(0,-1)+'</textarea>'+js+'fs_data();">Click Here</a> to fill this page with the above data.<br/></div><br/>';
(nP)?nM.appendChild(nDi):nM.parentNode.insertBefore(nDi,nM.previousSibling);
}
</script>
Tested in IE, FF, Opera, Safari and Chrome.
This code will allow you to export/backup all of your forum colors/settings from the "Modify Skin" page and the "Customize Images" page. You can save these settings to a text file as a backup of your skin and use them later. You can also import your saved settings directly into a new forum or into another skin. Another feature is "partial" importing. Let's say you just want to transfer all your smilie URL's to another forum. No problem there.
Just paste the data from another forum or file and the rest of the settings are left untouched!
Of course, the forum you are transferring data to, must have this code already in place...
I believe these pics will better explain...
Example One
Example Two
Example Three
No editing is required!
Enjoy!!!
SubDevo
Location: Main Footer
<script type="text/javascript">
/* Import/Export Forum/Skin Settings v1.0 by SubDevo */
/* Main Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
if(/^(boardimages|skinsmodify2)$/.test(pb_action)){
function dgt(n,b){return ((b)?b:document).getElementsByTagName(n);}
function gda(n,a){ var nC=0,b,d,x=-1;
while(n[++x]){b=n[x];
if(a&&b.type.match(/submit/i)&&b.value=="Save Changes"){nC++;
b.parentNode.innerHTML+='<br/>'+js+'shd('+nC+');">Show Data</a><br/><textarea style="display:none" id="mskin'+nC+'"'+jp+iM.slice(0,-1)+'</textarea>'; iM="";
}else if((a)?(!b.type.match(/hidden|submit/i)):b.name){ d=b.name+"="+b.value+"&"; iM+=d; iH+=d;}
}}
function shd(a){with(document.getElementById("mskin"+a).style){display=(display=="none")?"":"none";}}
function fs_data(){ var nC=document.getElementById("mydata").value.split("&"),x=-1,nD=[];
while(nC[++x]){nD.push(nC[x].split("="));} x=-1;
while(nD[++x]){if(nD[x][1]){document.getElementsByName(nD[x][0])[0].value=nD[x][1];}}
} var nP=(RegExp.$1.match(/ges/i))?1:0,js='<br/><a href="javascript:void(0);" onclick="';
var nFo=(nP)?document.getElementsByName("skin")[0].parentNode:document.prefs,n;
var jp=' onfocus="this.select();" rows=5; cols=100;>',iM="",iH=""; gda(dgt("input",nFo),1);
if(!nP){gda(dgt("select",nFo),0);} var nL=(nP)?document.links:dgt("b");
var nDi=document.createElement("div"),nM=""; x=-1;
while(nL[++x]){n=nL[x];
if(nP){if(n.href.match(/imagesclear/i)){nM=n.parentNode;break;}
}else if(n.innerHTML=="Forum Colors"){nM=nL[x];break;}
}
nDi.innerHTML=js+'shd(0);">Import/Export Data</a><br/><div style="display:none" id="mskin0"><textarea id="mydata"'+jp+iH.slice(0,-1)+'</textarea>'+js+'fs_data();">Click Here</a> to fill this page with the above data.<br/></div><br/>';
(nP)?nM.appendChild(nDi):nM.parentNode.insertBefore(nDi,nM.previousSibling);
}
</script>