Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
6 Jan 2010 at 00:17 UTC
Updated:
3 Jan 2014 at 01:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonReally? What explanation do you think is actually needed?
My opinion: The theme function doesn't really need to know much about the links, except that it should print them out, and the implementation of the function shows you the default way to print them out (via theme('comment')) so I would tend to leave this as it is.
If you can explain why you need more information or what you'd suggest putting in there, I'd be willing to change my mind...
http://api.drupal.org/api/function/theme_comment_view/6
Comment #2
Aveu commentedWhat is a control link and how is it used? Is there an alternate terminology that is used elsewhere?
New drupalers looking up this function in the API database need help with this parameter.
I have searched the entire api.drupal.org site and the one and only place where the phrase "control link" is used is in the description of the "theme_comment_view" function parameters. If the term is not defined or used elsewhere in the API documentation then it needs to be clarified here. If there is an alternate phrase for this term then the API should use that phrase and provide a link to its definition.
Without this clarification it makes equal sense to say:
$links An associative array containing gerflubbel links.
Comment #3
jhodgdonOK...
Here's what I think it should say:
@param $links
An associative array containing link information suitable for passing into theme_links(), generated by modules implementing hook_link() with $type='comment'. Typically these are command links for editing, deleting, and other operations on the comment.
Other notes to whoever decides to patch this:
- The one-line description at the beginning of this function doc uses the word "block", but it doesn't mean a block in the sense of the Block module, so it should probably be changed to remove that word.
- The $visible parameter should be more explicit (TRUE if comments are visible, FALSE if they are in "folded" view.)
Good project for a new API doc/Drupal contributor. :)
Comment #4
trevjs commentedPatch file is attached.
Comment #5
trevjs commentedComment #6
jhodgdonThat's a good start, thanks!
A few problems with this patch:
a) It doesn't apply at the top level of the Drupal repo. You should always do patches from the perspective of the top level of Drupal.
b)
Please wrap all lines in documentation blocks at as close to 80 characters as possible (without going over 80 characters). Sentences should end with ".", and non-sentences should be made into sentences.
Also, the links in Drupal generally are all lower case, or sentence case. So they might be "edit comment" or "Edit comment", but they are unlikely to say "Edit Comment".
I would suggest avoiding specifics of the wording of the links, anyway, and instead describe them, like "such as links for editing, deleting, and replying to a comment".
c) The patch doesn't address all the comments/suggestions in #3 above.
Comment #7
trevjs commentedMade the requested changes. This time around I also worked in this:
Comment #8
jhodgdonLooks good -- almost there... Just one minor problem:
The first line of a function doc should start with a verb in 3rd person, such as "Themes the", rather than "Theme the". See http://drupal.org/node/1354 for reference.
Comment #9
trevjs commentedI'll be getting to it tonight.
Comment #10
trevjs commentedWith changes specified by jhodgdon. Added the letter 's' to the word 'theme' in the initial description.
Comment #11
trevjs commentedforgot to switch to needs review
Comment #12
jhodgdonSpaces at end of two lines...
Comment #13
trevjs commentedSpaces removed.
Comment #14
jhodgdonGood work, let's get this in.
Comment #15
gábor hojtsyThanks, committed.
BTW checked it does not apply to Drupal 7 due to no such function being there.