Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: auto create new pages as thread grows

  1. #1
    Join Date
    Apr 2010
    Location
    University of Illinois
    Posts
    86
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default auto create new pages as thread grows

    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

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    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

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    I am Abby (05-17-2010)

  4. #3
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    This is called pagination. Try google or http://php-mysql-tutorial.com (see the article on pagination).
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. The Following User Says Thank You to djr33 For This Useful Post:

    I am Abby (05-17-2010)

  6. #4
    Join Date
    Apr 2010
    Location
    University of Illinois
    Posts
    86
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default

    Thanks guys.

    Pagination - I knew there had to be a word for that.
    And thanks Beverleyh for the links

  7. #5
    Join Date
    Apr 2010
    Location
    University of Illinois
    Posts
    86
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default

    All the pagination samples and examples I find are PHP & MYSql.
    Is it possible to do this with PHP & simpleXML?

  8. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  9. #7
    Join Date
    Apr 2010
    Location
    University of Illinois
    Posts
    86
    Thanks
    13
    Thanked 2 Times in 2 Posts

    Default

    I came so close to getting everything I wanted with just xml. Oh well, time to build me a db. Thanks!

  10. #8
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  11. #9
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    To choose the lesser of two evils is still to choose evil. My personal site

  12. #10
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •