View Full Version : auto create new pages as thread grows
I am Abby
05-17-2010, 12:42 PM
I need for my script to create new pages as my thread grows...like what will happen here if enough people reply to this message.
Is there a script posted somewhere for this?
thanks
Beverleyh
05-17-2010, 03:38 PM
Maybe this script? http://www.easyphpscripts.com/?Page=EasyPHPNews
It's a news posting script but it has pagination on the page that displays summaries, which might be suitable for your needs.
Here's one usage example of it: http://demo.jemcon.org/articles_plugin.php
And another: http://www.jemcon.org/news.php
djr33
05-17-2010, 03:44 PM
This is called pagination. Try google or http://php-mysql-tutorial.com (see the article on pagination).
I am Abby
05-17-2010, 04:21 PM
Thanks guys.
Pagination - I knew there had to be a word for that.
And thanks Beverleyh for the links
I am Abby
05-17-2010, 04:41 PM
All the pagination samples and examples I find are PHP & MYSql.
Is it possible to do this with PHP & simpleXML?
djr33
05-17-2010, 05:07 PM
In MySQL it's easy because you can search for a set of rows from 1-10 or 11-20, etc. In XML it won't be so easy, but you can certainly do it.
The only way that I can think of doing it (since PHP/XML doesn't have a way to search for specific rows) is to loop through until the starting number then output until the stopping number. It's basically the same logic, but less efficient.
You'll also need to count how many rows there are, by the way. (I think count() may do this, but depends on how it's reading the xml.)
I am Abby
05-17-2010, 05:37 PM
I came so close to getting everything I wanted with just xml. Oh well, time to build me a db. Thanks!
djr33
05-17-2010, 05:41 PM
It IS possible, but I'm not going to recommend against the database: you will save yourself work in the end (for this, and for every other thing you want to add to it in the future). XML has its uses, but databases are always better for dynamic organization, searching and manipulation.
james438
05-17-2010, 11:35 PM
Out of curiosity, why weren't the following DD scripts mentioned?
http://www.dynamicdrive.com/dynamicindex17/ajaxpaginate/index.htm
http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm
djr33
05-17-2010, 11:55 PM
I read this as actually relating to a forum thread-- thus not really allowing for Javascript.
But if this is for a project that can be done like that, those are very useful. Depends on the setup.
james438
05-18-2010, 05:34 AM
I was pretty sure there was a reason why they weren't mentioned, but wasn't sure, ;).
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.