Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Dec 8, 2009 18:53:13 GMT -8
Hey, This is Topeka as you can see by the username lol For some odd reason im having a really hard time figuring out how to fix this problem. My board is fixed by a width code 702 i believe is the width. But whenever someone will post without putting spaces in between a word, the board will streatch past that 702 boarder because of the posted text. I've searched and did a few changes of my own, but i cant seem to make it work. So basicly my question is how can i make it so when someone posts an "(unspaced) long word", how can i make it so it stays at the width of 702? example topekatrail.proboards.com/index.cgi?action=display&board=general&thread=15you should be able to see the board. i think it allows guests to see it. if not, feel free to register, or just tell me, and ill fix it so you can see it. Thanks ~Topeka
|
|
|
Post by Wormopolis on Dec 8, 2009 20:06:50 GMT -8
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
|
|
Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Dec 8, 2009 20:09:30 GMT -8
yeah kindof like that? lmao is there a way to fix it? haha
|
|
|
Post by Wormopolis on Dec 8, 2009 20:37:13 GMT -8
long lines do indeed insert a space after a set number of characters, however the default number is too large for your forum.
I need to research something first...
|
|
|
Post by Wormopolis on Dec 8, 2009 22:51:25 GMT -8
|
|
|
Post by Wormopolis on Dec 9, 2009 4:17:03 GMT -8
try this:
<script type="text/javascript"> <!-- // wordbreaker v.1.1 // by Wormopolis - www.wormocodes.com // keep header intact
var maxWordLength=70;
function chkfertext(objkt) { var holdtemp=objkt; for (var h=0; h<holdtemp.length; h++) { if (holdtemp[h].nodeName.match(/text/i)) { holding=holdtemp[h].nodeValue.split(' '); for (var k=0; k<holding.length; k++) { if (holding[k].length>maxWordLength) { temp=''; temp2=holding[k]; while (temp2.length>maxWordLength) { temp+=temp2.substr(0,maxWordLength)+' '; temp2=temp2.substr(maxWordLength, temp2.length) } holding[k]=temp+temp2; } } holdtemp[h].nodeValue=holding.join(' '); } else { if (holdtemp[h].className!='code' && !holdtemp[h].nodeName.match(/textarea/) && holdtemp[h].hasChildNodes()) chkfertext(holdtemp[h].childNodes); } }
}
if (location.href.match(/action=display/)) {
for (tds=document.getElementsByTagName('td'), i=0; i<tds.length; i++) { if (tds[i].width=="20%" && tds[i].align=="left" && tds[i].vAlign=="top" && tds[i].className.match(/windowbg/)) { postPart=tds[i].nextSibling.getElementsByTagName('tr')[1].cells[0].firstChild.nextSibling; postStuff = postPart.childNodes; chkfertext(postStuff); } }
}
// --> </script>
|
|
|
Post by Wormopolis on Dec 9, 2009 4:19:11 GMT -8
be careful if you plan to post codes on the board. it will put a space in there you dont want.
|
|
Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Dec 9, 2009 15:28:38 GMT -8
no, its still being at default 120 max length.
|
|
|
Post by Wormopolis on Dec 9, 2009 16:19:32 GMT -8
Its incompatible with the "alternating MP" code. it will need to go before that code.
|
|
Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Dec 9, 2009 16:34:49 GMT -8
nope placed it before all scripts in footer. and i took the alternating mp code out of footer to see if it was a factor. still same default.
|
|
|
Post by Wormopolis on Dec 9, 2009 16:42:50 GMT -8
hmmmm
|
|
|
Post by Wormopolis on Dec 9, 2009 17:06:27 GMT -8
get it again.. it was doing exactly what I said it would to codes by adding a space in where it shouldnt. I have fixed it so it wont affect codes anymore.
|
|
Topeka
Junior Member
Posts: 94
Topeka said 0 great things
|
Post by Topeka on Dec 9, 2009 17:20:31 GMT -8
works great! and you were right about the alternating miniprofile too. i placed it below the alterMP. and it didnt work. then placed it above, worked again. Nice work.
|
|