Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

In this Discussion

Promotion without moderation?

This discussion is related to the Promote After Moderated addon.

Running Vanilla 2.5.1 and version 0.4 of the plugin (the one from github).

I would like to set up some sort of automation for gradually handing out more privileges to users. I tried this one, but as clearly stated in the description, this only works if moderation in enabled, which is something I would rather avoid, because it might annoy legit users.

I was wondering how big a change would it be to just check the post count (and possibly registration date)? Is it a matter of changing a few things around, or would it need a whole new different addon?

Basically, the scenario is this:

Forum gets two types of spammers. There are the quiet ones that fill up their profile with dodgy links and just sit there uglying up my member list hoping to generate some kind of SEO benefit. Then there are the loud ones that sign up and start spewing spam everywhere until they get banned. Not much you can do for the second, apart from cleaning up afterwards.

To combat the former, I set up a limited usergroup for brand new members, which can post normally, but can't edit its profile (and thus include their dodgy links and dumb ads in the text fields). I'd like to move people from New Members to Regular Members as soon as they've stuck around for a while and made a couple of posts. Ideally, legitimate users should be able to start posting immediately, and not have to wait around or jump through extra hoops. Forum staff should not have to go through each registration to make sure they don't contain dodgy links.

All this is of course on top of the regular anti-spam measures (stopforumspam, verifying emails, akismet and so on), and there will always be a degree of manual work. I'm just looking for a smarter ways to handle a tedious part.

raghu

Comments

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    That should be fairly easy. The work is all done in logModel_afterRestore_handler and only some parts of it are bound to moderation:

        /**
         * Check if log entry is pending post and level up user.
         *
         * @param LogModel $sender Instance of the calling class.
         * @param mixed    $args   Event arguments.
         *
         * @return void.
         */
        public function logModel_afterRestore_handler($sender, $args) {
            // Only take action for pending posts.
            if (
                $args['Log']['Operation'] != 'Pending' ||
                !in_array($args['Log']['RecordType'], ['Comment', 'Discussion'])
            ) {
                return;
            }
    
    

    Also the $args['Log']['InsertUserID'] depends on the LogModel. Most probably you would need to check the information of the session user.

    One problem I see is efficiency. The plugin by now only is used when a post is moderated. If it should be checked after every post, the code has to be run after each and every post, even if the user already has been promoted.
    I would recommend setting an additional flag if further processing needs to be done or not to make this an efficient process.

    How good are your programming skills? Basic skills would be enough to change the plugin to work as you would like to have it.

    If you are interested give me an impression of your skills and I'll guide you.

  • I'm a half-decent copy-paster. :lol:

    I can usually parse together what I need from other people's code, if there is something similar available, but I wouldn't go as far as claiming I know my way around php.

    One problem I see is efficiency. The plugin by now only is used when a post is moderated. If it should be checked after every post, the code has to be run after each and every post, even if the user already has been promoted.

    Would checking the usergroup making the comment or discussion be enough? New member -> run, anyone else -> no need.

Sign In or Register to comment.