problem with looooonnnggg words in my forum

Author Message

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 browsers
http://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:)

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:04:48
Script start
Timing: Jan 18 2025 16:04:48
Module start 'layout'
Timing: Jan 18 2025 16:04:48
Module start 'content'
Timing: Jan 18 2025 16:04:49
Module end 'content'
Timing: Jan 18 2025 16:04:49
Script end

Main resources:

Total runtime1.0089 sec
Peak memory usage4,096.0000 KB
Database Queries64

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 588.0469152.6406
Module start 'layout' 0.00890.0042 740.687539.4766
Module start 'content' 0.01310.9942 780.1641627.8594
Module end 'content' 1.00730.0016 1,408.023412.1250
Script end 1.0089  1,420.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.3096160.0002
Check MTime0.00130.1308160.0001
Mysql Total
Database connection0.00050.051310.0005
Mysqli_queries0.952494.3961640.0149
Looping result0.00070.0661620.0000
Template Total0.970396.220.4851
Template load0.00190.192020.0010
Template processing0.968395.978420.4842
Template load and register function0.00020.016510.0002
states
state_id_array0.00090.093610.0009
state_identifier_array0.00110.112620.0006
Override
Cache load0.00160.1556280.0001
Sytem overhead
Fetch class attribute can translate value0.00050.053240.0001
Fetch class attribute name0.00100.099160.0002
XML
Image XML parsing0.00110.110240.0003
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00270.2699220.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs