Skip to:
Content
Pages
Categories
Search
Top
Bottom

Move Topic – Update Topic message


  • shazzhy
    Participant

    @shazzhy

    Good day everyone,

    I’m currently working on a plugin that allow users to create events (Custom Post Type) in the site, those being displayed in a calendar.
    When those Custom Post Types are created, I programmatically create a bbpress topic in a forum. Custom post title being the topic subject, custom post content being the content. That works marvelous.
    Now, I would like to do 2 things and I’m not quite sure what function to use:

    – When the custom post is edited, depending on a metadata value, I would like to move the topic from one forum to another. Creating the topic in one or the other forum works OK at creation time. I would like to move it when it is modified. I’m trying bbp_update_topic but it does not do anything.
    – I would also like to keep the Custom Post and the topic in sync regarding the content. Post ID and Topic ID are both stored in Topic and post meta. I would like that whenever one of the two are modified (mainly for the content), the other is modified the same way.

    So in summary, what is
    – the best approach to programmatically move a topic from a forum to another.
    – Programmatically change the content of a topic when it has already been created.
    – How to catch the event of modifying a topic so I can modify the source post content.

    Thanks !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,
    Check out my ‘bbP Move Topics’ plugin if you see anything useful in there.


    shazzhy
    Participant

    @shazzhy

    Pascal,
    Merci, I’ll check this out !

    Ludovic (From Brussels :))

    @shazzhy :
    http://wpbrussels.be/join-slack/

    Come and join us on the Belgian slack ! 🙂


    shazzhy
    Participant

    @shazzhy

    hi Pascal,
    I checked the bbP Move Topics and I found what I needed. Direct access to DB works like a charm ! Thanks a lot for the advice .

    I’ve registered on the Belgian Slack, thanks for the invite I’ll find some time to introduce myself
    Cheers !


    shazzhy
    Participant

    @shazzhy

    @casiepa
    Hi Pascal, thanks to your advice, I managed to do exactly what I was trying to: an integration between a new application based on Custom Post Type (for games registration for a RPG club in Brussels) and integration with our bbPress Forum (I can show you if interested). One thing I could not achieve is changing the post date/time in order to “Up” the messages that are updated through the integration. I’ve tried updating Post_date, Post_Modified but without any luck. It also need to update the right column with Last Message Date displayed. any recommendation where to look into?
    Thanks !

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar