Skip to:
Content
Pages
Categories
Search
Top
Bottom

Displaying forum topic tags

  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    You can enter tags on your forum topics but they don’t actually show up anywhere in the default theme. Here’s a little code (mostly lifted from the Kakumei theme that comes with bbPress) that you can put into your theme’s groups/single/forum/topic.php where you want forum topics to appear:





    <?php
    $topic_id = bp_get_the_topic_id();
    $topic = get_topic( get_topic_id( $topic_id ) );
    ?>



    $topic ) ); ?>



    <?php printf(__('No tags yet.'), bb_get_tag_page_link() ); ?>






Viewing 20 replies - 1 through 20 (of 20 total)
  • Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    I guess I’ll do it in pastebin:

    http://pastebin.com/hXgfJnY1

    Avatar of Boone Gorges
    Boone Gorges
    Keymaster

    @boonebgorges

    PS you’ll probably want to style that ul.

    i use this and works as well

    <div id=”topic-tags”>
    <p><?php _e(‘Tags:’); ?></p>
    <?php
    $ttags = bb_get_topic_tags( bp_get_the_topic_id() );
    if ( $ttags ) : ?>
    <?php bb_list_tags( ‘topic=’. bp_get_the_topic_id() .’tags=’.$ttags ); ?>
    <?php else : ?>
    <p><?php printf(__(‘No <a href=”%s”>tags yet.’), bp_get_forum_directory_permalink() . ‘/#tags’ ); ?></p>
    <?php endif; ?>
    </div>

    Avatar of cherubini
    cherubini
    Participant

    @cherubini

    Is there any way to show all the groups forum tags on the group page?

    Avatar of agrundner
    agrundner
    Member

    @agrundner

    @boonebgorges @nuprn1 thanks for posting the instructions. It answered my query. I think it’s odd that topic tags don’t show up in threads in the default theme. Anyway, it works :) Next thing BP needs to do is provide a forum tag manager tool (unless there’s already one and I didn’t see it) similar to Dashboard > Posts > Post Tags and allow the topic creators to edit tags like they can their Title and Content under Edit Topic. Right now I have to do forum tag management using phpMyAdmin.

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    @boonebgorges @nuprn1 I tried both of these snippets in a new forum with TAGS i added and neither of them are showing the topic tags…
    I posted this in the topic.php direclty under the


    items... Any idea as to why these won't show up? BP 1.2.5.2 WP 3.0.1

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    direcly under the:
    -?php do_action( ‘bp_before_group_forum_topic’ ) ?-
    -?php if ( bp_has_forum_topic_posts() ) : ?-

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    Ok, I can get @nuprn1 s to work (had to change the quotes back to normal in the cut& paste). How can I make this a tag cloud? Is there a plugin for this… It is simply long-listing them….

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    Ok… so I’m looking at this, I guess what I really want to do is show a Tag Cloud of the Forum Topics in the GROUP. So the Group would show the tags of all the forum topics entered in that Group. Because there are so many forums that “cross” each other within a group, this makes good sense. A Tag Cloud of the tags listed in the forums of a Group… Any ideas? Anyone already doing this and can share? Thanks!

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    Looking at this codex page: http://codex.wordpress.org/Template_Tags/wp_tag_cloud Is there an easy way to use the taxonomy parameter with this? Don’t know.

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    Hey BP gurus… any help or thoughts on this? Thanks.

    Avatar of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    quickly looking around in the bbpress code – i don’t see any forum level tag heat maps – only for top_tags and topic_tags.

    have a look at the code that powers this bbpress plugin, though it may take some reworking for buddypress

    http://bbpress.org/plugins/topic/hot-tags-plus/

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    @nuprn1 Can you post a link as to where you are using the above code that you listed so I can see how you are using it? Thanks.

    Avatar of rich! @ etiviti
    rich! @ etiviti
    Participant

    @nuprn1

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    I was speaking to where you are using the topic tags on your site…

    <?php
    $ttags = bb_get_topic_tags( bp_get_the_topic_id() );
    if ( $ttags ) : ?>

    <?php printf(__(‘No tags yet.’), bp_get_forum_directory_permalink() . ‘/#tags’ ); ?>

    I wanted to see how this layed out after it was styled etc.

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    Ok, I’ve gathered a number of sources from around the Web to come up with something that is ok… I’ll post it below. It includes a function that I gathered from bbpress.com called bb_row_tags (something hat maybe should be added to buddypress future?) and some of Rich’s code above and really is hack but it seems to almost get what I’m trying to accomplish.

    Avatar of Pisanojm
    Pisanojm
    Participant

    @pisanojm

    @nuprn1 This is a total hack job, but it is working for me. This goes with all of my above posts. It’s my first time using pastebin, but it looked like the easiest way to show the four things I did…

    http://pastebin.com/fvM6LEnp

    Avatar of Beck B
    Beck B
    Participant

    @beckb

    It is rather odd the tags aren’t actually used in the bp-default theme.

    Not-entirely-a-tangent: I wish I could mark a favorite reply from here, rather than having to find it as part of an activity stream somewhere. .oO(Am I just misunderstanding how favorites are intended to work?)

    Avatar of streamstalker
    streamstalker
    Member

    @streamstalker

    I am rather new to BuddyPress but have a question about how the forum topic tags are being displayed. The tags that appear multiple times are bigger as normal seem to be too large to fit inside the given area.

    Example: http://troutpic.com/forums/

    Avatar of Expana
    Expana
    Participant

    @expana

    @Pisanojm , thanks heaps! It works!

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

You must be logged in to reply to this topic.