Post by Th£ ÎñFïNîTE™ on Dec 18, 2006 9:05:13 GMT -8
This code adds a title bar and a cell before the normal register table on the register page. Here you can tell users who are registering about member deletions/rules or something of the kind.
This is not in any way against the PB ToS.
Main Footer :
<script type="text/javascript"><!--
/* Add A Register Note by Th£ ÎñFïNîTE™
May not be re-posted, ripped or claimed as your own.
This copyright must stay in place at all times! */
var regtitletext = "Title Text That You Can Add"; // Text in the title bar
var reginfotext = "Whatever information you want to display."; // Text in the cell
/* Do not edit below here! */
if(location.href.match(/action=register/i)){
var fintd = document.getElementsByTagName("td");
for(i=0; i<fintd.length; i++){
if(fintd.item(i).className == "titlebg" && fintd.item(i).width == "100%" && fintd.item(i).innerHTML.match(/Register/i)){
var tbody = fintd.item(i).parentNode.parentNode;
var new_row_two = tbody.insertRow(0);
var new_row_one = tbody.insertRow(0);
var titlecell = document.createElement("td");
titlecell.className = "titlebg"; titlecell.style.width = "100%";
var infocell = document.createElement("td");
infocell.className = "windowbg"; infocell.style.width = "100%"; infocell.style.fontSize = "12px";
new_row_one.appendChild(titlecell); new_row_two.appendChild(infocell);
new_row_one.cells.item(0).appendChild(document.createTextNode(regtitletext));
new_row_two.cells.item(0).appendChild(document.createTextNode(reginfotext));
break;
}
}
}
// --></script>
Edit the parts in red. When you do so, make sure you add a backslash \ before any backslash or any double-apostrophes " that you use.
This should work fine in both IE and FF.
This is my first code using DOM. Yaaay!
Preview -
>Click<
This is not in any way against the PB ToS.
Main Footer :
<script type="text/javascript"><!--
/* Add A Register Note by Th£ ÎñFïNîTE™
May not be re-posted, ripped or claimed as your own.
This copyright must stay in place at all times! */
var regtitletext = "Title Text That You Can Add"; // Text in the title bar
var reginfotext = "Whatever information you want to display."; // Text in the cell
/* Do not edit below here! */
if(location.href.match(/action=register/i)){
var fintd = document.getElementsByTagName("td");
for(i=0; i<fintd.length; i++){
if(fintd.item(i).className == "titlebg" && fintd.item(i).width == "100%" && fintd.item(i).innerHTML.match(/Register/i)){
var tbody = fintd.item(i).parentNode.parentNode;
var new_row_two = tbody.insertRow(0);
var new_row_one = tbody.insertRow(0);
var titlecell = document.createElement("td");
titlecell.className = "titlebg"; titlecell.style.width = "100%";
var infocell = document.createElement("td");
infocell.className = "windowbg"; infocell.style.width = "100%"; infocell.style.fontSize = "12px";
new_row_one.appendChild(titlecell); new_row_two.appendChild(infocell);
new_row_one.cells.item(0).appendChild(document.createTextNode(regtitletext));
new_row_two.cells.item(0).appendChild(document.createTextNode(reginfotext));
break;
}
}
}
// --></script>
Edit the parts in red. When you do so, make sure you add a backslash \ before any backslash or any double-apostrophes " that you use.
This should work fine in both IE and FF.
This is my first code using DOM. Yaaay!
Preview -
>Click<