• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 21:00
CEST 03:00
KST 10:00
  • 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 RO12 Preview: Maru, Trigger, Rogue, NightMare12Code S RO12 Preview: Cure, sOs, Reynor, Solar15[ASL19] Ro8 Preview: Unyielding3Official Ladder Map Pool Update (April 28, 2025)17[ASL19] Ro8 Preview: Rejuvenation8
Community News
Maru & 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$1,250 WardiTV May [May 6th-May 18th]5Clem wins PiG Sty Festival #67
StarCraft 2
General
Map Pool Suggestion: Throwback ERA How does the number of casters affect your enjoyment of esports? Maru & Rogue GSL RO12 interviews: "I think the pressure really got to [trigger]" Code S Season 1 - Maru & Rogue advance to RO8 Clem wins PiG Sty Festival #6
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament [GSL 2025] Code S:Season 1 - RO12 - Group B [GSL 2025] Code S:Season 1 - RO12 - Group A $1,250 WardiTV May [May 6th-May 18th] SOOPer7s Showmatches 2025
Strategy
[G] PvT Cheese: 13 Gate Proxy Robo Simple Questions Simple Answers
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
Battlenet Game Lobby Simulator Twitch StarCraft Holiday Bash (UMS) Artosis vs Ogre Zerg [The Legend Continues] BGH auto balance -> http://bghmmr.eu/ Why is nobody talking about game 1 of SK vs Rush?
Tourneys
[ASL19] Ro8 Day 4 [USBL Spring 2025] Groups cast [BSL20] RO32 Group F - Saturday 20:00 CET [BSL20] RO32 Group E - Sunday 20:00 CET
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 What do you want from future RTS games? Nintendo Switch Thread Grand Theft Auto VI 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
Canadian Politics Mega-thread US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread UK Politics Mega-thread
Fan Clubs
Serral Fan Club
Media & Entertainment
Movie Discussion! Anime Discussion Thread [Books] Wool by Hugh Howey Surprisingly good films/Hidden Gems
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
Test Entry for subject
xumakis
Customize Sidebar...

Website Feedback

Closed Threads



Active: 13135 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 9h
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
NeuroSwarm 160
Ketroc 137
RuFF_SC2 100
Nina 22
StarCraft: Brood War
Sexy 27
Icarus 6
Counter-Strike
Fnx 603
Super Smash Bros
Mew2King100
Heroes of the Storm
Khaldor230
Other Games
summit1g10200
FrodaN3719
shahzam747
JimRising 646
ViBE278
C9.Mang0228
Maynarde204
AZ_Axe84
Organizations
StarCraft 2
ESL.tv146
CranKy Ducklings121
Other Games
BasetradeTV49
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 14 non-featured ]
StarCraft 2
• RyuSc2 72
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki53
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
Other Games
• Scarra1335
• WagamamaTV215
Upcoming Events
Afreeca Starleague
9h
BeSt vs Light
Wardi Open
10h
Replay Cast
23h
Replay Cast
1d 9h
Afreeca Starleague
1d 9h
Snow vs Soulkey
WardiTV Invitational
1d 10h
PiGosaur Monday
1d 23h
GSL Code S
2 days
ByuN vs Rogue
herO vs Cure
Replay Cast
2 days
GSL Code S
3 days
Classic vs Reynor
GuMiho vs Maru
[ Show More ]
The PondCast
3 days
RSL Revival
3 days
GSL Code S
4 days
Korean StarCraft League
5 days
RSL Revival
5 days
SOOP
5 days
Online Event
6 days
Clem vs ShoWTimE
herO vs MaxPax
Sparkling Tuna Cup
6 days
WardiTV Invitational
6 days
RSL Revival
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.