Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5
Author Message
ashishjha54
Hangin' Around



Joined: Jan 24, 2005
Posts: 41

PostPosted: Sat May 07, 2005 11:03 am Reply with quote

hi ,
i am having a problem which you must have noticed.whenever a user submits a news to my site ,and if the news contain long sentences and lines ,it just distorts the view of my site when it is published.i want the long lines to be cut to next lines so that it does not distort the look.how should i do this?
thanks.
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Sat May 07, 2005 6:26 pm Reply with quote

That sounds more like a theme issue. Try a default theme like DeepBlue or Sand_Journey. Does it still distort it?
 
View user's profile Send private message
ashishjha54







PostPosted: Sat May 07, 2005 7:51 pm Reply with quote

yes, it happens with all the themes.
 
ashishjha54







PostPosted: Sat May 07, 2005 7:56 pm Reply with quote

i have already submitted a long lines news to you.
test it and tell me
 
Raven







PostPosted: Sat May 07, 2005 10:25 pm Reply with quote

In modules/News/index.php, in the function theindex(), try changing
Code:
   $hometext = $row[hometext];

   $bodytext = $row[bodytext];

to
Code:
   $ww = 95;

   $hometext = nl2br(wordwrap($row[hometext],$ww,"\n",1));
   $bodytext = nl2br(wordwrap($row[bodytext],$ww,"\n",1));


The $ww = 95; is the width that you will force all lines to. This is really ugly but I don't know of any other quick/easy way. Why are you faced with this problem? Are people intentionally trying to mess up your site? The only reason the test you sent me causes the problem is because of the long word, not long sentences. Regardless, you could enhance this by determining the browser width and then assigning the $ww value based on that. Or, you could break the story into words, check the length of each word, and then only chunk up that word, and then reassemble the story.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©