Skip to:
Content
Pages
Categories
Search
Top
Bottom

creating new bp forums shortcodes – guidance/help reqd on getting forum_id’s.


  • rcain
    Participant

    @rcain

    Hi,

    I have a standard wp (3.3.1) + bp (1.5.4) using std/integrated (bbpress) group forums and am creating a site with separate wp pages for specific topics/countries (i call them ‘portal’ pages). within each portal page i wish to show a list of forum topics from corresponding topic/country ‘groups’ (and their associated forums) and am intending to use the bp_forums_get_forum_topics() function as the basis.

    my main question is:

    how can i obtain/see the forum_id’s to use in the call to bp_forums_get_forum_topics?

    there seems no way to determine them from the back-end or front end admin and i can’t for the life of me locate any function that will return them, given for example a forum title (eg: ‘Africa’).

    on a more general note – can anyone point me to some decent example code around the use of integrated forums functions? (again, the only stuff i can find easily is for example related to forums-loop.php, which doesn’t help me in this case, since i am operating distinctly outside of the bp loop).

    any help, advice or pointers very much appreciated, i just need a bit of a kick start here.

    (ps. temporarily, i tried installing bbpress plugin as separate/site-wide forums – which is great from the back-end with all the intuitive admin functions i required, including forum_id’s, BUT, of course, this is entirely separate from the internal integrated version used by groups, thus doesn’t help me here.

    suggestion to developers: if standalone/site-wide bbpress admin worked against integrated group forums and threads – that would be just perfect, and so much easier to use and administer – any way to make that work?)

Viewing 2 replies - 1 through 2 (of 2 total)
  • We’re building bbPress 2 (aka sitewide forums) into BuddyPress 1.6 and bbPress 2.1. It’s not trivial work, and it should soon be ready for testing.

    I think you’ll need to dig into the bbPress 1 functions (/bp-forums/bbpress/). Looks like bb_get_id_from_slug() might be what you want:

    `bb_get_id_from_slug( ‘forum’, $your_slug );`

    However you end up doing it, if you’re trying to call a bbPress 1 function and PHP says it doesn’t exist, put this code in before you make the call(s). It’ll load bbPress, so use it sparingly because it uses a lot of memory to load: `do_action( ‘bbpress_init’ );`


    rcain
    Participant

    @rcain

    Hi Paul,
    Thank you so much for your reply. That is exactly the info i needed. :)
    All the best with bbPress2 dev. Cant wait to give it a go when its ready for test.
    Rob

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘creating new bp forums shortcodes – guidance/help reqd on getting forum_id’s.’ is closed to new replies.
Skip to toolbar