• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 01:19
CEST 07:19
KST 14:19
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12[ASL20] Ro24 Preview Pt2: Take-Off7[ASL20] Ro24 Preview Pt1: Runway13
Community News
SC4ALL $6,000 Open LAN in Philadelphia7Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues25LiuLi Cup - September 2025 Tournaments3Weekly Cups (August 25-31): Clem's Last Straw?39Weekly Cups (Aug 18-24): herO dethrones MaxPax6
StarCraft 2
General
Weekly Cups (Sept 1-7): MaxPax rebounds & Clem saga continues #1: Maru - Greatest Players of All Time Team Liquid Map Contest #21 - Presented by Monster Energy Classic Games #3: Rogue vs Serral at BlizzCon What happened to Singapore/Brazil servers?
Tourneys
Maestros of The Game—$20k event w/ live finals in Paris RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament SC4ALL $6,000 Open LAN in Philadelphia LANified! 37: Groundswell, BYOC LAN, Nov 28-30 2025
Strategy
Custom Maps
External Content
Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around Mutation # 487 Think Fast
Brood War
General
Pros React To: SoulKey's 5-Peat Challenge ASL20 General Discussion BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ BSL Team Wars - Bonyth, Dewalt, Hawk & Sziky teams
Tourneys
[ASL20] Ro16 Group B [ASL20] Ro16 Group A [Megathread] Daily Proleagues SC4ALL $1,500 Open Bracket LAN
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Borderlands 3 Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile General RTS Discussion Thread
Dota 2
LiquidDota to reintegrate into TL.net Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI UK Politics Mega-thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Evil Gacha Games and the…
ffswowsucks
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1264 users

Solutions! Forum Breaking (Mods Can Read 2)

Forum Index > Website Feedback
Post a Reply
Amarxist
Profile Blog Joined July 2008
United States371 Posts
January 16 2009 23:02 GMT
#1
Salutations, I didn't know how else to get this to accross to the appropiate parties so I just made a new thread in this here general forums's. I've been a lurker at Team Fluid for a while now and there's been one nagging issue that seems to strike me (as a Web Design & Developer) often. It is a innocent mishap, im sure, that occurs in the heat of the moment or just plain ignorance. To me, it's like a voice that continually makes noise over everyone elses conversa----shut up Henry i'm trying to read!

I imagine a forum chat progressing like this:

ForumBreakingThug: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Poster #-1: Please stop.
ForumBreakingThug: AAAAAAAAAAAAAAAAAAAAAAAAAAA
Poster: JAEDONG, BRO. THAT GUY IS THE BROEST BROCRAFT PLAYER, EVER, BRO.
ForumBreakingThug: AAAAAAAAAAAAAAAAAAA
Poster #2: YEAH BRO.
ForumBreakingThug: AAAAAAAAAAAAAAAAAAA
Poster #3: God damnit stop breaking the forum.
ForumBreakingThug: AAAAAAAAAAAAAAAAAAA

I have even seen moderators telling people to not break the forum before, even going to the length of editing their posts. It's outrageous, and i'm in full agreeance with them. It is damn annoying to see.

So i've come here to throw some lemons at the Administrators of Team Liquid and offer some quick and easy solutions to preventing this mishap from ever transpiring again. Note: I'm a web developer & designer so i've dealt with this issue a lot of times on websites that have very constrained designs being ruined by user generated content. The dreaded overly long text string. Take your finger off that key.

Solution Numero Uno - CSS Overflow: Auto;

I recommend this one so i'm putting it first. First means best. This has very simple application, the only thing you need to do is alter the template to include a div layer (with this CSS class) inside that table (inside the table of the tables table--table) where the content of the posts reside. You know, so it wraps the users posts. I'm attaching a screenshot to illustrate the results of before & after.

THE CSS CLASS INVOVLED
Some may notice that some of these overflow options are IE only, yeah that's cause the problem of the vertical scrollbar showing no matter what only exists in IE. Go IE!

+ Show Spoiler +
.overFat
{
overflow: auto; overflow-x:auto; overflow-y:hidden; width: 591px; padding-bottom: 10px;
}


Note: The width, including padding, inside the post frame is exactly 591 pixels wide. So I added that to the class.

Broken:

[image loading]


Fixed:

[image loading]


