Giter Site home page Giter Site logo

gothick / phpbb-ext-akismet Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 2.0 211 KB

Run phpBB posts through the Akismet anti-spam service. Master branch compatible with phpBB 3.2.1 and onwards.

License: GNU General Public License v2.0

PHP 95.76% HTML 3.53% Shell 0.71%

phpbb-ext-akismet's Introduction

phpbb-ext-akismet

Build Status Scrutinizer Code Quality

Note: You should use the Akismet Extension from the official Extensions directory (GitHub) rather than this repository. This is not official phpBB software. It was a homebrew extension I wrote that formed some of the basis for the official extension, and I'm not maintaining it any longer.

A phpBB Extension that runs all new topics and replies through the popular Akismet anti-spam service. Anything that Akismet detects as spam will be placed in the moderation queue.

  • Install in the normal way (use the latest release that's compatible with your version of phpBB).
  • Configure under Extensions->Akismet Settings. You'll need an API key for Akismet. (You can opt to pay nothing for one if it's for non-commercial use.)

Admins and moderators will bypass the check automatically. Any moderation action taken by the Extension will appear in the Moderation log. Moderation notification emails will note specifically if the moderation was due to an Akismet check. If you have problems, check the phpBB error log. In the event of a failure the Extension should quietly log a message and allow the post through.

Future Roadmap

  • Add configuration option for skipping the check if a user has > N approved posts already.
  • Allow reporting (to Akismet) of missed spam and false positivies.
  • Show basic statistics of spam detections on an ACP page.
  • ACP page to verify the API key and connection to the Akismet servers.

phpbb-ext-akismet's People

Contributors

alhitary avatar dependabot[bot] avatar gothick avatar momo-i2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phpbb-ext-akismet's Issues

phpbb 3.0.14?

Hi. Great work!
What version will work for phpbb 3.0.14?

The extension shouldn't send emails

What the extension should actually do is simply place things in the moderation queue, as it does. Then another extension—something like the existing Board Watch MOD but for phpBB 3.1—should be used to configurably mail people when there are things in the queue. However, it looks like we're not getting a Board Watch-style extension any time soon, so for now, we'll live with a very simple email interface.

Can not enable in phpbb 3.2.1

I upload it to the ext file under my phpbb, however I can not see any activate link nor any info on the admin control panel of phpbb.

Is there any advice, or does it work with phpbb 3.2.1?

Thanks and best regards!

Use of enable_super_globals()

The third-party client library used to invoke Akismet, tijsverkoyen/Akismet uses $_SERVER quite extensively. This is perfectly reasonable, as far as I can see, but it means I have to wrap the isSpam() call with phpBB's $request object's enable_super_globals()/disable_super_globals(), which doesn't feel that "clean", and is apparently a Bad Thing ("We would not allow something like this in our extensions database".)

On the other hand, tijsverkoyen/Akismet is by far the most popular Composer-enabled Akismet client on Packagist and seems a sensible choice, and I don't want to go forking and altering it just because enable_super_globals() doesn't seem "nice". Is there any better way? Is enable_super_globals() that terrible? I've asked on the phpBB extension developers' forum.

Emails and moderation log entries should be in language of the Akismet user, not the poster

Our Akismet checks are performed by a kind of "admin bot", who's normally proxying for a real administrator/global moderator. I call this the "Akismet user". You nominate a user to be the Akismet user in the Extension's settings. On a small board with a single admin user, it would typically be that admin user.

All emails and moderation messages sent/logged by this extension should be written in the language of that Akismet user. This has proven very hard to do with phpBB, as it seems to be geared up only to internationalise in the language of the current (i.e. session) $user. For example, to translate a string, you'd typically use $user->lang['THE_STRING'] on the global$userobject. However, there doesn't seem to be a nice clean way to create a$user` object for an arbitrary other user so you can do that for someone else's language.

The practical upshot is that, even if all strings had translations provided, if a board with a British moderator received spam from a user whose language setting was Japanese, then this extension would email a notification in Japanese to the British user, and log the spam detection in the moderation log in Japanese, which clearly isn't ideal...

We should find a way to fix that. I did make some attempts, but any resulting code just seemed hacky, lengthy, or otherwise nasty, so I gave up. It may be that we can't do this cleanly without changes to phpBB...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.