Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to display "voices" in forum headers


  • fifthhouse
    Member

    @fifthhouse

    I would like to display the number of “voices” at the top of my forums, like in these bbpress support forums. My bbpress forums currently don’t do this, and I am wondering if this is something I can add?

Viewing 5 replies - 1 through 5 (of 5 total)

  • chrishajer
    Participant

    @chrishajer

    If you’re using 1.0, it’s built in but commented out in the templates. If you look for it you should see it.


    fifthhouse
    Member

    @fifthhouse

    Thanks for your help. I am using a custom template. But can you tell me where I would find it in the bbpress template and then I might be able to move it over to my template?


    chrishajer
    Participant

    @chrishajer

    If you look in the stock kakumei template for the word “Voices” you will see all the places where it’s commented out.

    ./favorites.php:18:     <!-- <th><?php _e('Voices'); ?></th> -->
    ./favorites.php:30: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./view.php:11: <!-- <th><?php _e('Voices'); ?></th> -->
    ./view.php:20: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./view.php:30: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./topic.php:10:<span id="topic_voices">(<?php printf( _n( '%s voice', '%s voices', bb_get_topic_voices() ), bb_get_topic_voices() ); ?>)</span>
    ./forum.php:11: <!-- <th><?php _e('Voices'); ?></th> -->
    ./forum.php:20: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./forum.php:30: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./tag-single.php:13: <!-- <th><?php _e('Voices'); ?></th> -->
    ./tag-single.php:22: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./front-page.php:19: <!-- <th><?php _e('Voices'); ?></th> -->
    ./front-page.php:28: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->
    ./front-page.php:38: <!-- <td class="num"><?php bb_topic_voices(); ?></td> -->

    @chrishajer what’s the move to find out all the places where the Voices code has been commented out?


    chrishajer
    Participant

    @chrishajer

    I just grepped through all the files looking for bb_topic_voices. If you’re familiar with grep it’s not too hard. If you have a Linux system, I can tell you exactly how I did it.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.