• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 13:13
CEST 19:13
KST 02:13
  • 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
Code S RO8 Preview: ByuN, Rogue, herO, Cure3[ASL19] Ro4 Preview: Storied Rivals7Code S RO12 Preview: Maru, Trigger, Rogue, NightMare12Code S RO12 Preview: Cure, sOs, Reynor, Solar15[ASL19] Ro8 Preview: Unyielding3
Community News
Dark to begin military service on May 13th (2025)18Weekly Cups (May 5-11): New 2v2 Champs1Maru & Rogue GSL RO12 interviews: "I think the pressure really got to [trigger]"5Code S Season 1 - Maru & Rogue advance to RO80Code S Season 1 - Cure & Reynor advance to RO84
StarCraft 2
General
What’s the Easiest Way to Upgrade QuickBooks 85574 Official Ladder Map Pool Update (April 28, 2025) 2024/25 Off-Season Roster Moves Code S RO8 Preview: ByuN, Rogue, herO, Cure I hope balance council is prepping final balance
Tourneys
[GSL 2025] Code S:Season 1 - RO12 - Group B Sparkling Tuna Cup - Weekly Open Tournament SOOPer7s Showmatches 2025 Monday Nights Weeklies [GSL 2025] Code S:Season 1 - RO12 - Group A
Strategy
Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 473 Cold is the Void Mutation # 472 Dead Heat Mutation # 471 Delivery Guaranteed Mutation # 470 Certain Demise
Brood War
General
BW General Discussion ASL 19 Tickets for foreigners BGH auto balance -> http://bghmmr.eu/ RepMastered™: replay sharing and analyzer site [ASL19] Ro4 Preview: Storied Rivals
Tourneys
[ASL19] Semifinal B [Megathread] Daily Proleagues [ASL19] Semifinal A BSL Nation Wars 2 - Grand Finals - Saturday 21:00
Strategy
[G] How to get started on ladder as a new Z player Creating a full chart of Zerg builds [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Grand Theft Auto VI Nintendo Switch Thread What do you want from future RTS games? Battle Aces/David Kim RTS Megathread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread TL Mafia Plays: Diplomacy TL Mafia: Generative Agents Showdown Survivor II: The Amazon
Community
General
Russo-Ukrainian War Thread US Politics Mega-thread Ask and answer stupid questions here! Iraq & Syrian Civil Wars UK Politics Mega-thread
Fan Clubs
Serral Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread [Books] Wool by Hugh Howey
Sports
2024 - 2025 Football Thread NHL Playoffs 2024 NBA General Discussion Formula 1 Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List TL.net Ten Commandments
Blogs
Why 5v5 Games Keep Us Hooked…
TrAiDoS
Info SLEgma_12
SLEgma_12
SECOND COMMING
XenOsky
WombaT’s Old BW Terran Theme …
WombaT
Heero Yuy & the Tax…
KrillinFromwales
BW PvZ Balance hypothetic…
Vasoline73
Racial Distribution over MMR …
Navane
Customize Sidebar...

Website Feedback

Closed Threads



Active: 13859 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 6h 47m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
UpATreeSC 264
BRAT_OK 74
MindelVK 27
EmSc Tv 15
StarCraft: Brood War
Calm 6865
Stork 571
Snow 531
Mini 494
Light 431
firebathero 384
ZerO 288
Rush 183
Dewaltoss 176
hero 126
[ Show more ]
Nal_rA 112
PianO 96
Aegong 56
Sharp 47
sSak 45
Hyun 35
GoRush 29
Rock 29
Shinee 27
Terrorterran 21
JulyZerg 19
Movie 18
IntoTheRainbow 17
scan(afreeca) 13
HiyA 12
ajuk12(nOOB) 6
Sexy 4
Dota 2
Gorgc7620
qojqva2933
Dendi1204
XcaliburYe211
LuMiX1
Counter-Strike
ScreaM2379
edward169
Super Smash Bros
C9.Mang0123
Heroes of the Storm
Khaldor250
Other Games
hiko1505
Beastyqt868
FrodaN859
ceh9702
KnowMe102
Trikslyr61
QueenE53
ZerO(Twitch)15
Organizations
StarCraft 2
ESL.tv151
EmSc Tv 15
EmSc2Tv 15
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• StrangeGG 105
• poizon28 39
• Kozan
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Nemesis7743
• Jankos1755
• TFBlade1073
Other Games
• imaqtpie737
• WagamamaTV438
• Shiphtur265
Upcoming Events
Replay Cast
6h 47m
GSL Code S
16h 17m
Classic vs Reynor
GuMiho vs Maru
The PondCast
16h 47m
RSL Revival
1d 5h
GSL Code S
1d 16h
herO vs TBD
TBD vs Cure
OSC
2 days
Korean StarCraft League
2 days
RSL Revival
2 days
SOOP
3 days
HeRoMaRinE vs Astrea
Online Event
3 days
Clem vs ShoWTimE
herO vs MaxPax
[ Show More ]
Sparkling Tuna Cup
3 days
WardiTV Invitational
3 days
Percival vs TriGGeR
ByuN vs Solar
Clem vs Spirit
MaxPax vs Jumy
RSL Revival
3 days
Wardi Open
4 days
Monday Night Weeklies
4 days
Replay Cast
6 days
The PondCast
6 days
Liquipedia Results

Completed

BSL Nation Wars Season 2
PiG Sty Festival 6.0
Calamity Stars S2

Ongoing

JPL Season 2
ASL Season 19
YSL S1
BSL 2v2 Season 3
BSL Season 20
China & Korea Top Challenge
KCM Race Survival 2025 Season 2
2025 GSL S1
Heroes 10 EU
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025
ESL Pro League S21

Upcoming

NPSL S3
CSLPRO Last Chance 2025
CSLAN 2025
K-Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Bellum Gens Elite Stara Zagora 2025
2025 GSL S2
DreamHack Dallas 2025
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 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.