Forums / Developer / problem with looooonnnggg words in my forum
asdsad asdsadsa
Friday 10 September 2004 4:47:24 am
When user post very long word in my forum, this word broke site design. Is it possible to get words with length > $max_symbols and separate it.I mean something like this:
user post this:"Test post hohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohoho"
after publication, this "hohoho" string must look like this:"Test post hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh hohohohohohohohoh"
Or something else?10x in advance and sorry for my english :-)
Ole Morten Halvorsen
Tuesday 14 September 2004 2:19:51 am
First, if you are going to post in the forum please select a real name.
eZ publish does not have this kind of functionality, only a shorten operator ( http://www.ez.no/ez_publish/documentation/reference/template_operators/strings/shorten ). In order to achieve this you would need to create a custom template operator in PHP.
Senior Software Engineer - Vision with Technology http://www.visionwt.com http://www.omh.cc http://www.twitter.com/omh eZ Certified Developer http://ez.no/certification/verify/358441 http://ez.no/certification/verify/272578
Frederik Holljen
Tuesday 14 September 2004 2:39:58 am
Even with such an operator you can not guarantee that the design won't be broken since people can override fonts and font sizes in their browser. In theory this means that the font size could be unlimited which will break any design.
Bruce Morrison
Tuesday 14 September 2004 3:14:38 am
I believe you may be able to do this with some CSS. Unfortinually it's not a part of the CSS stadards supported by the main browsers.
This apparently works in ie5.5+
word-wrap: break-word;
This link seems to show methods for a range of browsershttp://forums.techguy.org/archive/index.php/t-249849.html
This problem actually happens quite a bit in the ez forums (using mozilla). (I just turn off the styles and all is well again:)
CheersBruce
My Blog: http://www.stuffandcontent.com/ Follow me on twitter: http://twitter.com/brucemorrison Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish