Bluehost.com Web Hosting $6.95

RE: [PHP] splitting content into pages

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-31-2003
Chris W. Parker
 
Posts: n/a
Default RE: [PHP] splitting content into 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.
Reply With Quote
  #2 (permalink)  
Old 07-31-2003
Evan Nemerson
 
Posts: n/a
Default Re: [PHP] splitting content into pages

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."


Reply With Quote
  #3 (permalink)  
Old 07-31-2003
daniel@electroteque.org
 
Posts: n/a
Default RE: [PHP] splitting content into pages

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




Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:09 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0