Silly problem (Run on text) (solved)

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

Silly problem (Run on text) (solved)

Postby Pirate Elf » Thu Feb 23, 2006 9:24 pm

Question: How would I go about breaking severely long run-on text? My site uses tables as it's basic means of display and sometimes I have posters that prefer to type things like:

Code: Select all
CCCCCCCRRRRRAAAAAAZZZZZYYYYYLLLLOOOOOONNNNNNGGGGGTTTTTEEEEXXXXTTTTTT


This makes my entire page break it's width command and I was wondering a generic way to break the text before it ruins the table. I know I could ask them not to do it, but that would be harder than just coding a method that would allow me to brek the text after say 60chars or so.

Any help is greatly appreciated
Last edited by Pirate Elf on Sun Feb 26, 2006 6:27 am, edited 3 times in total.
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby SrNupsen » Thu Feb 23, 2006 9:54 pm

Maybe this might work?

SrNupsen
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Pirate Elf » Thu Feb 23, 2006 10:43 pm

hmmm.. I am not the grand poomba of css and just can't seem to figure where this is going wrong:

Code: Select all
.maintext a:link {color: silver; font-style: italic; font-weight: bold;}
.maintext a:visited {color: silver;}
.maintext a:hover {text-decoration: underline overline; color: purple;}
.maintext a:{active color: purple;}

.maintext{
   font-size: 1.0em;
   font-family: Tahoma, Verdana, Arial, sans-serif;
   margin-bottom: 0.2em;
   margin-right: 0.2em;
   margin-left: 0.2em;
   color: silver;
   text-wrap: auto;
    wrap:auto;
   text-align: justify}


Basically I want the text to word wrap, bold and italicize just my field_text and not mess with anything else on the page.. I just can't seem to figure out how to do it without defining the table width which I don't do. I use percentages. So any of you css gurus got an idea for me?
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby faithless » Fri Feb 24, 2006 12:28 am

To the best of my knowledge, word wrap doesn't wrap long words. Only sentences.
faithless
 
Posts: 1335
Joined: Wed Oct 16, 2002 4:17 pm
Location: Infront of the Computer

Postby Pirate Elf » Fri Feb 24, 2006 3:13 am

:-( Well then it's back to the drawing board. This has been a problem for me since my wee days of the net and I still have not found a good solution..
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby Parahead » Fri Feb 24, 2006 7:35 am

Do you have access to the text before publishing it? I mean, is it text you input through Coranto? If so, maybe you could add some Perl into the equation...

Hint: the shoutbox we discussed in this thread which I also sent you included code to break up long words. Basically for the very same reason of not breaking up a small table...
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby SrNupsen » Fri Feb 24, 2006 8:15 am

I never tried it, but this sentence:

break-word
An unbreakable 'word' may be broken at an arbitrary point if there are no otherwise-acceptable break points in the line. Shaping characters are still shaped as if the word were not broken, and grapheme clusters must stay as one unit.


What does it actually mean? I know English isn't my native language, but... I thought it was saying that things like TOOSTUPIDVERYLONGWORDNOTWANTEDHERE would be broken?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Pirate Elf » Fri Feb 24, 2006 8:51 am

Parahead wrote:Do you have access to the text before publishing it? I mean, is it text you input through Coranto? If so, maybe you could add some Perl into the equation...

Hint: the shoutbox we discussed in this thread which I also sent you included code to break up long words. Basically for the very same reason of not breaking up a small table...


:oops: :oops: That code went the way of bits and data due to a recent wipe :cry: Yes I have access to the input through coranto. It's actually going to be a mock-up of Field_Text. I figured a perl solution was going to be my route, but trying to train for my current job and having to restart college from scratch thanks to a dodgy school, my perl learning is not up to par at this moment.

(BTW if you still have my email would you please send me a copy of the copy of yours) I still have all my frame work for what I intended to do, but don't seem to have your original. :oops:
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby Parahead » Fri Feb 24, 2006 9:26 am

Well, if you are only interested in the long word splitting function maybe you could use the solution from this thread, which for some strange reason covers exactly this question? ;-)
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Pirate Elf » Fri Feb 24, 2006 6:48 pm

LMFAO! I have got to stop running myself haggard... I knew it would take perl code and just... dahh!! Once again thanks! I think I am going to invest in a laptop or a palm pilot or something because burning the candle from both ends obviously makes me stupid. LOL!
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby Parahead » Fri Feb 24, 2006 9:12 pm

You are welcome (again)... :lol:
Yes, I am still around...
www.parahead.com/coranto/
User avatar
Parahead
 
Posts: 4837
Joined: Fri Jan 12, 2007 8:54 pm
Location: Stockholm - Sweden

Postby Pirate Elf » Sat Feb 25, 2006 9:58 am

Indeed thank you once more. I know you get tired of saving the day! LOL!

:cheers:
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm

Postby Pirate Elf » Sun Feb 26, 2006 6:14 am

What would cause this:

Code: Select all
DE:                AWESSOOOOOOOOOO OOOOOOOOOOOOOOO OOOOOOOOOOOOOOO MEEEEEEEEEEEEEE EEEEEEEEEEEE!!!!!!


Using the code provided It seems to add a blank space at the beginning of the long words and I was wondering which variable if there is one that will make it not do that

I used this:
Code: Select all
$max_word_length = 20;
$preferred_word_length = 15;
$punish_length = 0;


*sigh* never mind the font was causing that for some reason
Nichts ist für dich
Nichts war für dich
Nichts bleibt für dich
Für immer
Pirate Elf
 
Posts: 732
Joined: Wed Jan 31, 2007 9:45 pm


Return to Customization

Who is online

Users browsing this forum: No registered users and 4 guests

cron