• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 22:11
CEST 04:11
KST 11:11
  • 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
[ASL19] Finals Recap: Standing Tall10HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Firefly given lifetime ban by ESIC following match-fixing investigation12$25,000 Streamerzone StarCraft Pro Series announced6Weekly Cups (June 30 - July 6): Classic Doubles6[BSL20] Non-Korean Championship 4x BSL + 4x China9Flash Announces Hiatus From ASL66
StarCraft 2
General
Firefly given lifetime ban by ESIC following match-fixing investigation The SCII GOAT: A statistical Evaluation TL Team Map Contest #4: Winners Weekly Cups (June 30 - July 6): Classic Doubles The GOAT ranking of GOAT rankings
Tourneys
$25,000 Streamerzone StarCraft Pro Series announced FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament RSL: Revival, a new crowdfunded tournament series WardiTV Mondays
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ [G] Progamer Settings ASL20 Preliminary Maps [ASL19] Finals Recap: Standing Tall SC uni coach streams logging into betting site
Tourneys
[Megathread] Daily Proleagues [BSL20] Non-Korean Championship 4x BSL + 4x China [BSL20] Grand Finals - Sunday 20:00 CET CSL Xiamen International Invitational
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Positive Thoughts on Setting Up a Dual-Caliber FX
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 Vanilla Mini Mafia
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Summer Games Done Quick 2025! Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
momentary artworks from des…
tankgirl
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Customize Sidebar...

Website Feedback

Closed Threads



Active: 540 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
Replay Cast
00:00
SEL Masters #4 - Day 1
CranKy Ducklings81
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft269
Nina 155
RuFF_SC2 92
ProTech61
Livibee 59
StarCraft: Brood War
Artosis 816
NaDa 113
sSak 60
LuMiX 2
Dota 2
monkeys_forever646
NeuroSwarm85
League of Legends
JimRising 907
Counter-Strike
taco 789
Coldzera 231
Super Smash Bros
hungrybox712
Heroes of the Storm
Khaldor88
Other Games
summit1g10595
shahzam384
Maynarde186
ViBE159
ZombieGrub8
Organizations
Other Games
gamesdonequick42861
BasetradeTV89
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 15 non-featured ]
StarCraft 2
• Berry_CruncH227
• Hupsaiya 48
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki9
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2026
Other Games
• Scarra1408
Upcoming Events
RSL Revival
7h 49m
ByuN vs SHIN
Clem vs Reynor
OSC
10h 49m
Replay Cast
21h 49m
RSL Revival
1d 7h
Classic vs Cure
FEL
1d 13h
OSC
1d 17h
RSL Revival
2 days
FEL
2 days
FEL
2 days
CSO Cup
2 days
[ Show More ]
BSL20 Non-Korean Champi…
2 days
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
Sparkling Tuna Cup
3 days
RSL Revival
3 days
FEL
3 days
BSL20 Non-Korean Champi…
3 days
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
Replay Cast
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2025-07-07
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
StarSeries Fall 2025
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
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.