Forums

Join
bbPress Support ForumsPluginsManipulating bb_option

Info

Tags

Manipulating bb_option

  1. Hi all,

    I have a little problem I'm sure someone got and solved. In th admin part, I want to manage data in bb_meta table. I saw a, 'object_id' column. How to change the value on it ? How to create a new value ? bb_update_option allow us to add or update a new val in meta_key column but what is the most appropriate function ?

    Thanks

    th

  2. // For retrieval
    $data = bb_get_option('option-name');

    // For Saving
    bb_update_option('option-name',$data);

  3. Thank you for replying but what about the object_id ? do you have any idea ?

  4. Describing what are you trying to do will help me explaining it better. :)

  5. A a matter of fact, I want to manage different set of options ie
    1 => (keyword => 'aaa', name =>'bbb')
    2 => (keyword => 'xxx', name => 'yyy')

    With bb_option, we can register 'aaa' and 'bbb' or 'xxx' and 'yyy'. With object_id, we can register both.

    With this info, I want to put on the admin config a select box, Choosing 1 or 2 to show related options and have the possibility to save them.

    (I hope my description is clear)

    th

  6. why don't you just make an array and save it

    // For retrieval
    $array = bb_get_option('option-name');
    
    // For Saving
    bb_update_option('option-name',$array);
  7. Because I have to save $array[1], $array[2] for on option. But maybe by exploding... I'll try that.

    th

  8. just make an array and save it as if it was a variable, APIs would handle its serialization and everything.

  9. Ah yes ... I'll try that. Thanks. I'll close the discussion after benchmarking and sending you feedback.

  10. You must log in to post.