#2016 closed defect (bug) (fixed)
activity comment markup & ajax loading
Reported by: | mikepratt | Owned by: | DJPaul |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Templates | Keywords: | |
Cc: |
Description
BP 1.2 final
WPMU 2.9.1
This issue presents itself when you hook into bp_activity_comments in order to add/modify markup for the activity comment function bp_activity_recurse_comments. I needed to to add some span elements to allow me to make use of sprites for acomment backgrounds.
When a new comment is made to an activity via ajax on a child theme of bp-default, the markup for that comment is initially presented via ajax.php in bp_dtheme_new_activity_comment() at line 184. Until page refresh, this is the markup for that new comment.
The solution will be to either mod both bp_dtheme_new_activity_comment() and bp_activity_comments in order to insert identical html. I see the TODO to remove the markup from bp_activity_comments and hopefully it will be consolidated into one call. For now, it causes a styling problem w/o all the hooks.
I realize this may not be a 'bug' so much as a code design issue but may be important for those needed to mod the comment markup beyond what is provided.
Perhaps can be called from bp_dtheme_new_activity_comment() in ajax.php?
Change History (6)
#2
@
13 years ago
- Keywords reporter-feedback removed
- Owner set to DJPaul
- Status changed from new to assigned
This is still an issue, and I'm working on a patch
#4
@
13 years ago
- Milestone changed from 1.3 to Future Release
- Priority changed from major to normal
The above commit makes the generated HTML output the same. The filters still need to be added, which is probably best done by consolidating these two functions into one, as Mike Pratt suggested.
Is this still an issue? From a cursory review of the code, it appears to be. This will all likely change when 1.4 hits, but for now it looks like bp_dtheme_new_activity_comment() could use some of the same filters as bp_activity_comments().