News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Warnings and Moderation

Started by robinrobin, February 06, 2009, 03:32:15 PM

Previous topic - Next topic

robinrobin

Right now, i have two questions:

How can i make the warning level meter when giving someone a warning get a minimum range of ten points instead of five? (10, 20... 90, 100 instead of 5, 10, 15 etc)

How can i remove the pop-up notification for users posting under a moderation watch as well as deactivate the color-change and message in the posts that they submit? I want it to appear to users as if their posts are live when they post them even when they are actually unapproved and not visible to the others.

2.0 RC1


phpMyTony

Is there a certain mod for this? If so, please use the support topic for it.

robinrobin

There is none for 2.0 RC1 so far, no.

karlbenson

Warning / Moderation is a core feature in smf 2.x

However there are no settings to do the specific things which the user is asking.
(Making unapproved posts appear like approved ones is a bit sneaky/unethical? no?)

aldo

Well, I do not believe you can change how much the warning level increments.

For the second part, it would involve editing Post.template.php, and I believe this is what you would need to do:
In Post.template.php, Find and remove:

', ($context['becomes_approved'] ? '' : 'alert('' . $txt['js_post_will_require_approval'] . '');'), '


However, removing the color of unapproved topics and messages wouldn't be such a good thing as it would be a bit harder to see which posts and topics are not approved...

But, whatever :P

In MessageIndex.template.php find:

         // Calculate the colour class of the topic.
         if ($context['can_approve_posts'] && $topic['unapproved_posts'])
            $color_class = $topic['approved'] ? 'approvebg' : 'approvetbg';
         else
            $color_class = !empty($settings['separate_sticky_lock']) && $topic['is_sticky'] ? 'windowbg3' : 'windowbg';


Replace with:

         // Calculate the colour class of the topic.
        $color_class = !empty($settings['separate_sticky_lock']) && $topic['is_sticky'] ? 'windowbg3' : 'windowbg';


In Display.template.php find:

$message['approved'] ? ($message['alternate'] == 0 ? 'windowbg' : 'windowbg2') : 'approvebg'

Replace with:

$message['alternate'] == 0 ? 'windowbg' : 'windowbg2'


And it should do what you want :)

robinrobin

The forum i want to do this in is strictly moderated. I simply want to make it so that human spammers don't come back a second time pretending to be a behaving user for a certain amount of posts when they automatically would switch to another user group, and then wrecking their havoc when they noticed that their posts no longer have to be approved. Making spammers believe that their posts are reaching through from the first one while they actually are hidden is an effective way to stop spammers from coming back. I have tested this before in other bulletin board softwares. I hope some security-aware modder can try this out in SMF for him/herself and share the way to do it with the rest of the world.

robinrobin

Thank You, Aldo!

The modification to MessageIndex.template.php is unnecessary since only members of the staff can see the changed topic color anyways.

The modification to Display.template.php didn't make any visible difference.

The color of the unapproved posts are still red while viewing a topic and has the note about the need for approval still visible to the author of the post. There's a note at the top of the editor interface when writing a post too that would need to be removed.

aldo

About the second message, I am not sure. You could remove this:

// If this won't be approved let them know!
if (!$context['becomes_approved'])
{
echo '
<tr>
<td></td>
<td align="left">
<i>', $txt['wait_for_approval'], '</i>
<input type="hidden" name="not_approved" value="1" />
</td>
</tr>';
}

In Post.template.php however I don't think it would be a smart idea as the not_approved thing is probably needed, though you could do it another way I suppose by just echo'ing:

<input type="hidden" name="not_approved" value="1" />

In the template

robinrobin

Thanks again, Aldo! That worked fine, removing all that.

What about the "(Awaiting Approval)" text added to the end of the topics while viewing the board for the author?

aldo

Mhmm.

In MessageIndex.template.php find:

echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], (!$context['can_approve_posts'] && !$topic['approved'] ? '&nbsp;<em>(' . $txt['awaiting_approval'] . ')</em>' : ''), '</span>', $topic['is_sticky'] ? '</b>' : '';


Replace with:

echo '
', $topic['is_sticky'] ? '<b>' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '</b>' : '';


Should do the job. ;)

robinrobin

Dude, where have You been all my life? lol ;)

That worked perfect too. Since spammers most often are prepared and try to post as much as possible as fast as they can, there's a great chance they won't actually notice that the posts are moderated now since it's only visible if they actually enter their topics/posts after they've been made.

aldo

Your welcome :)

And interesting, be sure to tell us if this works and how much of a decrease you see in spam.

robinrobin

Sorry to bother You further Aldo, but i rarely come across as helpful people as You, so i'd like to ask some more questions i've been thinking of before:

Can i disable the need to enter an e-mail address when guests post under moderation?

Can i remove the "Return to topic" alternative on the Additional Options drop-down list at the bottom of the post-editor?

robinrobin

Oh and by the way, i'm sure it will work great Aldo. =O)

aldo

1) I do not believe it is a feature you can do, you could certainly remove such a thing by editing Post.php and Post.template.php
2) I am not sure what you are talking about. Could you be more specific?

robinrobin

Thank You.

If You try and reply to this topic again, and check right under the text-field where You write Your reply, there's an "Additional Options..." alternative. On that drop-down list, when You click it, You'll see a "Return to this topic." alternative that You can check. By doing so, well, try it out.

aldo

Oh, that. I think it would be something like this:
In Post.template.php find:

<td class="smalltext"><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . ($context['back_to_topic'] || !empty($options['return_to_post']) ? ' checked="checked"' : '') . ' value="1" class="check" />


replace with:

<td class="smalltext"><label for="check_back"><input type="checkbox" name="goback" id="check_back"' . (!empty($options['return_to_post']) ? ' checked="checked"' : '') . ' value="1" class="check" />

robinrobin

You wouldn't happen to be out of the ol' closet, would You? I'm not, but i would consider it... Haha  ;D

Anyways, i just removed the whole darn thing there (since nothing changed with Your edit) and it's still a smooth sailing.

I'm gonna see what i can do about that e-mail requirement then.

***** <- 5 stars for aldo's support

robinrobin

Here i go again...

Uh, You wouldn't happen to know how i could make the approve-requirement pop-up only appear to guests, would You? How does the user-group handling look like in the SMF code?

Advertisement: