By t1s on
Instead of the comments how they are now, with the subject either being defined or getting it from the body, I would like to have the subject of the comments be auto numbered. Just like how replies are for the support issues for various things in drupal.
Just a quick example:
http://drupal.org/node/181005
Can this be set or should this be moved to feature request?
Comments
Automatic Nodetitles
I have used Automatic Nodetitles to do this for pieces of content before, but I've never had to do it for comments.
Might be worth taking a look, with the ability to use different tokens to build titles it is a really powerful module.
I'm just guessing here --
I'm just guessing here -- but can't you just create a comment template -- like a .tpl.php file and then edit the title to be something like...
Something like that -- I'm not sure on the variable by the way -- I'm just saying you might just do something simple like that.. In other words just grab the comment id and use that as a title.
Good thoughts
That sounds logical to me, but I would have no idea how to go about doing something like that. I have yet to learn php and me playing with code may prove disastrous.
Thanks though
auto-increment
I haven’t looked, but I would guess $comment->nid is the id of the node that the comment is attached to.
There is a variable $id available in node templates, but if it exists in comment templates, it isn’t documented. This should do the same – place in your comment.tpl.php
Edit: I’ve just checked – there is an $id variable, so just print it, without the static bit. You might need some logic to avoid confusion when posting/editing comments.
___________________
It’s in the detaιls…
Got what i want. But now I
Got what i want.
But now I want to disable the title text field when submitting a comment to prevent confusion. What file do i need to modify for this?
Disable comment subject
You have the option to disable the comment subject on the comment settings page (admin/content/comment/settings), but that could possibly interfere with what you have done.
Doesn't look like 6 has the
Doesn't look like 6 has the option to disable them. If it does, it's been put elsewhere. the only thing i can do in admin/content/comment is view published comments and an approval queue
Found It
Oh, right, looks like things have changed for 6, now each content type now has its own comment settings (where you can disable the subject). You can get to the different node pages from admin/content/types and selecting edit for the type you want to modify.
Thank you. I wouldn't have
Thank you. I wouldn't have even thought to look there.
Sounds like the problem is
Sounds like the problem is solved -- good to hear.
» Respectfully, GreenLED
»