This is a discussion on RE: [PHP] splitting content into pages within the PHP General forums, part of the PHP Programming Forums category; Evan Nemerson <mailto:evan@coeus-group.com> on Wednesday, July 30, 2003 7:17 PM said: > Is ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Evan Nemerson <mailto:evan@coeus-group.com>
on Wednesday, July 30, 2003 7:17 PM said: > Is there a reason this can't be solved with a CSS background-repeat: > repeat-y; ? Or is download time of individual pages an issue? That can look funny of course if the picture doesn't tile well. > The math is going to vary > depending on each user's settings- which font is used, the size of > the font, random browser stupidity, etc. Even if you try to specify > such things, you'll have issues. Too true. > If you try to use a specific font, > what if the user doesn't have it? What if they have vision problems > and have ordered fonts to be larger than usual? Right again. > IMHO it would be > better to just use CSS and put everything on the same page But the problem with this is that people don't like really long pages. It makes them (I've read this in a few places and I know I feel this way) feel like it's going to take forever to read a really long article instead of maybe five "screen length" pages. I think pages are a good idea for long articles but I agree that it's a sticky situation to try and accomate everyone, especially with the original posters requirements (wants more than one page because of the background). Chris. |
|
|||
|
Excellent point. A compromise, then?
How about using the background-repeat: repeat-y; and not trying to do any math. Just decide how long the content should be, and wrap the page at the next sentence. That way, you make the end users happy, but don't risk an ugly page. For 150 characters, (untested) <style type="text/css"> background-repeat: repeat-y; </style> </head> <body> <p> <?php $x = 150; while ( $c != '.' ) $c = substr($str, $x, 1); echo substr($str, 0, $x); echo "</p><p><a href=\"popup.php?startchar=$x\">Next page</a></p>"; ?> </body> On Wednesday 30 July 2003 07:44 pm, Chris W. Parker wrote: > Evan Nemerson <mailto:evan@coeus-group.com> > > on Wednesday, July 30, 2003 7:17 PM said: > > Is there a reason this can't be solved with a CSS background-repeat: > > repeat-y; ? Or is download time of individual pages an issue? > > That can look funny of course if the picture doesn't tile well. > > > The math is going to vary > > depending on each user's settings- which font is used, the size of > > the font, random browser stupidity, etc. Even if you try to specify > > such things, you'll have issues. > > Too true. > > > If you try to use a specific font, > > what if the user doesn't have it? What if they have vision problems > > and have ordered fonts to be larger than usual? > > Right again. > > > IMHO it would be > > better to just use CSS and put everything on the same page > > But the problem with this is that people don't like really long pages. > It makes them (I've read this in a few places and I know I feel this > way) feel like it's going to take forever to read a really long article > instead of maybe five "screen length" pages. > > I think pages are a good idea for long articles but I agree that it's a > sticky situation to try and accomate everyone, especially with the > original posters requirements (wants more than one page because of the > background). > > > > Chris. -- "He died in AD 33. Get over it." |
|
|||
|
ok i have an idea , i have a solution which may work i dont know just yet ,
ok say the strlen of the entire content is 1675 , the strlen of the content up to the last paragraph is 1300 , how can i substr this to get the next block of text from 1300 and also increment if there is more pages ?? > Evan Nemerson <mailto:evan@coeus-group.com> > on Wednesday, July 30, 2003 7:17 PM said: > >> Is there a reason this can't be solved with a CSS background-repeat: >> repeat-y; ? Or is download time of individual pages an issue? > > That can look funny of course if the picture doesn't tile well. > >> The math is going to vary >> depending on each user's settings- which font is used, the size of the >> font, random browser stupidity, etc. Even if you try to specify such >> things, you'll have issues. > > Too true. > >> If you try to use a specific font, >> what if the user doesn't have it? What if they have vision problems >> and have ordered fonts to be larger than usual? > > Right again. > >> IMHO it would be >> better to just use CSS and put everything on the same page > > But the problem with this is that people don't like really long pages. > It makes them (I've read this in a few places and I know I feel this > way) feel like it's going to take forever to read a really long article > instead of maybe five "screen length" pages. > > I think pages are a good idea for long articles but I agree that it's a > sticky situation to try and accomate everyone, especially with the > original posters requirements (wants more than one page because of the > background). > > > > Chris. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php |