single topic to existing topic?? you mean single post?
Support Forum
Right moving a single post to a new topic option I know.
But our admins want to move a single post to an existing topic because many users post in wrong topics.
Thanks.
now that is problematic… and is in the list too, but it is going to confuse folks… because posts are not sorted by date order.. they are sorted by post id… this is a GREAT time and resource savings in forum execution… and for within a topic, they are the same thing really…
however, when we start moving posts from one topic to another existing topic, the sort order may appear to look odd to people and may appear out of order…
so, back to your hook idea… you will have to update the post and both topics…
Thanks again for your quick reply.
Exactly my thoughts because I also realized that sort order after moving might look odd in the posts display. But I thnk for my admins it is more important to have a post at right topic rather than having this issue.
I will update wp_sfposts and wp_sftopics (post_count field needs to be updated and post_id field I believe represents the very last post_id within a topic – so that might also need to be updated depending upon the post selected to move).
Thanks.
You will also need to rebuild the indexes in both topics (old and new). Look in the sf-support.php file for the two ‘build_index’ functions. You will need to call them both.
sf_build_forum_index
and
sf_build_post_index
for each affected one… and yes, in sf-database.php
Thanks that’s what I thought. I will copy sf_move_post() function to a new one and make my changes there. That way I can piggyback most of its calls.
Many thanks for your help. You guys are awesome.
Hi SPF Dev Team,
I didn’t get much time after posting my previous post but today I got little bit of time to work on it. And I am happy to report that it went very smoothly. My Forum now has this feature of mve post to an existing topic working like a charm. Here is the UI :
- Admins will now see a new option in Edit Tools (shown as wrench icon
on top of every post to Admins) called “Move This Post to a Topic”.
- Once you click on this menu option a small pop-up will open with a
drop-down list of all the forums.
- Select the destination forum and click”Next>”
- A new small pop-up will open with a drop-down list of all the
existing topics within your chosen forum in previous
step.
- If you selected wrong forum in step 3 you can always go back by
clicking: “<Back”
- Select the destination topic where you want this post to move and
click: “Move Poist”
- A confirmation (or failure if any) message will come up on top of
the page with the yellow background and whola your post has moved.
PS: Earlier option has been renamed appropriately as “Move This Post
to a New Topic”
Thanks for all the help guys to point me to the right direction to build this feature.
cheers.
So do you re-index both from and to forums and topics because you will need to.
And you must also realise that the post being moved will slot itself into it’s new topic sorted on its post id – so sequentially that could end up anywhere…
Yes I do re-index it as suggested by you in previous posts. And yes I do realize that “sort by post it” syndrome but for us it was much more critical to have a post in right topic than a few incorrect post order display issues here & there.
Thanks.