Hey,
as we talked about this on IRC, [[http://drupal.org/project/comment_edited|comment edited]] now has an option to display the "edited by ... message" outside the comment body. For this the templates needs to use $comment->comment_edited
property. It passes the themed edit messages (with the new 1.3 version moderator edits are separated out, thus the plural). The module provides the theme_comment_edited_messages()
theme function, override this if you want to change the way these messages are rendered.
More information in this issue: #400424: Option to put "edited by" string below comment body.
Comment | File | Size | Author |
---|---|---|---|
#21 | restore_support_for_comment_edited-413494.patch | 587 bytes | mcdruid |
Comments
Comment #1
MichelleThanks, snufkin. All 2.x issues are getting postponed for the moment until I get a 2.x branch opened up to refile them all.
Michelle
Comment #2
MichelleComment #3
MichelleI added the following code. I haven't actually tested to see if it works because I don't use comment edited (switched to nodecomment after this issue and it doesn't support nodecomment that I'm aware of). If this variable has changed, please let me know so I can fix it.
Michelle
Comment #5
aharown07 CreditAttribution: aharown07 commentedIt doesn't work. I use comment edited module with 6x2x alpha3 ... comment edited lines do appear but their location cannot currently be managed from post.tpl.php
They are wrapped in a different class than the "comment_edited" one that appears in the code above.
Going to see if I can figure out some more info since I kind of want to move the edited line down below the signature.
Comment #6
MichelleOk... Bopping this over to the CE queue to find out what the variable has changed to.
Michelle
Comment #7
aharown07 CreditAttribution: aharown07 commentedOK, turns out you just have to enable the " Use a template variable" in the Comment Edited settings. Then it works.
Comment #8
MichelleOk, thanks for letting me know.
Michelle
Comment #9
aharown07 CreditAttribution: aharown07 commentedIn CE 6x-1.4 this is broken again.
#988808: Latest release breaks $comment->comment_edited in Advanced Forum 2.x
Comment #10
MichelleI don't use the module... Someone needs to tell me what he changed the variable to.
Michelle
Comment #11
snufkin CreditAttribution: snufkin commentedIf there is a breakage it wasnt intentional, I'll look into it. I was a bit focused to get the SA fix out, sorry.
Comment #12
MichelleFixing category. I'm filtering out FRs right now and don't wan to lose track of this.
Michelle
Comment #13
aharown07 CreditAttribution: aharown07 commentedRolling back Commented Edited to the previous release works fine in AF 2 Alpha3. I don't have opp. to test right now in the Dev version. Fairly confident there is no AF issue here. Just posted here for the benefit of anyone having the problem who lands here on their search.
Comment #14
MichelleWell, if the variable in the template changed, that needs to be changed in AF as well. Going to set this NMI since there's nothing more I can do at this point. Please set it active if/when there is something in AF I can do.
Thanks,
Michelle
Comment #15
MichelleCleaning up the queue. If there's something AF can do here, feel free to re-activate.
Michelle
Comment #16
snufkin CreditAttribution: snufkin commentedI am wondering how to resolve this elegantly so that it works with AF. the bit of code in the older version that worked was:
In hook_comment op view:
which changed to (still in hook_comment op view)
and i added a new preprocess:
should i undo the preprocess function perhaps?
Comment #17
aharown07 CreditAttribution: aharown07 commentedWhatever works is OK by me :)
Anybody tested this lately? I haven't moved to the latest AF alpha yet.
Comment #18
MichelleSorry, I've been really busy and then really sick and haven't looked at this, yet.
Michelle
Comment #19
aharown07 CreditAttribution: aharown07 commentedNo big rush on my account. :) It'll be a while before I'm ready to test anyway.
Comment #20
MichelleSetting anything with code to "needs review" but a proper patch would be helpful if you're still interested.
Comment #21
mcdruidI'm not entirely sure what changed where to break this, but I got it working (with comment_edited 6.x-1.4) by making the small change in the attached patch.
I had to hack comment_edited module to get it to actually record anything in the comment_edited_data table, and therefore actually put anything in $comment->comment_edited but perhaps that's just because I don't understand how it's supposed to work.
Anyway, with this patch applied to AF, I get comment edited messages showing up as expected.
I'm going to commit this to 6.x-2.x branch now, but it would be great if someone who actually uses this combination of modules could confirm that the patch fixes the issue for them - aharown07?
Comment #22
aharown07 CreditAttribution: aharown07 commentedWill have to get back to you on that.
I'm using comment edited w/o any problems now but can't remember what I did to make that happen. My live site is AF 6x2 alpha 3. Comment Edited I'm using is ver. 6x1.3
Have a test site w/Alpha 4.
Comment #23
aharown07 CreditAttribution: aharown07 commentedI am not able to verify that this works. Quite likely I'm doing something incorrectly.
I applied the patch manually to my Adv Forum alpha4 and upgraded Comment Edited to 6x 1.4
Comment edited lines were not displaying in my "Naked" theme.
Took a look at advanced_forum.naked.post.tpl.php and found that it was using a $post_edited variable rather than $comment_edited. Made changes there but still not seeing any comment edited lines.
Have I got the wrong template maybe?
Comment #24
mcdruidThanks for testing aharown07.
The template should be using $post_edited, as that's the name of the variable where AF's preprocess function puts the output of the comment_edited module:
Would you be able to test with the latest dev release of AF please? as this is where I made the changes.
Comment #25
aharown07 CreditAttribution: aharown07 commentedGiving the dev release a go. Should have results shortly.
Update: using Comment Edited 6x-1.4 and Advanced Forum 6.x-2.0-alpha4+38-dev, the edited-by info is not displaying when I edit comments either as user1 or as another user.
Not sure why yet. I'll check my Com Ed settings etc. for anything obvious then look at templates I suppose... maybe something in my theme is interfering?
(Tried both with and without the "use template variable" option enabled in Comment Edited... and with both Naked and Blue Lagoon themes... still no comment edited info apearing)
Comment #26
aharown07 CreditAttribution: aharown07 commentedCorrection.
Old Comment Edited lines are displaying. For some reason, new ones are not. Given how AF's part of it appears to work, the problem must be in Comment Edited somewhere... it's not loading anything into the variable for AF to display.
Update: tested with Comment Edited 6x-1.3 - works fine.
It appears that 6x-1.4 is broken.
Comment #27
mcdruid...which might explain why:
I'm going to mark this as fixed for now, as it seems we've done what we needed to in AF.
Comment #28
mcdruidI was curious about this, so I checked what I had to hack to get comment_edited working.
It was this line in comment_edited.module (in the 6.x-1.4 release):
...which I changed to:
If you check the dev release of comment_edited, this change is in there too. So it does indeed look like 6.x-1.4 is at least somewhat broken.
Perhaps try the dev version, or ask snufkin very nicely to make a new release.