Forums / Developer / problem with looooonnnggg words in my forum

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

eZ debug

Timing: Jan 18 2025 11:18:41
Script start
Timing: Jan 18 2025 11:18:41
Module start 'content'
Timing: Jan 18 2025 11:18:41
Module end 'content'
Timing: Jan 18 2025 11:18:42
Script end

Main resources:

Total runtime0.8237 sec
Peak memory usage4,096.0000 KB
Database Queries201

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0092 587.8516180.8125
Module start 'content' 0.00920.6747 768.6641632.9531
Module end 'content' 0.68390.1397 1,401.6172337.3672
Script end 0.8237  1,738.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.5848210.0002
Check MTime0.00150.1797210.0001
Mysql Total
Database connection0.00130.159010.0013
Mysqli_queries0.734089.10442010.0037
Looping result0.00220.27001990.0000
Template Total0.791396.120.3956
Template load0.00280.340620.0014
Template processing0.788595.718520.3942
Template load and register function0.00020.023910.0002
states
state_id_array0.00090.107210.0009
state_identifier_array0.00090.104920.0004
Override
Cache load0.00240.2901280.0001
Sytem overhead
Fetch class attribute can translate value0.00160.195250.0003
Fetch class attribute name0.00130.156260.0002
XML
Image XML parsing0.00150.177650.0003
class_abstraction
Instantiating content class attribute0.00000.001360.0000
General
dbfile0.00580.7091330.0002
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0003 secs