Pros:
* The forum won't turn into a visual train wreck.
* Only places a scroll bar in the posts that attempt to hurt our precious uniform layout.
* Vertically expands the table & div layer with the users content without adding a vertical scroll bar.
* Does not add a horizontal scroll bar if there is content that has a proper amount of spaces in between characters (words). This only deals with the issue of people holding down one key on the keyboard and creating a 100 character string that pushes out the table and thus the design of the site.

Cons: It's not as an elegant solution in terms of aesthetics, but it'll at least it'll make offenders visually obvious so we can stone them to death.+ Show Spoiler +
why did you click here?


Solution Two -- Server Side (PHP)

Also another very easy thing to apply. Run a function when you print out the users posts and BAM. Wrapping thems long strings of characters into social conformity with the rest of the posts.

PHP CODE

+ Show Spoiler +
function _wordWrap($text) {
$split = explode(" ", $text);
foreach($split as $key=>$value) {
if (strlen($value) > 10) {
$split[$key] = chunk_split($value, 5, "​");
}
}
return implode(" ", $split);
}


To summarize what this accomplishes, all it does is reads a users post for a word longer then 10 characters. If it exceeds 10 characters then it adds a UNICODE character called zero-width space every 5 characters. This unicode character is used to control line breaks most of the time--forcing the browser to recognize a row of 97 consecutive A's(hole) as a word with only 5 letters thus wrapping it properly. But all this without showing that there's spaces in between the string (hence the name zero-width space).

Pros:
* It's transparent, wrapping done on the server-side so the user never is aware of what's going on. The malicious jerks who hold down their keys will probably ban themselves after no longer being able to break the forums.
* Gets the job done.

Cons:
* It's server-side. It adds additional load to the server where it's probably unnecessary, unlike the first option where it's handled on the users end.
* The unicode carries over in copy & pastes. So if there's perhaps a very long link, copying and pasting the link would also carry the unicodes as well. That's not gonna work in a browser!

Last Solution -- I don't like this `1`.

By this point, there's a good chance that I don't like many of you and you don't like me, but i'm still looking out for you guys. This last one is basically a javascript solution. It breaks up the overly long string into smaller chunks and attemtps to wrap them into a defined size. It works aight, but it also lags when there's lots of text to apply this function too. Why the hell am I even posting this solution again? Ah right, I don't like many of you so maybe i'm hoping they'll use it. Pay with lag, you jerks.

JAVASCRIPT

+ Show Spoiler +
function wrapText(text,lengthInPixels,splitter){

try{
if(!text){throw('arg1');}

var result = '';
var line = '';
var parentDiv = document.createElement('div');
var contentDiv = document.createElement('div');

if(!lengthInPixels){lengthInPixels=100;}
if(!splitter){splitter=' ';}

parentDiv.style.width = '0px';
parentDiv.style.height = '0px';
parentDiv.style.overflow = 'hidden';
parentDiv.appendChild(contentDiv);
document.body.appendChild(parentDiv);

for(var i=0; i<text.length; i++){
contentDiv.innerHTML += text.charAt(i);
if(parentDiv.scrollWidth < lengthInPixels){
line += text.charAt(i);
}else{
result += line+splitter;
contentDiv.innerHTML = '';
line = '';
}
}

if(line.length>0){result += line;}
return result;

}
catch(ex){
if(ex=='arg1'){
alert('wrapText: Argument 1 is mandatory.');
return text;
}else{
throw('Unexpected error: '+ex.toString());
}
}
}


Pros: The forum don't break.

Cons: Did you imbeciles really make it this far down the post about this nonsensical crap? Go find another, more interesting, thread.

That concludes this whacky uninformative post. I don't know if it'll be used in any other way other then as a measuring stick of how much you may not like me. But if it is used, glad I could help. TAKE YOUR FINGER OFF THAT KEY. + Show Spoiler +
really did you click here again?
☺ ☻
IzzyCraft
Profile Blog Joined June 2007
United States4487 Posts
Last Edited: 2009-01-16 23:07:32
January 16 2009 23:06 GMT
#2
I had porblems with imanges and text streching the box but i just put it into quirks mode and it rezies and forces it into the box ionno why or really care. If i really cared i would have used IE8 dev tools to forcefully change parts of the website similar to a plug in only easier to do.
I have ass for brains so,
even when I shit I'm droping knowledge.
CDRdude
Profile Blog Joined May 2007
United States5625 Posts
January 16 2009 23:09 GMT
#3
This is a great post, but we have a website feedback section for this.
Force staff is the best item in the game.
Carnac
Profile Blog Joined December 2003
Germany / USA16648 Posts
Last Edited: 2009-01-16 23:11:02
January 16 2009 23:10 GMT
#4
moving to website feedback
ModeratorHi! I'm a .signature *virus*! Copy me into your ~/.signature to help me spread!
Amarxist
Profile Blog Joined July 2008
United States371 Posts
January 16 2009 23:15 GMT
#5
Thanks for the move.
☺ ☻
overpool
Profile Joined April 2008
United States191 Posts
January 16 2009 23:26 GMT
#6
Yes, I don't know why nobody is using CSS to hide the overflow when it breaks the layout. I made a thread about this a while ago.

