View Single Post
Old 10-30-2007, 12:01 AM   #7 (permalink)
Dorza
The Wanderer
 
Join Date: Sep 2007
Location: Wales - UK
Posts: 8
Thanks: 0
Dorza is on a distinguished road
Default

That was very generous of you to do that salathe. I got it working, after some tinkering. I'm now working on adding the prev - next links back in. I will post the finalized script in the coming days. Thanks again for that script it works a charm.

Oh when I say it works a charm, there is one slight problem. It appears that if there is a string before any <h5> tag then the script won't split the content into a new page for some reason, so all <h5> tags must be on a new line. For example the below string produces just two pages when really it should be three...
Code:
$azArticle = "<h5>page 1</h5>page one content
              <h5>page 2</h5>page two content<h5>page 3</h5>page three content";
Yet this example would produce the desired three pages...
Code:
$azArticle = "<h5>page 1</h5>page one content
              <h5>page 2</h5>page two content
              <h5>page 3</h5>page three content";
I changed $azArticle to = $cont['cont_body'] which comes from my db and it refused to split content into more than one page and instead put all the pages into page 1. Its because of the reasoning above. But due to the way my text editor (tinyMCE) places data into the db there is no practical way from me to sort it out.
Dorza is offline  
Reply With Quote