Post by Anselm on Sept 3, 2006 23:27:29 GMT -8
Make sure you read the entire thread first.
This code makes it easier for you to remotely host codes. Due to the way this is coded, it is impossible to just have one code. You need to place it in the Global and Main, Header and Footer.
You need to have the knowledge to remotely host codes. To do this, you simply remove the <script> and </script> around the codes, along with any instances of <!-- and // -->, and copy and paste it all into Notepad. Then, save it as filename.js, and upload to your host. For CSS files, remove the <style> and </style> tags, then paste it into Notepad, and save as filename.css. Make sure the filename.css or .js is a sensible filename for it.
This code can also change the codes for certain skins. Follow the instructions at the bottom for that.
At the top of the code, there's a line that says:
var iCssOn = "yes"; // Is CSS on?
If you are not using remotely hosted CSS, or you are not putting this code in the global header this time round,
<script type="text/javascript">
<!--
/* Board External Script Link
By PBSerpent - cieltoprod.proboards74.com */
var iCssOn = "yes"; // Is CSS on?
// DO NOT edit any of the main code
// Start main code
function iHeadFoot(codefilename,skinidno){
if(pb_skinid==skinidno){
document.write("<scr"+"ipt src='" + iSourceHost + codefilename + "'>");
document.write("/\/ Forum Coding");
document.write("</sc"+"ript>");
}
}
if(iCssOn=="yes"){
function iCssSheet(cssLocation,skinidcss){
if(pb_skinid==skinidcss){
document.write("<link rel='stylesheet' href='" + iCssHost + cssLocation + "' />");
}
}
}
// End main code
// Edit below here //
var iSourceHost = "www.your-host.com/codes/"; // Script host/source
var iCssHost = "www.your-host.com/css/"; // CSS host source
// Edit Skin JS File //
iHeadFoot("CodeFileName.js",1); // JS Code File Name for skin 1
iHeadFoot("CodeFileName.js",2); // JS Code File Name for skin 2
iHeadFoot("CodeFileName.js",3); // JS Code File Name for skin 3
// Edit Skin CSS File //
iCssSheet("CssFileName.css",1); // CSS File Name for skin 1
iCssSheet("CssFileName.css",2); // CSS File Name for skin 2
iCssSheet("CssFileName.css",3); // CSS File Name for skin 3
// -->
</script>
Other Editing
Find this line:
var iSourceHost = "www.your-host.com/codes/"; // Script host/source
This is the source of the codes. IE, if your code URL was www.your-host.com/codes/globalheader.js, the source would be www.your-host.com/codes/. Make sure you include http://, this is very important.
Find this line next.
var iCssHost = "www.your-host.com/css/"; // CSS host source
Edit the orange, to the CSS source. I explained it above for JS, it's not much of a change.
The next part is the hard part. You need to edit the filenames and skin id.
iHeadFoot("CodeFileName.js",1); // JS Code File Name for skin 1
iHeadFoot("CodeFileName.js",2); // JS Code File Name for skin 2
iHeadFoot("CodeFileName.js",3); // JS Code File Name for skin 3
Edit the filename first in blue. This will be the last part of the url. IE if the file URL is www.your-host.com/codes/globalheader.js, the filename will be globalheader.js. Make sure you include the .js extension. Next, edit the pink. This will be the skin ID. You find that for each skin by looking in the source for the "var pb_skinid = skin id" line in the header. If you only have one skin, the skin id will be 1. If you don't need any lines because you don't have that many skins, delete the line.
To edit the CSS, find this part.
// Edit Skin CSS File //
iCssSheet("CssFileName.css",1); // CSS File Name for skin 1
iCssSheet("CssFileName.css",2); // CSS File Name for skin 2
iCssSheet("CssFileName.css",3); // CSS File Name for skin 3
This is nearly the same as the script. If you aren't using remotely CSS in this part for any reason, remove it. You don't need it. If you are, it's the same as the last part, except this is for CSS files.
If you have any questions or need support, post in code support. Don't PM me.
This code makes it easier for you to remotely host codes. Due to the way this is coded, it is impossible to just have one code. You need to place it in the Global and Main, Header and Footer.
You need to have the knowledge to remotely host codes. To do this, you simply remove the <script> and </script> around the codes, along with any instances of <!-- and // -->, and copy and paste it all into Notepad. Then, save it as filename.js, and upload to your host. For CSS files, remove the <style> and </style> tags, then paste it into Notepad, and save as filename.css. Make sure the filename.css or .js is a sensible filename for it.
This code can also change the codes for certain skins. Follow the instructions at the bottom for that.
At the top of the code, there's a line that says:
var iCssOn = "yes"; // Is CSS on?
If you are not using remotely hosted CSS, or you are not putting this code in the global header this time round,
<script type="text/javascript">
<!--
/* Board External Script Link
By PBSerpent - cieltoprod.proboards74.com */
var iCssOn = "yes"; // Is CSS on?
// DO NOT edit any of the main code
// Start main code
function iHeadFoot(codefilename,skinidno){
if(pb_skinid==skinidno){
document.write("<scr"+"ipt src='" + iSourceHost + codefilename + "'>");
document.write("/\/ Forum Coding");
document.write("</sc"+"ript>");
}
}
if(iCssOn=="yes"){
function iCssSheet(cssLocation,skinidcss){
if(pb_skinid==skinidcss){
document.write("<link rel='stylesheet' href='" + iCssHost + cssLocation + "' />");
}
}
}
// End main code
// Edit below here //
var iSourceHost = "www.your-host.com/codes/"; // Script host/source
var iCssHost = "www.your-host.com/css/"; // CSS host source
// Edit Skin JS File //
iHeadFoot("CodeFileName.js",1); // JS Code File Name for skin 1
iHeadFoot("CodeFileName.js",2); // JS Code File Name for skin 2
iHeadFoot("CodeFileName.js",3); // JS Code File Name for skin 3
// Edit Skin CSS File //
iCssSheet("CssFileName.css",1); // CSS File Name for skin 1
iCssSheet("CssFileName.css",2); // CSS File Name for skin 2
iCssSheet("CssFileName.css",3); // CSS File Name for skin 3
// -->
</script>
Other Editing
Find this line:
var iSourceHost = "www.your-host.com/codes/"; // Script host/source
This is the source of the codes. IE, if your code URL was www.your-host.com/codes/globalheader.js, the source would be www.your-host.com/codes/. Make sure you include http://, this is very important.
Find this line next.
var iCssHost = "www.your-host.com/css/"; // CSS host source
Edit the orange, to the CSS source. I explained it above for JS, it's not much of a change.
The next part is the hard part. You need to edit the filenames and skin id.
iHeadFoot("CodeFileName.js",1); // JS Code File Name for skin 1
iHeadFoot("CodeFileName.js",2); // JS Code File Name for skin 2
iHeadFoot("CodeFileName.js",3); // JS Code File Name for skin 3
Edit the filename first in blue. This will be the last part of the url. IE if the file URL is www.your-host.com/codes/globalheader.js, the filename will be globalheader.js. Make sure you include the .js extension. Next, edit the pink. This will be the skin ID. You find that for each skin by looking in the source for the "var pb_skinid = skin id" line in the header. If you only have one skin, the skin id will be 1. If you don't need any lines because you don't have that many skins, delete the line.
To edit the CSS, find this part.
// Edit Skin CSS File //
iCssSheet("CssFileName.css",1); // CSS File Name for skin 1
iCssSheet("CssFileName.css",2); // CSS File Name for skin 2
iCssSheet("CssFileName.css",3); // CSS File Name for skin 3
This is nearly the same as the script. If you aren't using remotely CSS in this part for any reason, remove it. You don't need it. If you are, it's the same as the last part, except this is for CSS files.
If you have any questions or need support, post in code support. Don't PM me.