Summary

When inserting multiple mospagebreaks in a page, the page title will only change according to the heading on the first pagebreak.

Example fulltext content:

Content here
{mospagebreak title=title&heading=The header}
More content here
{mospagebreak title=title2&heading=The second header}
Last content here.

However: When displaying the actual article, you will never get a "The second header" shown in the article title. Where's the point in that?

So I edited the code a little bit and came up with a small change that fixes this:

In mambots/mospaging.php, line ≈ 158, remove this:
if ( @$matches[0][2] ) {
parse_str( html_entity_decode( $matches[0][2] ), $args );

if ( @$args['heading'] ) {
$heading = $args['heading'];
$row->title .= ' - '. $heading;
}
}

And replace with this:
if (@$matches[$page-1][2]) {

parse_str( html_entity_decode( $matches[$page-1][2] ), $args );
if ( @$args['heading'] ) {
$row->title .= ' - '. $args['heading'];
}

}

I think that should fix it.
Opened On:
23 Sep 2008, 14:13 by Torkil Johnsen
Status:
Open

Filed Under

  • Developer
  • PHP 5.2.x
  • Plugins