Skip to:
Content

Opened 7 years ago

Closed 6 years ago

#633 closed enhancement (fixed)

Anonymous Posting

Reported by: so1o Owned by: so1o
Milestone: 1.0 Priority: high
Severity: minor Version: 1.0-rc-2
Component: Back-end Keywords: has-patch
Cc:

Description

enhancement to enable anonymous posting.

i have made changes to the code to add a couple of hooks and filters. the anonymous posting is enabled through a plugin. i will add the plugin to the plugin browser once the changes go in.

Attachments (5)

633.diff (1.7 KB) - added by mdawaffe 7 years ago.
anonymous.php (4.3 KB) - added by so1o 7 years ago.
anonymous posting plugin
anonymous.php.txt (4.9 KB) - added by so1o 7 years ago.
anonymous plugin version v3
Ticket-633.patch (4.0 KB) - added by so1o 7 years ago.
Add anonymous role capabilities.
Ticket-633.2.patch (6.1 KB) - added by so1o 7 years ago.
Add anonymous role capabilities.

Download all attachments as: .zip

Change History (20)

comment:1 so1o7 years ago

  • Owner set to so1o
  • Status changed from new to assigned

comment:2 so1o7 years ago

attached the patch and the plugin to the ticket!

cheers!

comment:3 so1o7 years ago

  • Keywords has-patch added

comment:4 Null7 years ago

Why as a plugin?

comment:5 follow-up: mdawaffe7 years ago

633.diff

What if we make an anonymous role that plugins can add to (or subtract from) as they like?

I'm not sure what implications this has on core code, so we'd have to check things over.

mdawaffe7 years ago

so1o7 years ago

anonymous posting plugin

comment:6 in reply to: ↑ 5 so1o7 years ago

Replying to mdawaffe:

633.diff

What if we make an anonymous role that plugins can add to (or subtract from) as they like?

I'm not sure what implications this has on core code, so we'd have to check things over.

its a good idea. the implication is that we have hardcoded 'bb_current_user else die' stuff all over the code. also we will need to make a few changes to the database if we want to fully support anonymous posting, because currently posts and topics require an author. the plugin that i have added will just set the author as '0' (zero).

what do you guys think?

comment:7 mdawaffe7 years ago

Setting to zero is fine.

This is one of those things I'd like to see core allow but not support (at least not soon). If we can get core up to snuff so that a plugin can turn on anonymous posting without to much hassle, I'm all for it.

comment:8 so1o7 years ago

ok.. then the patch that i have added will add a few hooks to enable the anonymous posting. I will also update the plugin which will work with that patch..

test it out..

so1o7 years ago

anonymous plugin version v3

so1o7 years ago

Add anonymous role capabilities.

so1o7 years ago

Add anonymous role capabilities.

comment:9 so1o7 years ago

  • Version set to 1.0-alpha (trunk)

ok.. here's an attempt to get this done.. I have updated the patch http://trac.bbpress.org/attachment/ticket/633/Ticket-633.2.patch

couple of things to watch out for.

  1. Admin page for users could be done better.
  2. we will need an upgrade SQL to add a anonymous user to DB with user ID '0' (zero)
  3. function bb_auth - currently i have removed the code for it. there are two options we can have
    1. remove the code which i have done
    2. add code to check for capabilities inplace of bb_auth

thoughts?

comment:10 sambauers7 years ago

I think it would be better to not rely on a database entry to make this work. There must be some way to intercept calls for a user with id 0 to achieve the same result.

comment:11 so1o7 years ago

how about faking a BB_User with ID = 0 and role = anonymous

would that be a good option?

comment:12 Null7 years ago

And how to deal with spambots/users when this is active?

Automaticly use some form of Captcha for anonymous posting? (this should be build into the plugin then)

comment:13 _ck_7 years ago

If people want to resist registering then give them other easy ways to post like "Open ID" - anonymous comments on a blog post is one thing but an open forum with no identities will create insanity.

If it has to exist, I'd like to suggest a random user id # instead of "0" is made on each forum that chooses to activate this "feature". This will make it harder for spam bots and hackers. bbpress will know which id is "anonymous", doesn't have to be zero. Zero would also break most any plugin that checks user_id.

Please don't create this "feature" without some kind of turing test attached (ie. captcha, 2+2=? or something) and make it off by default. Otherwise bbPress will become known as the spammer's choice.

Can I nominate the name of the role for anonymous visitors? ;-)
if bb_user_can("spam") {echo "spam away!";}

comment:14 oledole6 years ago

so1o: I'm trying out the plugin and the 633.diff patch at my forum (with a few mods so it only enables anonymous replies to all ready existing topics, since creating new topics didn't work for anonymous user), and it works ok. However, it doesn't add the name used by the anonymous user to the poster_name column (it adds the name of a logged in user though). Would that be an easy thing to fix?

comment:15 so1o6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.