InterOcean Designs
« Import/Export Forum/Skin Settings »

Welcome Guest. Please Login or Register.
May 25, 2013, 8:03pm




InterOcean Designs :: ProBoards Codes :: ProBoard Code Database :: Import/Export Forum/Skin Settings
Page 1 of 2 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Import/Export Forum/Skin Settings (Read 1,419 times)
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Import/Export Forum/Skin Settings
« Thread Started on Mar 24, 2010, 10:22pm »

Import/Export Forum/Skin Settings 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 your 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
Code:
<script type="text/javascript">
/* Import/Export Forum/Skin Settings by SubDevo */
/* v1.01 Main Footer - Leave this header intact. Do not repost. */
/* [url]http://interoceandesigns.com[/url] or [url]http://lsdp.proboards.com[/url] */

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;
&nbsp; &nbsp;while(n[++x]){b=n[x];
&nbsp; &nbsp;&nbsp; &nbsp;if(a&&b.type.match(/submit/i)&&b.value=="Save Changes"){nC++;
&nbsp; &nbsp;&nbsp; &nbsp;b.parentNode.innerHTML+='<br/>'+js+'shd('+nC+');">Show Data</a><br/><textarea '+
&nbsp; &nbsp;&nbsp; &nbsp;'style="display:none" readonly="readonly" id="mskin'+nC+'"'+jp+iM.slice(0,-1)+'</textarea>'; iM="";
&nbsp; &nbsp;&nbsp; &nbsp;}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=[];
&nbsp; &nbsp;while(nC[++x]){nD.push(nC[x].split("="));} x=-1;
&nbsp; &nbsp;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="';
&nbsp; &nbsp;var nFo=(nP)?document.getElementsByName("skin")[0].parentNode:document.prefs,n;
&nbsp; &nbsp;var jp=' onfocus="this.select();" rows=5; cols=100;>',iM="",iH=""; gda(dgt("input",nFo),1);
&nbsp; &nbsp;if(!nP){gda(dgt("select",nFo),0);} var nL=(nP)?document.links:dgt("b");
&nbsp; &nbsp;var nDi=document.createElement("div"),nM=""; x=-1;
&nbsp; &nbsp;while(nL[++x]){n=nL[x];
&nbsp; &nbsp;&nbsp; &nbsp;if(nP){if(n.href.match(/imagesclear/i)){nM=n.parentNode;break;}
&nbsp; &nbsp;&nbsp; &nbsp;}else if(n.innerHTML=="Forum Colors"){nM=nL[x];break;}
&nbsp; &nbsp;}
&nbsp; &nbsp;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/>';
&nbsp; &nbsp;(nP)?nM.appendChild(nDi):nM.parentNode.insertBefore(nDi,nM.previousSibling);
}
</script>


CODE EDIT: (4/30/2012)
Small edit to make the "Show Data" text areas read only. Minimizes end user errors.
« Last Edit: Apr 30, 2012, 2:34pm by SubDevo »Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
Marx Cartoonee
Junior Member
Mango!
member is offline

[avatar]

Care for some ^M^A^N^G^O^ juice?

[icq] [yim] [msn] [aim]
[homepage]

Joined: Feb 2010
Gender: Male
Posts: 172
Location: Serbia
Karma: 4
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #1 on Mar 25, 2010, 2:02am »

I know at least 51 person who would erect a statue in your honor for this code. Myself included.
Link to Post - Back to Top  IP: Logged

[ME] murdered my father and violated my mother!
[image]
aRMY83
Elite Member
IOD Supporter
member is offline

[avatar]

It's me!


[homepage]

Joined: Mar 2010
Gender: Male
Posts: 1,079
Location: Just a Stone's Throw Away!
Karma: 40
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #2 on Mar 25, 2010, 3:17pm »

I second that!

Great work SubDevo!
Link to Post - Back to Top  IP: Logged

[image]

[image]
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #3 on May 5, 2010, 3:17pm »

I just found out that since PB put in an extra form and the "Update my icons to the new set!" button on the "Customize Images" page, it has broken my code. >:(
I will have to rewrite it to take this into account.

SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #4 on May 5, 2010, 4:49pm »

Woohoo!
The code is working again without updating my code!
I asked PB to make a code change and they did! ;D

http://support.proboards.com/index.cgi?a....d=353653&page=1

Happy day!
SubDevo
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
ManGoneMad
Full Member
member is offline

[avatar]

[yim] [aim]
[homepage]

Joined: May 2009
Gender: Male
Posts: 229
Location: west coast of Michigan
Karma: 20
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #5 on May 5, 2010, 6:15pm »

Whew! That was a close one.
God Bless the PB staff & coders! :)
« Last Edit: May 5, 2010, 6:30pm by SubDevo »Link to Post - Back to Top  IP: Logged


