inherit
52328
0
Mar 13, 2009 16:15:58 GMT -8
CrAzY_J
871
July 2005
crazyj2
|
Post by CrAzY_J on Sept 15, 2005 19:31:01 GMT -8
Description: This code will add a text field in the "post message" table when the user creates a new thread, and the user will have to fill in a valid proboards url to their site.
Code placement: Global Footers (Board footers are optional)
Side Notes: If you want this code to check for other urls (website urls) take this to code support.
<script type='text/javascript'> /*Proboards Url needed when Creating Thread Created BY CrAzY_J Do no redistribute without Creator's permission (CRAzY_J) http//ssdesigns.proboards17.com*/
if(location.href.match(/post$/)){ var gTab=document.body.getElementsByTagName("table"); for(t=0;t<gTab.length;t++){ if(gTab[t].cellPadding=="4" && gTab[t].cellSpacing=="1" && gTab[t].rows[0].cells[0].innerHTML.match(/Post\sMessage/)){ var iRow=gTab[t].insertRow(2);var iCell=iRow.insertCell(0);var iCell2=iRow.insertCell(1); iCell.className="windowbg";iCell.innerHTML="<font size='2'>Proboards Url:</font>"; iCell2.className="windowbg";iCell2.innerHTML="<input id='Web' type='text' size='40'>"; } }
document.postForm.onsubmit = function(){ if(! document.getElementById("Web").value.match(/.+?\.\w{9}\d{1,2}\.\w{3}(\/(index\.cgi(\/|\?)?)?)?$/)){ alert("Url is not correct"); return false; } document.postForm.message.value = document.getElementById("Web").value+"\n\n"+document.postForm.message.value; } }
</script>
|
|