Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Navigation
Latest Addons
AD Gallery 60
SyntaxHighlighte... 51
Newsletters v4.03 112
Facebook Like Box 130
Newsletters v4.02 58
Metro 165
Facebook Connect 171
Shoutbox Panel 128
Redactor for PHP... 107
MI Floating Side... 109
Facebook Login/R... 154
Avatar Studio v2.03 180
Relationship Sta... 98
Sexual Orientati... 116
Fisherman 144
Popular Addons
iTheme2 5807
Arise 5793
User Control v1.23 4622
Event Calendar 4052
Photowidget panel 3888
Radio-Theme red2... 3358
Highslide Gallery 3315
CSS/JavaScript D... 3234
Facebook Connect... 2987
Dynamic Menu 2894
Slideshow Lightb... 2723
L-AMANT 2659
Enigma 2637
2Dark 2607
Black 2580
View Thread
Official Home of PHP-Fusion » General Addon and Modification Support » Themes Support
Who is here? 1 guest(s)
 Print Thread
expanding table problems
exe_work
Hello,

Creating new theme I encountered with weird problem:
i created theme structure, it looks like this:
img823.imageshack.us/img823/4941/beforei.jpg
The theme.php and Style.css code I include later on this msg. anyway it works perfectly Smile however, the problem is then I try to type long continues text or long weblink (for example : abcabcabc... or http://www.php-fu...111111.... ) in forum, news, custom pages etc if that text reaches the width limit of the forum table, news table (in this case it's 623px), it still keeps expanding in the same line instead of autotransfering into new line. So it looks like this:
img4.imageshack.us/img4/9633/afterdm.jpg
Could someone help me to find where is that mistake and correct it : ) I tryed myself however I haven't found it yet Sad
Edited by exe_work on 23-04-2011 09:26
 
smokeman
Hi.

I can't really test it self without the complete theme-files/images - but try with this attached theme.php
smokeman attached the following file:
theme_and_style.zip [3.77kB / 53 Downloads]

 
http://www.phpfusion-tips.dk/
GMUDuckman
you can try the following for that div's css

word-wrap: break-word;

but you have to make sure white-space: normal;
if you have white-space: nowrap;
then the above won't work

css3 supports the following
word-break:hyphenate;

where it will actually hyphenate a broken word.
i know css3 isn't supported in alot of browsers... i think word-wrap: break-word is though
 
exe_work
Smokeman thx for trying Smile to bad that wouldn't helped :/
well I could send you personally all files via msg, if you think that it can help for investigation.

At the moment trying "GMUDuckman" suggestion Smile
GMUDuckman, that line "white-space: normal; word-wrap: break-word;" i have to use in theme.php continent place, or in style.css ? Smile
Edited by exe_work on 22-04-2011 15:06
 
GMUDuckman
your theme's style css. i think it has to go in the
.main-body
to cover news and articles

.forum_thread_user_post

to cover forum posts.

you may have to play around with it though.
 
exe_work
Yeah, tryed to created on style.css added
white-space: normal;
word-wrap: break-word;
to .main-body { } and created new .
.forum_thread_user_post { white-space: normal;
word-wrap: break-word; }
, but it still doesn't work.. Sad it's like some kind of mistery.. Shock
 
GMUDuckman
you can try this
http://www.css3.c...ord-break/
but that only works in css3
 
exe_work
I think i found the solution. In viewthread.php line~267
Download source  Code
echo nl2br($message);



i change to
Download source  Code
$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";


, and finaly it works ! :) case closed. Thx for support guys. (60 is the letter count, it can be change to your needs)
 
Mangee
I just put a large line of " a " on the new theme Modern10 on 7.02.00 and there is no word wrap.

It just truncates the line. This was in a news article on home page.

I then tried Gillette on 7.01.05 and it just pushed the right side off the screen.

Same problem ????
Mangee's Conversions

Convert
 
http://fusionfusion.net/
exe_work
Mangee, i used it only for forum msg! :) (I already tested on few themes running 7.01.5 fusion)
Yet i didn't try to investigate solution for news and artickles so far :) ..

Anyway after longer test i saw that
Download source  Code
$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";


cuts not only simple too long words like "aaaaaaaaae..." but smiles, font , img codes too ;/ after that smiles, font effects on msg is displayed as a simple text ;/ (style='vertical-align:middle;' /> src='../images/smiley/frown.gif' alt='Frown'
style='vertical-align:middle;' />
so for this code needs an upgrade. Maybe someone could help to include for this code
Download source  Code
$message = wordwrap($message,60, "n", true);
echo "<div class='post_message' >";
echo nl2br($message);
echo "</div>";


an exeptions "http://yoursite/" and "www.yoursite" "src='../images/smiley/frown.gif'" (i think then img, scr, and smiles, should be displayed :) )
Edited by exe_work on 22-04-2011 20:22
 
Mangee
Doing some searching CSS 2.1 does not have a fix for very long words to cause them to wrap at the end of content area except for a few browsers and that depends on version.

Most info points to a server side code fix, example

http://stackoverf...ext-in-css

look for " insert the shy-hyphens " or " javascript " .

Next wait for full browser support of CSS3 http://www.w3.org...#word-wrap.

Info for exe_work. Most of the changes you made to Gillette aren't needed. Look at http://fusionfusi...t/news.php and pick Gillette. A div wrapper and some small code changes gets your sizes of panels. You could even code a tableless theme like Atlantis to do the same.
Edited by Mangee on 22-04-2011 23:05
Mangee's Conversions

Convert
 
http://fusionfusion.net/
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Autoresize table? Content Administration 24 18-05-2013 08:17
Wrong table name votes Roadmap 3 13-05-2013 12:15
Problems Login System Administration 1 09-05-2013 11:41
How to make a points/league table Panels and Infusions 2 01-05-2013 14:31
Mail problems Suspected Bugs and Errors 1 20-04-2013 16:31
Official Home of PHP-Fusion uses cookies. Some may already have been set. Read more about our Cookies here.
Please click the button I Consent Cookies to hide this bar and accept our cookies. If you continue to use the site with no action taken, we'll assume that you consent our cookies anyway.
Cookiebar Panel byVenue