Coder Social home page Coder Social logo

gothick / phpbb-ext-akismet Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.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

Hi, I’m @gothick. I'm a random geek from Bristol, England. I've been programming for about forty years. I'm very much a jack-of-all-trades style generalist, often picking up a technology, doing some odd project in it, then moving on to something completely different.

As a day job I'm a data engineer mostly on the Microsoft SQL Server/Azure platform; in my spare time I'm now developing for Android or iOS or using (modern, usually Symfony-based) PHP on the web, sometimes adding JavaScript in whatever framework happens to be popular that Tuesday.

Along the way I've gotten good enough to hold down paid jobs using C, C++, C#, Visual Basic, PHP, JavaScript, Java, Objective C, Oracle PL/SQL, XSL, Python, SSIS, SSAS, Informatica ETL, and probably a few more things I've forgotten. I've basically become That Guy Who Knows A Bit About Everything, which I've found to be a pretty useful role, especially on smaller, fast-moving teams.

phpbb-ext-akismet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

phpbb-ext-akismet's Issues

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!

phpbb 3.0.14?

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

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...

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.

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.

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.