[image]
[image]
RADesign
Administrator
member is offline

[avatar]


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 1,602
Location: IOD
Karma: 136
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #6 on May 7, 2010, 11:56am »

Congrats Sub ... I'd say them making that change for you is a show of respect. ;)
Link to Post - Back to Top  IP: Logged

[image]
GFX Support
GFX Designer
member is offline

[avatar]

Off duty



Joined: Apr 2009
Gender: Male
Posts: 1,962
Karma: 75
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #7 on May 7, 2010, 12:06pm »

I bet it had nothing to do with the $ 1000 he transferred to Patrick's account. ;D

Just kidding, Sub.
I know PBS does indeed have a lot of respect for you, just like we all do.
Link to Post - Back to Top  IP: Logged

I'm off duty! For questions or support please contact RADesign or Speed Demon.
Paige
Senior Member
IOD's Music/Drama Queen
member is offline

[avatar]

On Hiatus, to RPG world

[yim] [msn]

Joined: Apr 2009
Gender: Female
Posts: 547
Location: Malaysia
Karma: 6
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #8 on May 7, 2010, 1:39pm »

OK...
I have a LOT of respect for everyone who helped me in IOD,,,and that include you,Ikatsui-chan...( :P just kidding...)
I am learning a lot here...

Good job Sub..It scared me for a while there,thinking something wrong with an amazing codes like this..Wahahaha...

And guys,I will have more questions to come~!!
Merong...
Link to Post - Back to Top  IP: Logged


[image]
ladyauburn33
Guest
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #9 on Mar 21, 2012, 2:33pm »

I used this code this morning and I must say this is the most fantastic code that could ever have been thought up! Sub Devo is a mastermind genius!

I just want to be clear on one point, though: If you want to add a forum skin to your board, and you don't want to substitute it for an existing skin, do you have to create a dummy skin that you can import the forum skin codes to? When I looked at the "Create a Skin" page it did not have the "Import/Export" link on it, so I created a dummy skin, then I could go to the "Modify Skin" page where the "Import/Export" link was. Is this correct?



Thanking you in advance,
ladyauburn33
Link to Post - Back to Top  IP: Logged
Pebble
Code Helper
IOD Supporter
member is offline

[avatar]


[homepage]

Joined: Mar 2011
Gender: Male
Posts: 1,190
Location: Here & There
Karma: 155
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #10 on Mar 21, 2012, 5:53pm »

Yep, that's correct ladyauburn33, you have to create the skin and then import the settings.
Link to Post - Back to Top  IP: Logged

[image]

ladyauburn33
Guest
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #11 on Mar 21, 2012, 6:31pm »

Thank you for your quick response, Pebble! :)
Link to Post - Back to Top  IP: Logged
LunyRed
Senior Member
member is offline

[avatar]


[homepage]

Joined: Sept 2009
Gender: Male
Posts: 542
Location: An archipelago in SE Asia
Karma: 14
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #12 on Mar 23, 2012, 4:37am »

Why haven't I found this before?! :o

I should try this on my own forum! Will really help a lot since I'm using multiple forum skins there. Yay! =D
Link to Post - Back to Top  IP: Logged

[image]
[ME] and I are best buddies~ Unlike me, [ME] is obsessed with Justin Bieber.. o_o'
SubDevo
Co-Admin
Code Support
member is offline

[avatar]

Creator of LSD...


[homepage]

Joined: Mar 2009
Gender: Male
Posts: 2,594
Location: MI, USA
Karma: 102
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #13 on Mar 29, 2012, 6:05pm »


Mar 23, 2012, 4:37am, LunyRed wrote:
Why haven't I found this before?! :o

LOL I don't know! But, this is one of those codes that I can't live without. ;)
Link to Post - Back to Top  IP: Logged

[image] [image]
[image]
Why are you looking at my signature, [ME]?
ladyauburn33
Guest
 Re: Import/Export Forum/Skin Settings v1.0
« Reply #14 on Mar 29, 2012, 7:08pm »

This is an utterly fantastic code. I've used it a lot to save the codes to a Notebook.


BUT


When importing a skin to a forum on which you do not want to replace any of the skins with the one being imported, you have to create a skin so that you can use it to be replaced. Any chance the code could be fixed so that it is also linked to the "Create a Skin" page?
Link to Post - Back to Top  IP: Logged
Page 1 of 2 » Jump to page   Go    [Search This Thread] [Share Topic] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile