|
Post by Mordecai on Jun 16, 2005 1:00:56 GMT -8
|
|
|
Post by CrAzY_J on Jun 17, 2005 13:47:34 GMT -8
ill work on this one
|
|
|
Post by Mordecai on Jun 18, 2005 23:45:39 GMT -8
Thanks alot... Really need it asap...
|
|
|
Post by CD on Jun 19, 2005 10:35:21 GMT -8
He probably forgot, and I'm not going to attempt it. I'll remind him on MSN though.
|
|
|
Post by Mordecai on Jun 27, 2005 19:52:44 GMT -8
So is no one gonna help? My board depends heavily on this code!
|
|
|
Post by Mordecai on Jul 6, 2005 0:10:14 GMT -8
Bump^
|
|
|
Post by Marty on Jul 7, 2005 14:53:31 GMT -8
Sorry for taking so long. I ended up making my own version, but it's very similiar to his. <script type="text/javascript"> function addURL() { if (document.postForm.url.value.match(/(http:\/\/)?\w+.proboards\d+.com/i)) { document.postForm.message.value='[b]Board URL:[/b] ' + document.postForm.url.value + '\n\n' + document.postForm.message.value; } else { if (document.postForm.url.value=="") { alert ("Please enter your board URL"); document.postForm.url.focus(); return false; } else { alert ("The URL you entered is not a valid Proboard address"); document.postForm.url.focus(); return false; } } }
if (document.postForm && document.postForm.subject.value=="") { subRow=document.postForm.subject.parentNode.parentNode; var newRow=subRow.parentNode.insertRow(subRow.rowIndex+1); var newCell=newRow.insertCell(0); newCell.innerHTML='<font size="2">Board URL:</font>'; newCell.className="windowbg"; var newCell=newRow.insertCell(1); newCell.innerHTML='<input type="text" name="url" value="" size="40">'; newCell.className="windowbg"; var input=document.getElementsByTagName('input'); document.postForm.onsubmit=addURL; } </script> There you go! Put it in your board footers.
Last Edit: Jul 8, 2005 14:49:55 GMT -8 by Marty
|
|
|
Post by CrAzY_J on Jul 7, 2005 15:33:56 GMT -8
this would be better for url check if (document.postForm.url.value.match(/(http:\/\/)?\w+.proboards\d{2}.com(\/index\.cgi\?)?$/i))
|
|
|
Post by Marty on Jul 7, 2005 23:09:30 GMT -8
Well, by putting \d{2}, that means it MUST be 2 digits, which would rule out boards on servers 1-9. I guess I could've put \d{1,2}, but it works good enough to do \d+. There's really no need to check if /index.cgi is on the end. My way works if it is or isn't.
|
|
|
Post by CD on Jul 7, 2005 23:48:02 GMT -8
But what about
"(http:\/\/)"
Doesn't that mean http:// is optional?
|
|