#3660 closed enhancement (fixed)
Add Akismet to activity stream
Reported by: | DJPaul | Owned by: | DJPaul |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Activity | Keywords: | |
Cc: |
Description
Add Akismet into the activity stream. Involves creating backend pages in wp-admin.
Change History (39)
#3
@
13 years ago
First pass at the front-end changes are in. Specifically:
BP-Default
- Added bp_dtheme_spam_activity().
- Updated global.js for activity spam button AJAX.
- Updated bp_dtheme_new_activity_comment() for the new hide_spam param.
- r5255 and r5256.
Activity
- Added new "is_spam" column to the bp_activity DB table; incremented DB version number to force schema upgrade.
- Akismet support is only loaded when the WordPress Akismet plugin is active and configured.
- Added new "hide_spam" parameter to the entire Activity template loop stack; defaults to true, except if specific activity items have been requested (for backpat reasons).
- "Mark as spam" buttons are added to activity stream items and comments, for site admins (filterable - "bp_activity_akismet_user_can_mark_spam").
- By default, only status updates and comments are checked for spam (filterable - "bp_akismet_get_activity_types").
- Removed a few old PHP4 constructors and general code tidy up.
Todo
- wp-admin screens for the Activity component.
- If a status update is marked as spam, and it has activity comments against it, the activity comments aren't visible. Consider adding something like a "this comment is pending notification" placeholder in the output so that those activity comments aren't hidden.
#4
@
13 years ago
Still working on admin UI. I'm also refactoring the hide_spam stuff to be more flexible, so we can request spam, ham, or all items in the template loops. I'm also moving some of the mark_as_spam stuff out of the Akismet class into the general Activity functions so people are able to plug in their own spam detection systems.
#5
@
13 years ago
Second pass is in:
Admin
- Added Activity admin screen into wp-admin. Lists/searches/filters activity. Action links aren't implemented yet.
Activity
- Refactored main "mark as spam" functions out of Akismet class into Activity core; allows implementation with other spam checking services and plugins.
- Updated hide_spam parameter on entire Activity template loop stack; values are now "ham_only" (default), "spam_only", and "all".
BP-Default
- "Mark as spam" button on activity stream entries is now functional.
Todo
- Hook up action links in the admin screen.
- Implement "edit" and "reply" functionality into admin screen
If anyone wants to contribute help towards any of this, let me know :)
#7
@
13 years ago
r5280 added the following:
Add Akismet history information to the Activity admin page's items.
Use new wrapper functions to get user's UA and IP for Akismet calls.
Rename Activity admin page slug.
#8
@
13 years ago
This might need to go into its own ticket, but if a post is spammed (or hammed), that post's activity stream item should be spammed (or hammed), too.
#9
@
13 years ago
(In [5325]) See #3660. Activity admin iteration.
- Update automatic Akismet submission hook priority (r5276).
- Update "In Response To" column.
- Update Contextual Help.
- Spam, un-spam and delete action buttons work.
- Small styling tweaks.
- Switched some $bp global and BP_VERSION to use the new wrapper functions.
#12
@
13 years ago
Todo looks like:
- Add javascript "Reply" form.
- Add "Edit" screen.
- Todo: Marked "if we're viewing a specific activity, check/merge $activity->children into the main list (recursive)."
- Todo: Marked "Get comment count from a specific node"
#17
@
13 years ago
(In [5396]) See #3660. Activity admin iteration.
- Updated use of old, incorrect bp_activity_get_specific() spam parameter to new name.
- Updated contextual help.
- Updated In Reply To column; now correctly shows details of that activity.
- Made speech bubble appearance consistent between root activities vs. non-root activities.
#18
@
13 years ago
(In [5408]) In the Activity admin, fix certain activity types showing incorrect "In Reply To" information.
#21
@
13 years ago
(In [5426]) Activity admin iteration. See #3660.
- Pluralise the name of top-level Activity menu to match other menus' titles.
- Update contextual help for Activity index screen, and fix deprecated function use.
- Move index/edit screen generation into separate functions; restructure bp_activity_admin().
- Change the In Response To column to only show speech bubble when item is a root activity, rather than for any node that contains children. This changes the single activity filter screen to match BP-Default's activity permalink screen.
#23
@
13 years ago
Just to note that I'm aware of the bug where the "activities per screen" option isn't working.
#25
@
13 years ago
I think you need to add a Enable/disable option for Akismet on BuddyPress.
Many people could want Akismet for comments but not for buddypress.
#26
follow-up:
↓ 30
@
13 years ago
I'm happy to add a filter in which could be used to prevent the Akismet support being loaded for the Activity component. But I would need convincing that there needs to be a UI option for this, or that there's a meaningful use case somewhere where you want Akismet for comments, but not for anything else (e.g. bbPress forums, activity).
#27
@
13 years ago
(In [5435]) Activity admin iteration. See #3660.
- Fix "n activities per screen" option not working (and only load on the index screen).
- Fix activity type filter drop down.
- Fix PHP warnings when the index screen tried to truncate activity item's contents.
- Add "bp_activity_use_akismet" filter to allow Akismet integration with Activity to be disabled.
- Add first version of the Activity edit screen, and its contextual help text.
#28
@
13 years ago
I could do with some help testing the activity edit screen, specifically from sites that aren't using the GMT timezone. If you edit an activity and set its timestamp to e.g. 5pm local, does the time it displays on the front of the site match 5pm local? If you're able to look in the database, it shouldn't say 5pm, but would say 5pm plus/minus your timezone offset from GMT.
#30
in reply to:
↑ 26
@
13 years ago
Replying to DJPaul:
But I would need convincing that there needs to be a UI option for this, or that there's a meaningful use case somewhere where you want Akismet for comments, but not for anything else (e.g. bbPress forums, activity).
Akismet has a free query limit.
You coult have 10, 20, 30 comments day, but you can have hundreds of activities each day. That means that many people may find that the exhaust it.
That can mean two different things, one that more people pay for Akismet. Two, there will be many people who uninstall Akismet to not have that problem.
Another reason, I had Akismet in bbPress. I uninstalled Akismet because 25% of legitimate post ended in Akismet moderation. I was all day marking legitimate post as not spam.
If it will be going to be the same with BuddyPress activities, this can become a hell.
#31
@
13 years ago
A filter was added in [r5435] per your request. It would be extremely easy for a plugin dev to create a plugin to disable Akismet for the activity component.
#33
@
13 years ago
I also need to go back through all of this and add/check we've got enough useful actions and filters around the screens.
#34
@
13 years ago
(In [5484]) Activity admin iteration. See #3660.
- Add remaining activity properties to the edit screen.
- Add new contextual help to the edit screen.
- Add support for 2 columns to the edit screen.
- Fix a typo (props fanquake, see #3822).
- Update BP_Activity_Activity::save() method to fix a bug where an update operation with no changes was reported as an error.
- Update activity admin CSS, bump version number.
Per the dev meeting, this one's mine; there's a proof of concept in the BP Labs plugin.