Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • Menelik
    Member

    @menelikseth

    Oh, I’m using BuddyPress version 1.2.9 on WordPress version 3.2.1


    Menelik
    Member

    @menelikseth

    @Brandon Allen and @r-a-y,

    Suddenly bb_add_topic_tags() stopped working.

    How I isolated the problem: In function cg_postcatagory( $post_id = false ), I subbed out bb_add_topic_tags() with echo $postmeta (in a foreach loop) and upon posting a new post, it displayed the categories that I wanted saved to the database. So I know that bb_add_topic_tags() is getting the categories, but it just isn’t doing anything with them.

    I’m going to install an older version of wp on my test server to see if the upgrade is what borked it. Because that’s the only thing I can think of at this point.

    This function is literally the backbone of my site, and I was all set to launch too. If anybody could help me out I’d appreciate it.

    Confidence -100
    Panic +10


    Menelik
    Member

    @menelikseth

    Confidence +1

    Okay got it working :D it was so simple (thanks to you guys for drop kicking me into the right direction.) Next up, creating a custom forum loop that will retrieve the necessary tag from POST and display all topics that contain that tag.

    `function cg_postcatagory( $post_id = false ) {
    if ( empty( $post_id ) || empty( $_POST ) )
    return false;

    $post_id = (int) $post_id;
    $postmeta = $_POST;

    bb_add_topic_tags($post_id, $postmeta);
    }
    add_action( ‘bp_forums_new_post’, ‘cg_postcatagory’ );`


    Menelik
    Member

    @menelikseth

    @Brandon Allen and @r-a-y,

    I’ve decided that I wanted to add “meta data” as topic tags, instead, so I could use the bp_has_forum_topics() so I filter posts easily. I’ve modified the functions you guys helped me make, using bb_add_topic_tags() however no new tags are added. I want the user to be able to add their own tags via the text area box, in addition to selecting from a set of tags via check-boxes. Here’s what I came up with:

    `function cg_postcatagory( $post_id = false ) {
    if ( empty( $post_id ) || empty( $_POST ) )
    return false;

    $post_id = (int) $post_id;
    $postmeta = $_POST;

    $cg_newmeta = ( cg_newmeta( $post_id, $postmeta ) ) ? true : false;

    return $cg_newmeta;
    }
    add_action( ‘bp_forums_new_post’, ‘cg_postcatagory’ );

    function cg_newmeta( $id, $postcat) {

    do_action (‘bbpress_init’);
    bb_add_topic_tags($id, $postcat);
    }`

    I have a feeling that there’s a conflict between the form.php new topic form’s text-area input, and the check-boxes input that I’ve added…


    Menelik
    Member

    @menelikseth

    Hah! Found it. It was the forums index.php under the default theme. (bp-default > forums > index.php) Now to dissect it and see what’s up. I’m mainly trying to figure out how to filter forum posts by its meta-data, with or without ajax (whichever solution I happen upon first)

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar