I searched for an answer to this but found nothing. As administrator, can I move comments to a different forum topic once they're posted? How?

Comments

boris mann’s picture

Short answer: nope, you can't move them elsewhere automatically.

Long answer: copy the comment, delete the original, then create a new comment in the new location, manually changing the poster to be the user that originally posted (or Anonymous).

davetrow’s picture

I am a total newbie in Drupal, but it seems to me that without the ability to easily move comments, it's more difficult that it should be to administer a forum. Aren't comments the basis of the threading mechanism for topics? Or am I misunderstanding how to build a discussion forum. I read the documentation on this, which was fine as far as it goes, but perhaps I'm missing something.

My present understanding is this: a taxonomy is used to create the fundamental structure of a set of forums, users with the appropriate permissions can create topics within each forum, and topics are discussed using comments.

Thus the ability to move a comment to a different topic, or promote it to a topic of its own, would be useful.

Dave Trowbridge

droopy’s picture

I'm with on this. There was a bit of a discussion of this idea here but it appears not to have gone any further.

boris mann’s picture

Go to the Drupal project and add a feature request for the comment section.

JohnG-1’s picture

I used phpmyadmin to do this becasue database module was giving SQL syntax errors.

1. Find the relevant comment by it's CID in the comments table of the database.
2. Edit the NID, PID and THREAD fields.
3. Save.

CID = Comment ID (hover over the comment's title and it appears in the URL in the status bar)

NID = node ID - which page the comment is attached to

PID = parent ID - if the comment is a reply, the PID of the parent comment goes in here. If it's not a reply, this is 0.

Thread = make sure this agrees with your new PID
1/ is the first comment on the page (PID=0)
1.1/ is the first reply to comment 1/ (PID = CID of 1/)
1.2/ is the second reply to comment 1/
1.1.1/ is the first reply to comment 1.1/
2/ is the second 'top level' comment (PID=0)
etc.

Hope this helps while we're waiting for comment management tools to be developed.

droopy’s picture

A comment_split module was posted here.

JohnG-1’s picture

thanks! that looks useful for converting comments to nodes - and very fresh too!

It's the kind of 'overlooked' admin tool that you would hope to be retro-fitted to the 4.6 core comment.module, but it sounds like we have to wait for drupal 4.8 before fundamental revisions of the forum.module might come through ... http://drupal.org/node/44410#comment-84386 - or third party plug-in modules like this.

juan_g’s picture

About that useful way to move comments by editing the database, there is a possibility of giving a value of 0 to the field thread, in the case of using flat mode always.

Something related from another thread, How to correctly import comments (especially the comments "thread" field)?:

The main thing I'm unsure about is how to correctly populate the "thread" column. I've looked at how Drupal fills this column by default using the "int2vancode and vancode2int functions" (which I don't understand completely). Even when comments are not threaded, it seems to store this value in a special format. I noticed that using Devel module's content generation tool, comments are generated with a value of "0" for thread, and it seems to work fine. However I'm not sure if this is the best way to do this for my actual content (e.g. might it break if someone adds new comments to an old node?).

The important point is that Drupal sorts comments by CID field (comment ID) for flat mode (usually this is the same as sorting by creation date), and sorts comments by THREAD field for threaded mode.

We can see this in comment_get_thread of comment.module for the upcoming Drupal 7:

  if ($mode === COMMENT_MODE_FLAT) {
    $query->orderBy('c.cid', 'ASC');
  }
  else {
    $query->orderBy('SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))', 'ASC');
  }

So, it would be difficult to go back to threaded mode if the thread field was zero for many comments (which would appear disordered in that mode), but if you are sure you are going to use flat mode always (see the Flatcomments module), then it seems you might assign zero to the thread field instead of calculating it, because in flat mode the comments appear in cid order, and the field thread is ignored.

BTW, this discussion was a bit old, and later appeared the Comment Mover module. (See documentation, because it works a bit differently from the above way to move comments by editing the database, and -at least for the initial versions- cid and chronological order was not preserved when moving comments to a different node; it seems this is going to change for an upcoming CM 2.x version).

Kato’s picture

I am personally not fond of the Internal Forums for Drupal one bit at all. They don't look or flow right and can be very difficult to read and follow for a newbie. They don't have NEAR the amount of flexibility and control that a forum should have or could have. I haven't found many modules that really change or update this or do anything reliable as well. They really should take a look at some of the more popular forums out there and design the internal Drupal forums to something like that. Or give us different forum styles and let us choose what type of Forum we want Drupal to use. I was really looking forward to having the forums just part of Drupal and my site and not have to worry about changing the theme/layout of a phpbb or even punbb to fit my Drupal site, but it was not meant to be.

In the long run, I gave up trying to give them the same theme and just keep my forums completely seperate from the rest of the site.

JohnG-1’s picture

I can see no significant difference between a forum topic and any other node with comments enabled.

ShutterFreak’s picture

You might want to take a look at the following blog post I made on this topic: Rearranging comments in Drupal.

It took me some time (and a sick day) to figure out how to write up how I understand the way Drupal comments are managed internally, since apart from one Drupal API page I never managed to find useful information on how to move comments.

Basically, there are 2 key concepts you need to understand:

  • the identifier of the parent comment (pid) explains the hierarchy of comments;
  • the thread identifier represents the position (as in: sequence) of the comment within the hierarchy.

I invite you to read my blog for the details and a couple examples :)

Olivier