|
Post by CrAzY_J on Aug 28, 2005 10:48:35 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>
Last Edit: Aug 28, 2005 16:37:37 GMT -8 by CrAzY_J
|
|
hpa
New Member
Posts: 2
|
Post by hpa on Apr 20, 2006 18:11:53 GMT -8
Sweet code it is grerat for my Affiliation board
|
|