Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to read bb_topicmeta?

  • I’m writing a plugin and looking for a way to read the bb_topicmeta table without resorting to cranking out SQL. I can find the bb_update_meta method but no matching bb_get_meta.

    Is there an obvious other metadata retrieval method or is this one for trac?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Unlike WP, topic meta is accessed throught the topic object.

    update_topicmeta( 5, ‘my_meta’, ‘yay’ );

    $topic = get_topic( 5 );

    echo $topic->my_meta; // outputs: yay

    Unlike WP, topic meta is accessed throught the topic object.

    update_topicmeta( 5, 'my_meta', 'yay' );

    $topic = get_topic( 5 );

    echo $topic->my_meta; // outputs: yay

    Um. What? I see this isn’t going to be a fun forum system to customise if you’re not a PHP programmer. I have NO IDEA what the above means. (I dont mean that as a slam, just a declaration that I’m in over my head at this point.)

    Thx Mike; perfick.

    @nola: the short version is that if you already have the topic (which I do because I’m using this in the topic.php template), then instread of saying: echo bb_get_topicmeta($topic->ID, "mykey"); whichis what I was expecting, there is the somewhat easier echo $topic->my_key;

    nolageek, That information will mostly be useful to plugin authors. You probably won’t need to know that in order to customize your site.

    I hope not, anyway :)

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

You must be logged in to reply to this topic.