bbPress Plugin Browser »

Topics Per Page (0.0.7)

Download

Version: 0.0.7

Other Versions

Last Updated: 2009-8-15

Requires bbPress Version: 0.9 or higher

Compatible up to: 0.9

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(15)

Your Rating

Authors _ck_, mdawaffe


  1. TrishaM

    Member

    :( I must be doing something wrong........I'm certain that I followed your instructions but have a problem

    I first modified my .htaccess file (in my WP blog root folder) to add your line, substituting my actual pathname:

    RewriteRule ^page/([0-9]+)/?$ /Forum/?page=$1 [L,QSA]

    Next I deactivated and upgraded the plugin to version 0.0.4 and reactivated it

    Then I put this line in my front-page.php template file:

    <div class="nav"><?php front_page_pages(); ?></div>

    However, if I put it after the closing row (</tr>) and before the endforeach statement, it displays nothing but rows of page numbers, like this:

    1 2 Next>>
    1 2 Next>>
    1 2 Next>> and so on for the number of rows I specified in topics-per-page.php

    If I make a new row for it, like this:

    <tr>
    <td colspan="4"><div class="nav"><?php front_page_pages(); ?></div></td>
    </tr>
    <?php endforeach; endif; // $topics ?>
    </table>

    then it inserts the page numbers after each topic row, like this:

    Topic Posts Last Poster Freshness

    Post #1 3 John Doe 1 day ago
    1 2 Next>>

    Post Two 1 Suzy Q 2 days ago
    1 2 Next>>

    Post 3 5 Brad Pitt 2 days ago
    1 2 Next>>

    Any ideas?

    Posted: 3 years ago #
  2. D'oh ! Note to self to not post so late at night.

    It has to go AFTER the table close:

    <?php endforeach; endif; // $topics ?>
    </table>
    <div class="nav"><?php front_page_pages(); ?></div>


    sorry about that...

    Posted: 3 years ago #
  3. TrishaM

    Member

    Perfect!! That worked flawlessly - thanks so much for updating your plugin for this!

    And don't worry - we've all had those late-night post problems........it's too bad browsers aren't programmed to stop us and say "HEY! Are you SURE you want to post that??? It doesn't make sense...".......LOL

    Posted: 3 years ago #
  4. Works perfectly!

    Posted: 3 years ago #
  5. Hi, I have this DB error message with the paginate items:

    DB Error in BB_Query::query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OFFSET 15' at line 1

    SELECT t.* FROM bbmv_topics AS t WHERE t.topic_status = '0' AND t.topic_sticky != '2' ORDER BY t.topic_time DESC LIMIT 15, 15 OFFSET 15

    You can see it at http://foro.mangasverdes.es.

    Rewrite rules are in the .htaccess.

    Posted: 3 years ago #
  6. I guess you are using 1.0 and they broke something.
    See if it even needs line 33 at all by commenting it out like this
    // add_filter('get_latest_topics_limit','front_page_pagination',999);

    Posted: 3 years ago #
  7. Ok! It works know, with problems (error if I want to return to page 1), but enough for me.

    Thanks, _ck_

    Posted: 3 years ago #
  8. Manuel, I'm using the plugin and works fine in my blog. I've follow the readme.txt instructions step by step and everything goes well :)

    Great plugin!

    Posted: 3 years ago #
  9. I have an issue. I am running a 0.9 forum with no pretty permalinks and am getting this error:

    Warning: preg_replace() [function.preg-replace]: Compilation failed: nothing to repeat at offset 0 in /Applications/xampp/xamppfiles/htdocs/fsw-forum/bb-includes/template-functions.php on line 943

    How can I fix this?

    Posted: 2 years ago #
  10. valen, are you saying the error goes away when this plugin is deactivated?

    I vaguely remember that error from a pagination bug I found in 0.9 but I thought Sam fixed in .905

    Posted: 2 years ago #
  11. hi, there

    neat little plugin but front page pagination still does not work for me. I am not using pretty permalinks but the front page links show slugs like this forums/page/{page#} and therefore it leads to a 404 error

    There are no rules in my .htacces. Am I doing something wrong?

    Posted: 2 years ago #
  12. johnhiler

    Member

    @dragunoff - Did you add this to your htaccess?

    If you use rewrite slugs you MUST add the following rule to your .htaccess file

    RewriteRule ^page/([0-9]+)/?$ /forums/?page=$1 [L,QSA]

    anywhere before </IfModule> where /forums/ is the path to your bbpress install.

    Posted: 2 years ago #
  13. Actually the problem is the opposite, they are NOT using rewrite slugs (aka pretty permalinks)

    I think I broke that with the last update, let me go fix.

    Please try 0.0.7 when you see it here and let me know.

    Posted: 2 years ago #
  14. Thanks! It now works!

    Posted: 2 years ago #
  15. With a theme with code like this, where does the div code get inserted?

    <?php if ( $super_stickies ) : foreach ( $super_stickies as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> <big>"><?php topic_title(); ?></big></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num">"><?php topic_time(); ?></td>
    </tr>
    <?php endforeach; endif; // $super_stickies ?>

    <?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
    <tr<?php topic_class(); ?>>
    <td><?php bb_topic_labels(); ?> "><?php topic_title(); ?></td>
    <td class="num"><?php topic_posts(); ?></td>
    <td class="num"><?php topic_last_poster(); ?></td>
    <td class="num">"><?php topic_time(); ?></td>
    </tr>
    <?php endforeach; endif; // $topics ?>
    </table>
    <?php endif; // $topics or $super_stickies ?>

    Posted: 2 years ago #
  16. Whenever I add it after </table> as suggested it seems to break everything on the page. I'm using 1.0.2 and the inove theme.

    Posted: 2 years ago #
  17. Breaks my theme too. I used same code in 1.0.1 and worked perfectly there so it might have to do with the 1.0.2 version.

    Posted: 2 years ago #
  18. There is no fix or workaround for this?

    Posted: 2 years ago #
  19. Can you add support (or coordinate a fix with them) so that this works with BBPM? Thanks!

    (Right now BBPM seems to default to showing however many pm's based on the current number setting in "topics-per-page" that is set for 'front-page' displayed topics ... strange!...)

    Posted: 2 years ago #
  20. I was trying to get the title tag of the forum to reflect on which page you are. Actually it showed on all pages of front-page just the forum's name. So you have duplicate titles for different content on subsequent pages.

    So I used a similar way as in WordPress to show in the title tag on page one just the 'forum's name' and on the following pages 'forum's name page X'

    I changed in header.php the title /title tag to read like this

    <title><?php bb_title() ?><?php if (is_front() && $page>1) {echo(" page $page" ); } ?></title>

    It seems to work and I just wanted to share - thanks for the plugin!

    Posted: 2 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.