In addition, you should probably post this in "Website Feedback" instead of general.
yay i love tl events
Badjas
Profile Blog Joined October 2008
Netherlands2038 Posts
January 16 2009 23:47 GMT
#7
Nice bundle of solutions, I learned from it as well. thanks. And I lol'd for real on those spoilers and not just because I got a tiredness high
I <3 the internet, I <3 you
SoMuchBetter
Profile Blog Joined April 2003
Australia10606 Posts
January 17 2009 00:29 GMT
#8
* The unicode carries over in copy & pastes. So if there's perhaps a very long link, copying and pasting the link would also carry the unicodes as well. That's not gonna work in a browser!

long links are truncated already so this is a nonissue.
AUSSIESCUM
TeamLiquid eSTROgeneral #1 • RIP
onepost
Profile Joined April 2008
Canada297 Posts
January 17 2009 03:13 GMT
#9
Even more simple: Make thread and posts part of the same table? This way if the thread overflows, the posts' own width will match...? In other words, instead of making the thread part shorter, we make the posts wider.
There are three types of lies: statistics, studies, and benchmarks.
Bockit
Profile Blog Joined November 2004
Sydney2287 Posts
Last Edited: 2009-01-17 03:44:05
January 17 2009 03:43 GMT
#10
On January 17 2009 12:13 onepost wrote:
Even more simple: Make thread and posts part of the same table? This way if the thread overflows, the posts' own width will match...? In other words, instead of making the thread part shorter, we make the posts wider.

The issue is that we don't want the posts to be wider at all.

I like the css option myself.
Their are four errors in this sentance.
onepost
Profile Joined April 2008
Canada297 Posts
January 17 2009 03:45 GMT
#11
On January 17 2009 12:43 Bockit wrote:
Show nested quote +
On January 17 2009 12:13 onepost wrote:
Even more simple: Make thread and posts part of the same table? This way if the thread overflows, the posts' own width will match...? In other words, instead of making the thread part shorter, we make the posts wider.

The issue is that we don't want the posts to be wider at all.

I like the css option myself.

Let it be css then.
There are three types of lies: statistics, studies, and benchmarks.
Bockit
Profile Blog Joined November 2004
Sydney2287 Posts
January 17 2009 03:53 GMT
#12
Heh it's not just up to me, but it's been passed on.
Their are four errors in this sentance.
Please log in or register to reply.
Live Events Refresh
Next event in 4h 41m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
NeuroSwarm 153
StarCraft: Brood War
sSak 45
Noble 26
Icarus 10
League of Legends
JimRising 625
Counter-Strike
Stewie2K365
Super Smash Bros
hungrybox769
Other Games
summit1g7704
WinterStarcraft504
ViBE201
XaKoH 135
Nina70
Organizations
Other Games
BasetradeTV31
gamesdonequick17
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• Berry_CruncH322
• practicex 36
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• HappyZerGling49
Other Games
• Scarra1936
Upcoming Events
RSL Revival
4h 41m
Maestros of the Game
11h 41m
BSL Team Wars
13h 41m
Afreeca Starleague
1d 4h
Snow vs Sharp
Jaedong vs Mini
Wardi Open
1d 5h
Sparkling Tuna Cup
2 days
Afreeca Starleague
2 days
Light vs Speed
Larva vs Soma
LiuLi Cup
3 days
The PondCast
4 days
Korean StarCraft League
5 days
[ Show More ]
[BSL 2025] Weekly
6 days
BSL Team Wars
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
SEL Season 2 Championship
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
Chzzk MurlocKing SC1 vs SC2 Cup #2
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL Polish World Championship 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
SC4ALL: StarCraft II
EC S1
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
MESA Nomadic Masters Fall
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.