Welcome, Guest. Please Login or Register.
May 15, 2025, 03:46:31 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Maximum word length? (to avoid stretching...?) « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Maximum word length? (to avoid stretching...?)  (Read 1381 times)
Abominator
Noobie
*
Posts: 15


WWW
Maximum word length? (to avoid stretching...?)
« on: October 11, 2003, 10:52:11 PM »
Reply with quote

i'm redesigning my site, and my new layout will be ruined if someone posts a huge word that stretches the layout of my board...

So, just like the censored words checker, i figure there must be a way to make a word length checker, right?

say, i want my board to refuse posts that contain words longer than 50 characters (i say 50 because that's how many capital "W" will fit in my new layout without stretching)

i'm sure people would find this handy... a lot of lamers used to say LOLOLOLOLOLOLOLOLOLOLOL or HAHAHAHAHAHAHA or !!!!!!!!!!!!!!!!!!!!!!! or whatever on my board... not so much these days admittedly, but still... my new layout must not be harmed!

soo... i figure this one isnt too taxing, but i really don't know.  any help would be much appreciated.

(edit=typo)
« Last Edit: October 11, 2003, 10:52:40 PM by Abominator » Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #1 on: October 11, 2003, 10:57:59 PM »
Reply with quote

I've added an (optional) way of fixing this to SMF, actually.

-[Unknown]
Logged
Abominator
Noobie
*
Posts: 15


WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #2 on: October 12, 2003, 02:38:28 AM »
Reply with quote

eh... i take it that means you're not gonna be telling me how to put it in yabbse then?  ???

i'll be upgrading to SMF, but not for a while after it's released... i fear change... basically the whole SMF thing happened weeks after i went from yabb to se, and now that i've settled in i'm not gonna be changing at least until 2004...
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #3 on: October 19, 2003, 05:39:24 PM »
Reply with quote

I'm planning to do this myself, but you don't need to wait for me, I plan to use this:

http://mx.php.net/manual/en/function.wordwrap.php
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Abominator
Noobie
*
Posts: 15


WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #4 on: October 19, 2003, 06:35:38 PM »
Reply with quote

looks ideal... can't wait for the mod :)
Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #5 on: October 19, 2003, 10:52:47 PM »
Reply with quote

Quote from: Abominator on October 19, 2003, 06:35:38 PM
looks ideal... can't wait for the mod :)

I may write the mod later, but for now, you can do this:

in Sources/Display.php, find

      # Run UBBC interpreter on the message.

      $message = $postmessage; # put the message back into the proper variable to do ubbc on it

      if ($enable_ubbc)

         $message = DoUBBC($message, $es);


and add after

      #word wrap
      $message = wordwrap($message, 8, "<br />");


the "8" is the number of characters where it wraps, so change it to whatever value suits you

after trying it, I believe this is not the best solution though, cause the character sizes will vary, so you can't control it in pixels

for that, the overflow property in CCS is better and you can even control pictures too... I may post that later
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Abominator
Noobie
*
Posts: 15


WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #6 on: October 20, 2003, 10:53:33 AM »
Reply with quote

i tried that out, and it pretty much massacred my board...

it just made peoples posts
appear like this, as if they
had been hitting return
every few words.

...and it didnt stop people from going HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA or whatever at all.

???

edit:  and on top of all that, it made posts a bit screwy... like showing html code in the middle of posts and so on...
« Last Edit: October 20, 2003, 11:04:57 AM by Abominator » Logged
Anguz
YaBB God
*****
Posts: 641


llama me?!

WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #7 on: October 20, 2003, 02:47:34 PM »
Reply with quote

I see... I'm sorry

after thinking about it yesterday, I think the best thing will be to use preg_replace or something like that to chop only the long words that aren't tags

oh well :P
Logged

My Mods: Avatar & Sig Size Control, No Show Msg Subject, Msg URL Composer, Built-in Avatar Rand, Built-in Sig Rand, Remove New-lines Excess, Show All Stars, Search Bar, Smart URLs
Abominator
Noobie
*
Posts: 15


WWW
Re:Maximum word length? (to avoid stretching...?)
« Reply #8 on: October 20, 2003, 06:27:35 PM »
Reply with quote

oh well, no harm done :)
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Maximum word length? (to avoid stretching...?) « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.034 seconds with 20 queries.