bbPress

Simple, Fast, Elegant

bbPress plugin browser »

bb Topic Views (1.6.1)

Configuration

Function calls:

mostviewedlist (parameters) - Parameters accepted: $listlength (default is 10), $beforelist (default is "

    "), $afterlist (default is "
"), $beforeitem (default is "
  • "), $after_item = "
  • ")

    Use this function anywhere you want to show a list of your most viewed topics.
    

    mostviewedtable (parameters) - Parameters accepted: $list_length (default is 10)

    Use this function on the front/forum/tags pages to insert a table of your most-viewed posts.  Again, if you are not
    using the default theme you may have to make some changes to the styling of the table.
    

    showviewcount () - If used in a "topic loop," this function will display the number of times a topic has been viewed.

    To add a view count column to front page, forum, and/or tags page tables, make the following modifications. Note: these apply to the default Kakumei theme. If you are using a different theme, or a highly modified version of the default, your modifications may be slightly different.

    1. Open bb-topic-views.php and change $appendtotitle to zero. This will prevent the view count from being appended to the end of the topic title.
    2. Open front-page.php. Find (around line 21). Replace everything between this opening tag and (around line 46) with the following:
    — > "> > ">
    1. Open forum.php and make the same changes.
    2. Open tag-single.php. Find the opening and closing tags (around line 11 and line 27) and replace everything between them with the following:
    — > ">
    1. You can rearrange the order of the columns if you'd like, just make sure you get them in the right order for each section.

    Example

    You can see this plugin in action at http://blog.wittmania.com/bbpress or http://bbshowcase.org/forums/

    Code is Poetry.