Skip to:

Opened 13 years ago

Closed 10 years ago

Last modified 8 years ago

#3245 closed enhancement (no action required)

Comment postmetadata text terms confusing

Reported by: hnla's profile hnla Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Templates Keywords: 2nd-opinion needs-refresh
Cc: hnla


N.B. this is a rough ticket with patch as a preliminary look at what seems to be an issue but might be in fact a spurious understanding of behavior, also it's straddles the divide between a WP aspect and a BP one.

When viewing a single post metadata is displayed showing whether there are comments or not, or whether comments are closed etc.

To understand the issue it's necessary to see that there are a approx three conditions 'has comments', 'comments closed', and 'comments off' as well as comments off but pingbacks on

Looking at a post without comments and with post comments and ping backs set to 'Off' we see 'comments off' then with comments off in the post but pingbacks on we display 'No Comments' this is linked yet can't function as a link to comment form as comments are 'off' it feels wrong and ought to say 'Comments Off, Pingbacks on' ? now with comments on and pingbacks on we display again 'No Comments' which is fine there are no comments and the text now links to functioning comment form.

Now add a comment to the post, correctly it states ' 1 comment' however now turn off comments i.e close further comments, we still display '1 comment' but this still links to a form that will not function.

The patch addresses some of these issues by testing for all permutations of the comments state and adding further descriptive text e.g 'Comments Off, Pingbacks On' or '1 Comment >> Comments now closed'.

There is a further aspect to this in the comment.php logic which prints whether comments are off or whether pingbacks are on but comments off, I started work on those conditions as well to add 'closed' as well as 'off' but haven't checked that carefully nor am I sure that closed is actually required as these conditions don't display if comments are listed.

Again this is a testing patch and I fully expect to have overlooked something or other in all this. One thing that I'm not sure about is unlinking the 'no comments' as this is handled by comments_popup_link()

Attachments (4)

comment-postmetadata-refinements.patch (1.8 KB) - added by hnla 13 years ago.
add enhancements to comment metadata text
#3245-comment-postmetadata-refinements-rev2.patch (2.2 KB) - added by hnla 13 years ago.
Revision to original patch
#3245-comment-postmetadata-refinements-rev3.patch (2.4 KB) - added by hnla 13 years ago.
Further revision - missing condition added
3245-4.patch (2.4 KB) - added by DJPaul 13 years ago.

Download all attachments as: .zip

Change History (22)

13 years ago

add enhancements to comment metadata text

#1 @hnla
13 years ago

Realised I ought to have simply bypassed the comments_popup_link() if my test for !comments_open() was false and added a new ' 1 comment' or ' % comments' which would be simple to do replacing '%' with get_Comments_number() or comments_number() this would effectively remove the link when not required.

#2 @hnla
13 years ago

Updated patch to change the comments_pop_link() or rather remove it if comments 'off' or 'closed' so that the links are lost, it's replaced with a custom query on comments count and _e() display which undoubtedly needs correcting as my approach to a $variable = _e(); and then _e( $variable . 'some further text') strikes me as probably wrong or problematical.

Revised patch also correct flawed logic allowing no comments to display even if comments 'off'

13 years ago

Revision to original patch

13 years ago

Further revision - missing condition added

#3 @hnla
13 years ago

Revison 3 patch accounts for a missed condition and removes a now unneeded one. This - in respect of this postmetadata aspect - appears to cover all perms, now of course needs to be written better without bloating the file with repeated span elements, saving that for a rainy day.

#4 @DJPaul
13 years ago

  • Milestone changed from Awaiting Review to 1.3

#5 @DJPaul
13 years ago

This seems to be more complex than what the WordPress default themes have. Is there a reason?

#6 @hnla
13 years ago

Sorry missed the notification of your comment.

This tied into the other ticket on comments it might be more complex than WP but I did it as there is a discord between BP and WP, this improves on things.

#7 @DJPaul
13 years ago

  • Keywords post comments postmetadata removed
  • Milestone changed from 1.3 to Awaiting Review
  • Version changed from 1.3 to 1.2

I've spent a couple hours looking at this. An updated patch has been attached.

1) I don't think it needs to show if pingbacks are open. Most people don't know what a pingback is, and even if you do, what are you meant to do about it?
2) This would need to be patched in all relevant templates, not just single.php.
3) I don't see any value in changing the text where this patch is for. If you want to indicate that comments are closed, do that on the actual comment template, where it says "x response to <post title>", not next to the list of tags.

13 years ago

#8 @DJPaul
13 years ago

  • Keywords dev-feedback added

Not sure if we want to do this in BP-Default. Boone/JJJ, thoughts?

#9 @johnjamesjacoby
13 years ago

  • Severity set to normal
  1. Agreed. Pingbacks are mostly transparent. I don't think we add any extra styling to our pingbacks either do we? If so, it makes sense to mention them.
  2. Except for pages. If comments are off on that page, we shouldn't show anything about comments at all. Otherwise you end up with a page that is stuck talking about comments that don't exist.
  3. In the context of a social blog, I like the Comment status being advertised as part of the meta area. It lets the community know whether or not this place is off limits, right away at a glance.

#10 @johnjamesjacoby
13 years ago

  • Keywords 2nd-opinion added; dev-feedback removed
  • Milestone changed from Awaiting Review to 1.5
  • Version 1.2 deleted

Moving to 1.5 to get 2nd opinions.

#11 @boonebgorges
13 years ago

I like this idea but I think it's too late for this milestone. Proposing to bump it.

#12 @DJPaul
13 years ago

I would also agree with bumping but I also do not want to see theme enhancements (fixes are fine) in the 1.5.x cycle as that will cause headaches for people upgrading to future 1.5.x releases, just like it did in 1.2 (re: secondary avatars in activity stream, and the like). I'm suggesting we wontfix unless this patch gets updated and built and tested in the next day or two, tops.

#13 @hnla
13 years ago

Originally my patch addressed a concern iirc (but it was ages ago :) ) that we generated links that simply shouldn't have been present if comments off and was why I started to look at the overall logic for these references to comments states, and it just started to feel confusing the text displayed had occasion when it didn't quite fit the actual circumstances. I agree though simply removing text might be better than my approach of covering every conceivable condition with relevant text - and god was that a headache :)

I think this ticket/patch has passed it's shelf life, bump by all means, I think trying to re-visit this within next two days not a good use of time.

#14 @boonebgorges
13 years ago

  • Milestone changed from 1.5 to 1.6

Punt city!

#15 @boonebgorges
13 years ago

  • Keywords needs-refresh added

I like this idea, but the patch needs a refresh in order to be considered for 1.6.

#16 @boonebgorges
13 years ago

  • Milestone changed from 1.6 to Future Release

#17 @boonebgorges
10 years ago

  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

Since bp-default has been decommissioned, BP no longer ships with blog post templates. This is the job of whatever WP theme is being used. For this reason, I'm going to close the ticket as invalid.

#18 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.