Automatically adding newpage to posts

Our current CMS automatically determines where to drop page breaks on long articles. I know you can embed <!--newpage--> into a page to split an article into pages, but is there anything that will do this automatically when an article is displayed?

On a similar topic, secondary pages have weird URLs in WPMU. It looks like you can have a ...mypage.html and then the second page is ...mypage.html/2, which just seems strange. Is there a way to configure WPMU to make that ...mypage01.html and mypage02.html instead?

Thanks!

  • drmike

    It's just weird to you youngsters. Back in my day, we expected it. Fancy pants rewrites. :slight_smile:

    http://codex.wordpress.org/Using_Permalinks#Having_your_posts_end_in_.html

    Our current CMS automatically determines where to drop page breaks on long articles.

    What current CMS are you using and what's currently determining where the page breaks go? Do you have some code in there now or it;s it like every three paragraphs or something else?

  • David

    It's a oroprietary system based on the old Userland Frontier called ZENPRESS. Same core environment as the old Radio Userland. I wrote it over a bunch of years, but I'm moving because Frontier's pretty much out of gas.

    Right now, it breaks at the end of the first word after every 3000 characters, actually splitting the article into chunks. Importing is going to be a major hassle, but that's a problem for a different day.

    But the benefit of our system is that editors don't have to decide where to place splits, although they can add them or move them (or prevent them) using control breaks.

  • David

    Man, James, I tried to save that sucker, too. I wrote the MySQL and SQLite verbs for Frontier after it went open source, and then spent like four months trying to find the memory leaks it was having. But there's a library it uses from the 1990s, from a company that's long out of business, and I need to focus on my site quality, not trying to save an old, if extremely cool piece of software.

    It's tough, because ZENPRESS has more than a decade of coding to it, and I'm trying to move all our assets over (and all our existing advertisers) in just a few months. There's no doubt I'll have to write a few PHP plugins, but that beats spending the next four years duplicating first Frontier's functionality and then ZENPRESS's.

    Though, I have to say, Frontier was way ahead of its time. In many ways, it's still a lot more elegant than PHP.

    -- David

  • Andrew

    Hiya,

    I know you can embed <!--newpage--> into a page to split an article into pages, but is there anything that will do this automatically when an article is displayed?

    You could write a plugin that adds the break to posts when they're saved and remove it just after they're pulled from the db and before they make it to the editor.

    Is there a way to configure WPMU to make that ...mypage01.html and mypage02.html instead?

    I agree with the above (don't think it's possible). Most people don't use the .html extension. If it's really a huge deal I'm sure you could write a plugin for this or edit a core file somewhere. It's just a rewrite rule after all.

    Thanks,
    Andrew