By djorn on
Is it possible to put comments on a separate tab when viewing the node? Or, even, automatically putting them into a forum topic? I know there is the comment mover module, but this module does not appear to automatically move comments from a node to the forum. It seems that it has to be done by hand.
Comments
Clarification
What I have in mind is similar to the "talk" page you often see on wikipedia. I'm trying to implement a wiki-style system in drupal using revisions, but would prefer that any discussion about the page appear on a different one rather than below the node itself. Any suggestions on how to do this?
I'm looking for the same thing
I'm looking for the same thing. Did you found a solution on how to do this ?
Thanks.
discussion page with comments related to revisions
Hi guys,
I'm looking for the same thing. Did you look already in the CVS if there is a project out there or did anyone started coding yet?
What about the idea that comments are tagged with a link to the revision. This means you can have a comment list (the way you see it in mailinglists) which you can filter on a specific revision which might be useful.
Let me know if you are still looking for a solution, so I can have some help when I start coding.
I didn't find any solution
I didn't find any solution, the way comments are displayed is my only problem with Drupal :-/
I'd like to find a way to display all the comments in the forum but it's impossible with Drupal.
What do you mean with
What do you mean with display all the comments in the forum? The title for this topic is 'Putting comments on a separate tab when viewing node'. Are you looking for the same tab solution?
Perhaps the your request can be combined with the original request: the tab is loading a thread from the forum.
Yes Toemaz :) I'm looking
Yes Toemaz :)
I'm looking for the same tab solution but I also have another thread about putting ''All the website comments in the forum'' I've explained it here http://drupal.org/node/122839
website comments in the forum
Bumathan, this is an interesting idea. But I'm thinking what would be the advantage of that, so it is simply separated right?
So the tab solution would be good for you as well? It just needs to be a separated page if I understand it well.
Exactly Toemaz. It just
Exactly Toemaz. It just needs to be a separate page. I don't want the comments to be displayed under the article.
I hope you will succeed in developing something for that :)
Good luck.
Matt
comment->forum test case module
I just created a test module for comments in a tab: displayed under the tab 'dicussion'. Because this requires modifications on the core comment module, I will now create a test module for your 'forum' idea.
comment_tab module
I created a module for testing the comments in a tab feature. Its for 4.7.x. You can download it here
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/toemaz/commen...
Installation instructions
----
Download to a comment_tab directory and enable the module.
Under admin > settings > content type: select the content type you would like a discussion tab for and check the 'Show comments in a separate tab' checkbox.
You will see that the comments will still appear under the node. Thats bc the comment module needs to be patched. But this is just a proof of concept.
Whow !
I can't believe you did this and you're gonna work on my idea too ! Great !
I'm gonna try it right now ;)
Thank you very much.
Matt
EDIT /// hum, I just saw it's for 4.7 but I use Drupal 5, I can't test it.
drupal 5 test
Here it is for drupal 5:
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/toemaz/commen...
hidden comments
I just upgraded the test module so that the comments are not shown under the node, but just under the discussion tab. There is just one more thing to do: make sure that after you add a comment, you are not redirected to the node page, but to the discussion tab. I don't have a clue yet how to fix this.
Thank you for the Drupal 5
Thank you for the Drupal 5 version.
I think it's not a big problem for the redirection.
Oh, by the way, is it possible to display the number of comments under the node ?
$node->comment_count
display the number of comments under the node
Thats a theming decision. You can get it via $node->comment_count
redirecting after posting the comment
I added a fix for redirecting to the comment tab.
Any suggestion whether this is a good name for this module?
Cool ! Yes I think it's a
Cool !
Yes I think it's a good name, quite understandable for the users looking for such a module in the repository.
I've tried to install the
I've tried to install the module for Druapl 5. I've uploaded the file in a comment_tab directory. Now I want to enable it but the module is not displayed in the module list of the administration panel. Do you know what can be wrong ?
About the forum module
I remember why I needed to display all the comments in the forum : It's a design problem.
The forum doesn't have the same width that the others nodes and it wouldn't be easy enough to have two different submission forms etc...
That was the reason :)
B.T.W I've tried many possibility with the module but it doesn't work for me...
moved
I moved the comment_tab module for 5 into the sub dir comment_tab under
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/toemaz/
Download the 2 files (.module and .info) and install them under a subdir in Durpal 5.
The single file comment_tab was the older 4.7 version. You were probably using that one.
the "Post comment" link is not displayed anymore.
OK, now I've installed it and made the configuration.
Did you test it on Drupal 5 already ? because the old comments (before module) are still displayed under the nodes. On the nodes that don't already have comments, the "Post comment" link is not displayed anymore.
Maybe I've got the wrong file again, I'll check this and let you know Toemaz ;)
comment url issue
Besides these problems, there is one major problem that came up: All links to comments in a Drupal website are build like node/$nid#comment-$cid. In fact this should become node/$nid/discussion#comment-$cid. I don't know whether I will find a URL rewriter in Drupal for doing something like this.
stop
I think I will abandon the 'comment_tab' module due to this persistent 'comment url' problem. With php you can't catch the url fragment #comment-cid# because its not being sent to the server, it's stays at the client side.
There are 2 solutions for this issue
I think I will stop developing this module unles someone comes up with a better idea.
Too bad, but if there si no
Too bad, but if there si no other solution...
I suppose you'll stop the developement of the comment_forum module too ? Maybe you'll have the same problem, no ?
possible solution: define own recent comments blocks/views
Maybe I was to fast with posing to stop on it. The solution might be simple but a little confusing.
Just because default blocks/views for recent comments are linking to node/nid#comment-cid, doesn't mean this module is worthless. No, it just has to define it's own block/views with the right links node/nid/dicussion#comment-cid.
What do you think about this?
In fact, this module is not
In fact, this module is not wothless at all, it can improve many Drupal websites.
Your solution may be a possible one but I'm not sure to understand it well because I consider the problem differently.
On my website, in fact I don't use the tabs, I've found other solutions ---> for the edit link, I did it like this for example :
With your module, I would try to write something like that at the bottom of the node :
Could you explain the solution in other words please ?
recent comments block
I can explain the issue very easily via the 'recent comments' block. Just enable it and click on one of the comments which is directing to a node type for which the comment tab is enabled.
You will see the comment title in the block is linking to: node/nid#comment-cid
But the comments are moved to: node/nid/discussion#comment-cid
So we have a problem here.
My proposal was to create a view or a block for this specific module. There is no other solution according to me. Only this way, the module will be useable out of the box.
"post comment link"
The post comment link is moved under the comment tab.
Concerning the comments displying under the node, I can't reproduce that but I guess it all depends what code is performed first:
$node->comment = 0 or comments_render in the node_show function.
Can you try on a different drupal 5 installation perhaps?
Regarding the url rewriter
Regarding the url rewriter problem, I use a module called "pathauto". It automaticaly rewrites the url, maybe it's a stupid proposal, I don't know....
I'll try to install a new Drupal 5 on my server tonight...
Good luck Toemaz !
Matt
EDIT //// Au fait, on peut peut-être parler en français aussi ? ça sera toujours meilleur que mon anglais non ? Bref, si tu as besoin d'aide...
Alors, vous parlez
Alors, vous parlez français? Je ne savais pas qu'on parle Français à Cambodja. You can continue in French, I prefer English because everyone can understand me.
The pathauto is not an option. The solution is posed on: http://drupal.org/node/102379#comment-208458
Effectivement, je parle
Effectivement, je parle français, la Cambodge, c'était pour brouiller les pistes quand je me suis inscrit à Drupal il y a un an...
So, you're right it's better to speak english for the others ;)
Well, i've installed a new Drupal 5 on my server to test the module, here are the final results :
- "Discussion" tab is displayed fine.
- Clicking on this tab redirects to the correct page but no submit form or button are displayed.
Works like a charm with the
Works like a charm with the latest version ! Great job Toemaz :)
finally ;-)
Ok, thx for testing!
I'm gonna install it on my
I'm gonna install it on my production website, wainting for the forum_comment_module (If you still plan to work on it).
How would you write the link to the discussion tab ?
Since I might have a
Since I might have a reasonable solution, the forum_comment.module is not in my mind anymore.
How would you write the link to the discussion tab ?
Euh, can you translate in French? ;-)
En français...
Yes sorry,
Quel serait le lien générique à écrire pour envoyer vers la page de discussion ?
Plus haut, je disais , que je n'utilise pas les "Tabs" sur mon site mais plutôt des liens textuels. Je voudrais afficher le nombre de commentaires en bas de page et quand on clique dessus, on est redirigé vers la page de discussions pour poster un commentaire.
J'espère qu'une solution ou un début d'idée viendra un jour pour le comment_forum_module, mais en tous cas, très beau travail pour le comment_tabs module :)
Merci :)
final feedback
The comment_forum.module as you described is far far away now.
This one works fine
Thanks.
Duplicate module
I just found a duplicate module: http://groups.drupal.org/node/2931
It seems this rötzi has it developed a little more. I'm cursing myself now that I didn't look any further.
Oh...
Indeed.
But if the module is not in the main repository, we can't guess it exists. The Drupal with Drupal contribs. Maybe a forum module exists too, I'll have a look :)
final stop
Because rötzi is really pushing the wiki for Drupal, I will abandon my module and help him out. This is the end ;-(
I need this module for drupal 6
is there any module like this for drupal 6?
http://www.khoobo.com