[mythtv-users] Possible bug in MythWeb w/Konqueror

Edward Wildgoose Edward.Wildgoose at FRMHedge.com
Wed Oct 15 11:20:29 EDT 2003


> > Agreed.  Ideally you would want to set just a max width.

> yeah, ideally...

> >  Is this possible?

> Not that I know of.   anyone?

OK, so workaround would be to manually add line breaks roughly every "X" characters I suppose.  

So perhaps feed it through an "AddLineBreaks" function..?(in no pseudo php...):

sub AddLineBreaks (string unprocessed, int chompEveryX) {
	string processed;
	processed = '';

	while (len(unprocessed) < chompEveryX) {
		int nextSpace;
		nextSpace = find(unprocessed, ' ', chompEveryX);
		processed = left(unprocessed, nextSpace) . "\r\n";
		unprocessed = right(unprocessed, len(unprocessed) - nextSpace);
	}

	' Add in any leftover bit
	processed = processed . unprocessed;
}

Actually thinking about it, this needs to be slightly refined to be fed whole lines only.  Is it easy in php to split the paragraph into seperate lines, then whack each line through the line breaker and then fold it all back together again?

Ed W



More information about the mythtv-users mailing list