Post by SubDevo on Jun 25, 2009 20:26:48 GMT -8
ProBoard Forum Customize v1.0 by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
NOTE: Threads with Polls will not be split IF the member is using a browser other than IE AND they haven't voted yet. After the non-IE user votes, the thread will split normally. This does not affect members using IE. This is to ensure that all members can vote in polls with all major browsers. Thank you, and I apologize for this inconvenience.
This is a nice one...
Preview: This code is in use at both forums in my signature.
Features:
Preparation for Code Use: Remove or disable all of the following...
For best results, place near the top of your Global Footers. You may have to put some of your other codes above or below this one if you have problems. But there should be a "sweet spot" somewhere. Most users shouldn't run into too many code compatiblility issues. This is only an issue if your forum has A LOT of code. I have worked hard to make it play nice. But, of course, I can not control other people's quality of codes! lol
Variable Explanations:
(Edit the Maroon portions.)
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"4646A4"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
You have two options in each of the above variables.
In the first option, Use 1=Yes, 0=No. This enables/disables these options.
The second, you specify your forum width in pixels and the color for the Outer Table borders.
var pdivH=25; // Post divider height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
Enter the "gap" height in pixels for the above splitter areas.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
Do I need to explain these? lol
Enter the FULL URL to the respective image locations for all the above.
If you do not have sticky/normal images yet, don't worry. The code will use your Head image instead!
NOTE:
In order for the sticky splitter to work, your "sticky" and "stickylock" icons, MUST have the word "sticky" somewhere in their name. You will not get any errors, but it will not split sticky threads if you do not do this.
var catClass="titlebg"; // Class of Category Name Cell.
Enter the CSS Class you would like your category name cell to be.
(titlebg, catbg or your own. Default is titlebg)
This means you can have a background image or color or just about anything!
var aClass="titlebg"; // Annnouncement Divider Background class.
Enter a class for your Announcement divider background. (catbg,titlebg etc.)
var aHeight=10; // Announcement Divider Height.
The Height in pixels you would like the Announcement divider to be. This separates the Announcements from the Sticky threads in the "Sticky" section.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
Enable/disable the Quick Reply Customizations.
These last three variables are only used if qrCustom=1.
var qrMess=""; // Replace "Message:" with this Text.
Replaces "Message:" line with your text here.
Replace with "" to hide the "Message:" line. (default)
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
Specify preferred height and width (Pixels) of the Quick Reply text area.
Multiple Skin Information:
The same code is used for mutiple skins with the exception of the variable section.
Replace this:
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
With this:
if(pb_skinid=="1"){
var head="URL TO SKIN 1 HEAD IMAGE"; // Head image.
var base="URL TO SKIN 1 BASE IMAGE"; // Base image.
var stickyImg="URL TO SKIN 1 STICKY IMAGE";
var normImg="URL TO SKIN 1 NORMAL IMAGE";
}
else if(pb_skinid=="2"){
var head="URL TO SKIN 2 HEAD IMAGE"; // Head image.
var base="URL TO SKIN 2 BASE IMAGE"; // Base image.
var stickyImg="URL TO SKIN 2 STICKY IMAGE";
var normImg="URL TO SKIN 2 NORMAL IMAGE";
}
Follow the same Maroon pattern for more skins. Easy huh?
If you need any of the other variables for different skins (i.e. Outer Table Color), simply remove it from the main list, and copy the line into EACH skin list as above.
Enjoy!!!
SubDevo
Location: Global Footer
<script type="text/javascript">
/* ProBoard Forum Customize v1.0 by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"0060BF"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
var pdivH=25; // Post Divider Height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
var catClass="titlebg"; // Class of Category Name Cell.
var aClass="titlebg"; // Annnouncement Divider Background class.
var aHeight=10; // Announcement Divider Height.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
var qrMess=""; // Replace "Message:" with this Text.
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
// DO NOT EDIT BELOW
var tb=document.getElementsByTagName("table"); var rTb=0;
var pLoc=location.href; var rLoc=document.title; var splitType=0; var ssT="";
var mM=/password\sprotected|error\shas\soccurred|admin\shome|login|preview|move\sthread|search\sresult/i;
if(rLoc.match(mM)||document.ammForm||document.postForm){splitType=0;
}else if(pb_action=="home"){splitType=1; ssT=/<b>Forum\sName/i; pdivH=cdivH;
}else if(pb_action=="boardindex"){splitType=2; ssT=/\[Search\sThis/; pdivH=sdivH;
}else if(pLoc.match(/thread=/i)){splitType=3; ssT=/<b>(Author|Poll)/i;}
stickyImg=cI(stickyImg); normImg=cI(normImg); var po = document.getElementsByName("action");
if(po&& !(navigator.appName.match(/microsoft/i))){po=document.getElementsByTagName("input");
for(var x=0;x<po.length;x++){if(po[x].value==" Submit Vote "){splitType=0; break;}}
}
function cI(h){var m=(h.match(/^http:\/\//i))?h:head; return m;}
if(splitType){
var sDiv=document.createElement("div"); var nDiv=sDiv.cloneNode(false);
sDiv.style.height=pdivH+"px"; nDiv.align="center"; var tbA="";
var stickySplit=0; var tbN=""; var nT=""; var te=(splitType==3)?1:0;
for(var x=0;x<tb.length;x++){
with(tb[x]){if(cellPadding==4&&width=="100%"&&rows[te].innerHTML.match(ssT)){break;}}
}
if(tb[x]){ with(tb[x-2].rows[0]){
if(splitType==2&&innerHTML.match(/Sub-Boards/)){firstChild.className = catClass;}}
tb[x-1].style.backgroundColor="transparent"; tb[x].className="bordercolor";
tbA=tb[x]; var tbP=tbA.parentNode;
var nTop=tb[x].rows[te].cloneNode(true); tr=tbA.rows;
}else{splitType=0;}
if(splitType==1){ x=1;
while(tr[x+1]){
if(tr[x].cells.length==1){ makeTable();
with(nTop.firstChild){className=catClass; innerHTML=tr[x].firstChild.innerHTML;}
aD(nT,nTop,1);
} x++;
while(tr[x]&&tr[x].cells.length==5){nT.appendChild(tr[x]);}
if(tr[x]&&tr[x].innerHTML.match(/markallb/i)){tr[x].firstChild.align="center"; nT.appendChild(tr[x]);}
aD(tbP,tbN,1); if(tr[x+1]){doDiv(tbP);}
} x++; rTb=1;
}else if(splitType==2&& !tbA.innerHTML.match(/no\smessages/i)){
stickySplit=1; var gotSticky=0;
for(x=2;x<tr.length;x++){ makeTable();
if(x==2){
aD(nT,tr[1]);
while(tr[x]&&(tr[x].innerHTML.match(/sticky/i)||(tr[x].cells.length==1))){
var tC=tr[x].cells;
if(tC&&tC.length==1){with(tC[0]){className=aClass; height=aHeight+"px";}}
nT.appendChild(tr[x]); gotSticky++;
} if(gotSticky){aD(tbP,tbN,1); doDiv(tbP);continue;}
}else{x--;
aD(nT,tr[0],1); aD(nT,tr[1],1);
while(tr[x]){nT.appendChild(tr[x]);}
aD(tbP,tbN,1); if(!tr[x]){break;}
}
}
rTb=1; var pDiv=document.createElement("div");
var tbM=tbP.parentNode.parentNode.parentNode;
with(pDiv){align="center"; innerHTML='<img src="'+stickyImg+'" />';}
if(stickyImg.match(/^http:\/\//i)&& gotSticky){tbM.parentNode.insertBefore(pDiv,tbM);}
}else if(splitType==3){ var rC=0; var nx=2;
for(x=1;x<tr.length;x++){ makeTable();
if(x==1){
if(tr[x].innerHTML.match(/poll\sq/i)){x=3; nx=4; aD(nT,tr[1],1); aD(nT,tr[2],1);}else{continue;}
}else{
if(x==nx){aD(nT,tr[0],1);aD(nT,tr[nx-1],1);}
aD(nT,tr[x],1);
while(tr[x+1]&&tr[x+1].innerHTML.match(/\[Search\sThis|Admin\sFunctions:/)){nT.appendChild(tr[x+1]); rC=1;}
} aD(tbP,tbN,1); if(rC){break;}else{doDiv(tbP);}
} rTb=1;
} if(rTb){tbP.removeChild(tbA);}
} var m=/<img/i; var mb="bordercolor";
for(x=0;x<tb.length;x++){
with(tb[x]){
if(resizeForum[0]&&width=="92%"){width=resizeForum[1]+"px";}
if(outerBorder[0]&&width=="100%"&&cellSpacing=="1"&& !parentNode.nodeName.match(/font/i)){style.border= "1px solid #"+outerBorder[1];}
if(style.display!="none"&&className==mb&&width=="100%"&&cellPadding=="0"){
var tDiv=previousSibling; var nSib=nextSibling;
if(!(tDiv&&tDiv.nodeName.match(/div/i)&&tDiv.innerHTML.match(m) )){makeDiv(head,tb[x]);}
if(!(nSib&&nSib.nodeName.match(/div/i)&&nSib.innerHTML.match(m) )){makeDiv(base,nSib);}
}
}
}
if(qrCustom){
var td=document.getElementsByName("message")[0];
if(td&& !(document.searchForm||document.postForm||pLoc.match(/=emailall/i))){
with(td.style){height=qrHeight, width=qrWidth;}
td.parentNode.insertBefore(document.createElement("br"), td.nextSibling);
var qrP=td.parentNode; var qb=qrP.parentNode.parentNode.parentNode.parentNode.parentNode;
qb.rows[1].align="center"; qb.rows[0].cells[0].align="center";
qrP.parentNode.firstChild.data=qrMess; var nFont= document.createElement("font");
nFont.innerHTML='<input name="nextaction" type="hidden" value="post"><input type="submit" accesskey="p" value="Preview" onclick="qrP.nextaction.value=\'preview\'; return true;" /> <input type="reset" value="Reset" accesskey="r" onClick="reset">';
qrP.insertBefore(nFont,qrP.lastChild); qrP.removeChild(qrP.lastChild);
}
}
function makeDiv(dSrc,nTb){ if(!dSrc.match(/^http:\/\//i)){return;}
var nDiv=document.createElement("div");
with(nDiv){align="center"; innerHTML='<img src="'+dSrc+'" />';}
(nTb)? nTb.parentNode.insertBefore(nDiv,nTb): tb[x].parentNode.appendChild(nDiv);
}
function makeTable(){
tbN=tbA.cloneNode(false);
tbN.appendChild(tbA.firstChild.cloneNode(false)); nT=tbN.firstChild;
}
function aD(aN,aS,tf){aN.appendChild(aS.cloneNode(tf));}
function doDiv(sT){
for(var i=0;i<3;i++){
var sD=((i==1)?sDiv:nDiv).cloneNode(false);
var hI=(stickySplit&&normImg)?normImg:head;
if(i!=1){hI=(i)?hI:base; sD.innerHTML='<img src="'+hI+'" />';}
if(hI.match(/^http:\/\//i)||i==1){if(sD.style.height!="0px"){sT.appendChild(sD);}}
}
}
</script>
I'm also offering a hosted version. You decide which version is best for you.
Advantages: Only 4Kb in size. Faster page loading.
Instant update of your code if changes need to be made.
Disadvantages: If my "100webspace" server goes down, the code will not run.
Hosted Version:
<script type="text/javascript">
/* ProBoard Forum Customize v1.0 by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"0060BF"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
var pdivH=25; // Post Divider Height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
var catClass="titlebg"; // Class of Category Name Cell.
var aClass="titlebg"; // Annnouncement Divider Background class.
var aHeight=10; // Announcement Divider Height.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
var qrMess=""; // Replace "Message:" with this Text.
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
// DO NOT EDIT BELOW
document.write('<script type="text/javascript" src="http://lsdp.100webspace.net/PBForumCust_v1.0.js"></scr'+'ipt>');
</script>
EDIT: Code Updated 3/10/2010
This code can now be used for simply splitting everything without head/base images.
If you do not enter a URL for any one (or all) of the head/base/sticky/normal images, the code will NOT put an empty box with the red x or question mark in it!
EDIT: Code Updated 5/18/2010
"Fixed" the code to allow NON-IE users the ability to vote in polls.
Added the Category Name cell class (catClass) to the Sub-Board listing.
var catClass="titlebg"; // Class of Category Name Cell.
Previously, this variable was only being applied to the main page.
Tested in IE, FF, Opera, Safari and Chrome.
NOTE: Threads with Polls will not be split IF the member is using a browser other than IE AND they haven't voted yet. After the non-IE user votes, the thread will split normally. This does not affect members using IE. This is to ensure that all members can vote in polls with all major browsers. Thank you, and I apologize for this inconvenience.
This is a nice one...
Preview: This code is in use at both forums in my signature.
Features:
- Resize your forum to a custom width.*
- Give you Outer Table borders.*
- Category Splitter.
Also removes the "Forum Name" bar and replaces it with the Category Title.
You may also give a class name for the Category Name cell. Example - Centers the "Mark All Boards Read" icon image.
- Sticky/Normal Thread Splitter.
(w/adjustable Announcement divider height and background class) - Post/Poll Splitter.
- Separate divider/spacing heights for all three splitters above.
- Head and Base images absolutely everywhere.
That means everywhere! Threads, categories, posts, searches, PM's, profiles, calendar, login etc... If you do not enter any URL's to an image, the code will simply split and NOT add an empty box for your head/base images! - Quick Reply Customize.*
Adjustable Quick Reply text area size.
Replace "Message:" text with your own or remove completely.
Centers "Quick Reply" title, text area and buttons.
Two extra buttons, Preview and Reset. (also centered).
Quick Reply Customize code has NO loops. Straight DOM. Fast. - Multiple Skin Capable.
Instructions and code for multiple skins, will be explained later. - Unhosted Code!
No worries of server problems, since you will always have the code!
I have made a hosted version available, but will ALWAYS provide the raw code. This code looks large, but it is optimized as best as I can. Only the code that needs to run, will run. Execution speed should not be an issue.
Preparation for Code Use: Remove or disable all of the following...
- Category, Sticky and Post splitter codes.
- Head and Base image codes.
- Forum Resize code.*
- Outer Table border code.*
- Quick Reply customization codes.*
For best results, place near the top of your Global Footers. You may have to put some of your other codes above or below this one if you have problems. But there should be a "sweet spot" somewhere. Most users shouldn't run into too many code compatiblility issues. This is only an issue if your forum has A LOT of code. I have worked hard to make it play nice. But, of course, I can not control other people's quality of codes! lol
Variable Explanations:
(Edit the Maroon portions.)
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"4646A4"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
You have two options in each of the above variables.
In the first option, Use 1=Yes, 0=No. This enables/disables these options.
The second, you specify your forum width in pixels and the color for the Outer Table borders.
var pdivH=25; // Post divider height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
Enter the "gap" height in pixels for the above splitter areas.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
Do I need to explain these? lol
Enter the FULL URL to the respective image locations for all the above.
If you do not have sticky/normal images yet, don't worry. The code will use your Head image instead!
NOTE:
In order for the sticky splitter to work, your "sticky" and "stickylock" icons, MUST have the word "sticky" somewhere in their name. You will not get any errors, but it will not split sticky threads if you do not do this.
var catClass="titlebg"; // Class of Category Name Cell.
Enter the CSS Class you would like your category name cell to be.
(titlebg, catbg or your own. Default is titlebg)
This means you can have a background image or color or just about anything!
var aClass="titlebg"; // Annnouncement Divider Background class.
Enter a class for your Announcement divider background. (catbg,titlebg etc.)
var aHeight=10; // Announcement Divider Height.
The Height in pixels you would like the Announcement divider to be. This separates the Announcements from the Sticky threads in the "Sticky" section.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
Enable/disable the Quick Reply Customizations.
These last three variables are only used if qrCustom=1.
var qrMess=""; // Replace "Message:" with this Text.
Replaces "Message:" line with your text here.
Replace with "" to hide the "Message:" line. (default)
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
Specify preferred height and width (Pixels) of the Quick Reply text area.
Multiple Skin Information:
The same code is used for mutiple skins with the exception of the variable section.
Replace this:
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
With this:
if(pb_skinid=="1"){
var head="URL TO SKIN 1 HEAD IMAGE"; // Head image.
var base="URL TO SKIN 1 BASE IMAGE"; // Base image.
var stickyImg="URL TO SKIN 1 STICKY IMAGE";
var normImg="URL TO SKIN 1 NORMAL IMAGE";
}
else if(pb_skinid=="2"){
var head="URL TO SKIN 2 HEAD IMAGE"; // Head image.
var base="URL TO SKIN 2 BASE IMAGE"; // Base image.
var stickyImg="URL TO SKIN 2 STICKY IMAGE";
var normImg="URL TO SKIN 2 NORMAL IMAGE";
}
Follow the same Maroon pattern for more skins. Easy huh?
If you need any of the other variables for different skins (i.e. Outer Table Color), simply remove it from the main list, and copy the line into EACH skin list as above.
Enjoy!!!
SubDevo
Location: Global Footer
<script type="text/javascript">
/* ProBoard Forum Customize v1.0 by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"0060BF"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
var pdivH=25; // Post Divider Height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
var catClass="titlebg"; // Class of Category Name Cell.
var aClass="titlebg"; // Annnouncement Divider Background class.
var aHeight=10; // Announcement Divider Height.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
var qrMess=""; // Replace "Message:" with this Text.
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
// DO NOT EDIT BELOW
var tb=document.getElementsByTagName("table"); var rTb=0;
var pLoc=location.href; var rLoc=document.title; var splitType=0; var ssT="";
var mM=/password\sprotected|error\shas\soccurred|admin\shome|login|preview|move\sthread|search\sresult/i;
if(rLoc.match(mM)||document.ammForm||document.postForm){splitType=0;
}else if(pb_action=="home"){splitType=1; ssT=/<b>Forum\sName/i; pdivH=cdivH;
}else if(pb_action=="boardindex"){splitType=2; ssT=/\[Search\sThis/; pdivH=sdivH;
}else if(pLoc.match(/thread=/i)){splitType=3; ssT=/<b>(Author|Poll)/i;}
stickyImg=cI(stickyImg); normImg=cI(normImg); var po = document.getElementsByName("action");
if(po&& !(navigator.appName.match(/microsoft/i))){po=document.getElementsByTagName("input");
for(var x=0;x<po.length;x++){if(po[x].value==" Submit Vote "){splitType=0; break;}}
}
function cI(h){var m=(h.match(/^http:\/\//i))?h:head; return m;}
if(splitType){
var sDiv=document.createElement("div"); var nDiv=sDiv.cloneNode(false);
sDiv.style.height=pdivH+"px"; nDiv.align="center"; var tbA="";
var stickySplit=0; var tbN=""; var nT=""; var te=(splitType==3)?1:0;
for(var x=0;x<tb.length;x++){
with(tb[x]){if(cellPadding==4&&width=="100%"&&rows[te].innerHTML.match(ssT)){break;}}
}
if(tb[x]){ with(tb[x-2].rows[0]){
if(splitType==2&&innerHTML.match(/Sub-Boards/)){firstChild.className = catClass;}}
tb[x-1].style.backgroundColor="transparent"; tb[x].className="bordercolor";
tbA=tb[x]; var tbP=tbA.parentNode;
var nTop=tb[x].rows[te].cloneNode(true); tr=tbA.rows;
}else{splitType=0;}
if(splitType==1){ x=1;
while(tr[x+1]){
if(tr[x].cells.length==1){ makeTable();
with(nTop.firstChild){className=catClass; innerHTML=tr[x].firstChild.innerHTML;}
aD(nT,nTop,1);
} x++;
while(tr[x]&&tr[x].cells.length==5){nT.appendChild(tr[x]);}
if(tr[x]&&tr[x].innerHTML.match(/markallb/i)){tr[x].firstChild.align="center"; nT.appendChild(tr[x]);}
aD(tbP,tbN,1); if(tr[x+1]){doDiv(tbP);}
} x++; rTb=1;
}else if(splitType==2&& !tbA.innerHTML.match(/no\smessages/i)){
stickySplit=1; var gotSticky=0;
for(x=2;x<tr.length;x++){ makeTable();
if(x==2){
aD(nT,tr[1]);
while(tr[x]&&(tr[x].innerHTML.match(/sticky/i)||(tr[x].cells.length==1))){
var tC=tr[x].cells;
if(tC&&tC.length==1){with(tC[0]){className=aClass; height=aHeight+"px";}}
nT.appendChild(tr[x]); gotSticky++;
} if(gotSticky){aD(tbP,tbN,1); doDiv(tbP);continue;}
}else{x--;
aD(nT,tr[0],1); aD(nT,tr[1],1);
while(tr[x]){nT.appendChild(tr[x]);}
aD(tbP,tbN,1); if(!tr[x]){break;}
}
}
rTb=1; var pDiv=document.createElement("div");
var tbM=tbP.parentNode.parentNode.parentNode;
with(pDiv){align="center"; innerHTML='<img src="'+stickyImg+'" />';}
if(stickyImg.match(/^http:\/\//i)&& gotSticky){tbM.parentNode.insertBefore(pDiv,tbM);}
}else if(splitType==3){ var rC=0; var nx=2;
for(x=1;x<tr.length;x++){ makeTable();
if(x==1){
if(tr[x].innerHTML.match(/poll\sq/i)){x=3; nx=4; aD(nT,tr[1],1); aD(nT,tr[2],1);}else{continue;}
}else{
if(x==nx){aD(nT,tr[0],1);aD(nT,tr[nx-1],1);}
aD(nT,tr[x],1);
while(tr[x+1]&&tr[x+1].innerHTML.match(/\[Search\sThis|Admin\sFunctions:/)){nT.appendChild(tr[x+1]); rC=1;}
} aD(tbP,tbN,1); if(rC){break;}else{doDiv(tbP);}
} rTb=1;
} if(rTb){tbP.removeChild(tbA);}
} var m=/<img/i; var mb="bordercolor";
for(x=0;x<tb.length;x++){
with(tb[x]){
if(resizeForum[0]&&width=="92%"){width=resizeForum[1]+"px";}
if(outerBorder[0]&&width=="100%"&&cellSpacing=="1"&& !parentNode.nodeName.match(/font/i)){style.border= "1px solid #"+outerBorder[1];}
if(style.display!="none"&&className==mb&&width=="100%"&&cellPadding=="0"){
var tDiv=previousSibling; var nSib=nextSibling;
if(!(tDiv&&tDiv.nodeName.match(/div/i)&&tDiv.innerHTML.match(m) )){makeDiv(head,tb[x]);}
if(!(nSib&&nSib.nodeName.match(/div/i)&&nSib.innerHTML.match(m) )){makeDiv(base,nSib);}
}
}
}
if(qrCustom){
var td=document.getElementsByName("message")[0];
if(td&& !(document.searchForm||document.postForm||pLoc.match(/=emailall/i))){
with(td.style){height=qrHeight, width=qrWidth;}
td.parentNode.insertBefore(document.createElement("br"), td.nextSibling);
var qrP=td.parentNode; var qb=qrP.parentNode.parentNode.parentNode.parentNode.parentNode;
qb.rows[1].align="center"; qb.rows[0].cells[0].align="center";
qrP.parentNode.firstChild.data=qrMess; var nFont= document.createElement("font");
nFont.innerHTML='<input name="nextaction" type="hidden" value="post"><input type="submit" accesskey="p" value="Preview" onclick="qrP.nextaction.value=\'preview\'; return true;" /> <input type="reset" value="Reset" accesskey="r" onClick="reset">';
qrP.insertBefore(nFont,qrP.lastChild); qrP.removeChild(qrP.lastChild);
}
}
function makeDiv(dSrc,nTb){ if(!dSrc.match(/^http:\/\//i)){return;}
var nDiv=document.createElement("div");
with(nDiv){align="center"; innerHTML='<img src="'+dSrc+'" />';}
(nTb)? nTb.parentNode.insertBefore(nDiv,nTb): tb[x].parentNode.appendChild(nDiv);
}
function makeTable(){
tbN=tbA.cloneNode(false);
tbN.appendChild(tbA.firstChild.cloneNode(false)); nT=tbN.firstChild;
}
function aD(aN,aS,tf){aN.appendChild(aS.cloneNode(tf));}
function doDiv(sT){
for(var i=0;i<3;i++){
var sD=((i==1)?sDiv:nDiv).cloneNode(false);
var hI=(stickySplit&&normImg)?normImg:head;
if(i!=1){hI=(i)?hI:base; sD.innerHTML='<img src="'+hI+'" />';}
if(hI.match(/^http:\/\//i)||i==1){if(sD.style.height!="0px"){sT.appendChild(sD);}}
}
}
</script>
I'm also offering a hosted version. You decide which version is best for you.
Advantages: Only 4Kb in size. Faster page loading.
Instant update of your code if changes need to be made.
Disadvantages: If my "100webspace" server goes down, the code will not run.
Hosted Version:
<script type="text/javascript">
/* ProBoard Forum Customize v1.0 by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var resizeForum=[1,778]; // Resize Forum? 1=Yes, 0=No , Forum width.
var outerBorder=[1,"0060BF"]; // Outer Table Borders? 1=Yes, 0=No, Border Color.
var pdivH=25; // Post Divider Height.
var cdivH=25; // Category Divider Height.
var sdivH=25; // Sticky/Thread Divider Height.
var head="URL TO HEAD IMAGE";
var base="URL TO BASE IMAGE";
var stickyImg="URL TO STICKY IMAGE";
var normImg="URL TO NORMAL IMAGE";
var catClass="titlebg"; // Class of Category Name Cell.
var aClass="titlebg"; // Annnouncement Divider Background class.
var aHeight=10; // Announcement Divider Height.
var qrCustom=1; // Quick Reply Customize? 1=Yes, 0=No.
var qrMess=""; // Replace "Message:" with this Text.
var qrWidth=631; // Desired Width (Default is 631)
var qrHeight=227; // Desired Height (Default is 87)
// DO NOT EDIT BELOW
document.write('<script type="text/javascript" src="http://lsdp.100webspace.net/PBForumCust_v1.0.js"></scr'+'ipt>');
</script>
EDIT: Code Updated 3/10/2010
This code can now be used for simply splitting everything without head/base images.
If you do not enter a URL for any one (or all) of the head/base/sticky/normal images, the code will NOT put an empty box with the red x or question mark in it!
EDIT: Code Updated 5/18/2010
"Fixed" the code to allow NON-IE users the ability to vote in polls.
Added the Category Name cell class (catClass) to the Sub-Board listing.
var catClass="titlebg"; // Class of Category Name Cell.
Previously, this variable was only being applied to the main page.