11
PTlooker
Re: [code] dont respect width
  • 2005/6/24 11:52

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Thanks Mith with workd, but i get a horizonal scroll..how can i do it to dont have..i mean i have that space with some wistg and then goes autom. to the above line... like quote does with normal text...
Thanks in advance!

12
Peekay
Re: [code] dont respect width
  • 2005/6/24 14:30

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I haven't tried this, but you could try:
div.xoopsCode {
word-wrap: break-word ;
}

If you wanted unbroken lines of text to wrap in the input form too, I think you would need to modify the form, like comment_new.php for example, and change:

<textarea id='com_text'...

to
<textarea id='com_text' wrap='physical'...
A thread is for life. Not just for Christmas.

13
Peekay
Re: [code] dont respect width
  • 2005/6/24 15:38

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I tried the CSS. It didn't work for me.

I did a little more digging and read that adding the wrap='hard' param to the textarea should wrap the text and send line breaks to the server. It requires a code hack to test it though and I'm out of time. I'll try later today unless anyone else cracks the problem in the meantime.
A thread is for life. Not just for Christmas.

14
PTlooker
Re: [code] dont respect width
  • 2005/6/24 16:06

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


Ok, thanks a lot i will wait so... i think that this will be a good improvment to XOOPS next version...btw my css code is like this now:

div.xoopsCode
{
    
background#FFFFFF;
    
border1px inset #336699;
    
font-family"Courier New",Courier,monospace;
    
padding0px 6px 6px 6px;
    
width450px;
    
overflowauto;
    
word-wrap: break-word;
}


Waiting for a solution a thank you all one more time

15
Peekay
Re: [code] dont respect width
  • 2005/6/24 16:12

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


Apparently, there is also a PHP string function that might do it:
$wrappedText wordwrap($text80"<br>n"1);

That's a hack too deep for me to try I'm afraid!

It was a good question though. I too will be interested to see if it can be solved.
A thread is for life. Not just for Christmas.

16
PTlooker
Re: [code] dont respect width
  • 2005/6/24 16:15

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


I don-t know where to put this code... and do i let me css class like it is now?
Thank you for your time

17
Peekay
Re: [code] dont respect width
  • 2005/6/24 16:27

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The PHP code would need to be added to core files somewhere I guess. I don't know where to put it either!

Your CSS looks fine to me.
A thread is for life. Not just for Christmas.

18
panigrc
Re: [code] dont respect width
  • 2005/6/25 8:37

  • panigrc

  • Not too shy to talk

  • Posts: 133

  • Since: 2005/4/14


Is this possible for links too ??

I mean if the links are longer than the site's width then it should be wrapped.
[size=xx-small]X-Park Greek Pc Modding Community
Official Greek Support at XoopsGreece.gr[/size]

19
PTlooker
Re: [code] dont respect width
  • 2005/6/25 13:03

  • PTlooker

  • Just can't stay away

  • Posts: 447

  • Since: 2003/6/15


So, Peekay or any other who could help... how can i do?
Thanks in advance!

20
Peekay
Re: [code] dont respect width
  • 2005/6/25 17:12

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


I will try and test the PHP in the next few days. I'll post here if it does, or doesn't work.

I agree with panigrc that long links are a pain too, but I think forcing HTML linebreaks to get them to wrap (which is what the PHP does) would break the URL?.

Of course, the same can be said of any code, so there is a trade-off between preserving your site layout and preserving the data. At the end of the day, the scrolling box may be the best solution.
A thread is for life. Not just for Christmas.

Login

Who's Online

162 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 162


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits