• Welcome to Simple Machines Community Forum. Please login or sign up.
December 02, 2021, 09:07:37 AM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Stop Spammer

Started by M-DVD, December 31, 2008, 07:31:43 AM

Previous topic - Next topic

nax

December 01, 2017, 10:57:26 AM #2000 Last Edit: December 01, 2017, 11:33:20 AM by nax
I have the same problem and like the poster below I'm looking for a definitive answer about what to edit.

Is the line being taken by SMF that the Stop Spammer mod is no longer available and will not function 2.0.15 onwards?

Not everyone has the skills to do the editing required.  I've removed Stop Spammer from my smaller site and applied 2.0.15 with no errors.

Trying to reapply Stop Spammer obviously gives errors and I don't want to create problems down the road by editing base files.

Is this major useful mod now dead?

Kindred

You may have to edit files manually that some mods change. Anyone line is a minor thing and won't break up grades anymore that it broke the .14 to .15 upgrade.

The definitive code change is listed about 1 or 2 pages back...   or edit the install file as indicated by butchs
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

nax

Thanks, I hate messing about with code but I seem to have understood and managed this on my smaller forum.  I need to try it on the larger one in due course.

nax

For anyone else trying here is the step by step guide.

Backup your SMF files, make a note of the Stop Spammer settings in Admin/Registrations/Settings

Put the site into maintenance mode.

Uninstall the Stop Spammer Mod

Install SMF 2.0.15

Edit the file on your server /Sources/ManageMembers.php

           find the string:-             if ($context['sub_action'] == 'query' && empty($_POST))
           replace with                   if ($context['sub_action'] == 'query' && !empty($_REQUEST['params']) && empty($_POST))

reinstall the Stop Spammer mod.

Kindred

Actually.. no...


THIS is what you shoul do.
Code (find) Select
if ($context['sub_action'] == 'query' && empty($_POST))

Code (replace) Select
if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ed2

Quote from: Kindred on December 02, 2017, 08:55:15 AM
Actually.. no...


THIS is what you shoul do.
Code (find) Select
if ($context['sub_action'] == 'query' && empty($_POST))

Code (replace) Select
if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))

Performed that function and still not working, attached a screen shot of the changes.  They are at Line #215...just to get a complete screenshot I broke the specific command into two lines.  Do you see any problems with the change?

NOTE:  I just remembered that 2.0.15 doesn't have the first command...I need to go back and start over...as mentioned previously.

Kindred

Ummm, what?


Uninstall the mod
Install 2.0.15
Reinstall the mod, ignoring the error for that line
Manually edit the file as I described above
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kitz

OMG this is getting awfully confusing.   I'm still trying to find exactly what I should be editing.   There's been so many suggestions and changes to code or which files to edit..  that for someone who normally does not edit SMF files its now reached the point of bewildering.

I've been watching and waiting for clear instructions.. and it would appear Im not the only one.   
With all due respect you Hero/Legend guys probably think its a doddle because you know what youre doing.   Reading this as someone who usually avoids amending any core files, to be quite frank its about as clear as mud.

Saying things like change code to that a few pages back or even to butchs's code when he starts off "I did something like this" and finishes with "I am testing now and hope it works" without ever getting back to us...  hardly inspires confidence for what we should be doing especially when later posts talk about package parser giving wrong info. 

I regret missing pwhodges post before the link was pulled, because that looks like it would have been the most helpful of the lot.  :(


I have so far
- Uninstalled stop spammer
- Successfully updated to SMF 2.0.15
- Downloaded StopSpammer_v2_3_9


I think I need to edit the file install_2.xml but I haven't a clue what the heck Im supposed to put where.
Is that replacement code or does it just get dumped in the file?


----
Is @snoopy_virtual still able to update this mod with correct info. 

nax

HI Kitz I almost had t right in my last post until Kindred pointed out that a string in the Stop Spammer mod really should be updated, so here are the steps needed in a simple form


Backup your SMF files, make a note of the Stop Spammer settings in Admin/Registrations/Settings

Put the site into maintenance mode.

Uninstall the Stop Spammer Mod

Install SMF 2.0.15

Install Stop Spammer 2.3.9 - you will get one error re the file  /Sources/ManageMembers.php  this is expected and as long as there is only the one error go ahead and install Stop Spammer.

You then need to edit the  /Sources/ManageMembers.php  file in your SMF forum.

Find the line in this file that begins:-

if ($context['sub_action'] ==

and replace this line with :-

if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))

Check that your Stop Spammer settings are correct in Admin/Registrations/Settings  then take your site out of maintenance mode.


Ed2

Wondering if someone could PM me a "screen shot" of the ManageMembers.php file "page" BEFORE the changes noted above are made. It would have to be Software Version SMF 1.1.11

Thanks

Arantor

1.1.11 is 10 versions out of date and not really supported any more.
No good deed goes unpunished
All helpful urges should be circumvented

Ed2

Quote from: Arantor on December 04, 2017, 06:14:13 PM
1.1.11 is 10 versions out of date and not really supported any more.

That is the dated noted on the  ManageMembers.php file in my SMF 2.0.15 Forum...do me a favor and open your SMF forum ManageMembers.php file and look at the version number at the top. Probably doesn't correspond with the SMF version listed at the bottom of the forum.

Sir Osis of Liver

Version number should be 2.0.15 in ManageMembers.php after patching .14 -> .15.  It was 2.0.11 in 2.0.13 and .14.
"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

Ed2

Quote from: Sir Osis of Liver on December 04, 2017, 10:55:40 PM
Version number should be 2.0.15 in ManageMembers.php after patching .14 -> .15.  It was 2.0.11 in 2.0.13 and .14.

Must be my problem...just had my 3500hd.com forum upgraded from SMF 1.0.X to SMF 2.0.15 and it's ManageMembers.php SMF version shows 1.1.11

BUT the ManageMembers.php in my SMF 2.0.14 (RustyBowtie.com) forum also shows SMF 1.1.11

It appears that both forums share the same ManageMembers.php file in my Godaddy CPanel.

Robomcd

Quote from: Kindred on December 02, 2017, 08:55:15 AM
Actually.. no...


THIS is what you shoul do.
Code (find) Select
if ($context['sub_action'] == 'query' && empty($_POST))

Code (replace) Select
if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))

Did that exactly as mentioned. Tried to reinstall stop spammer. 

Package manager shows the error message

QuoteError in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.

And the install protocol shows "test failed" on changing the managemembers.php file. No further messages about what is wrong. I do have httpBL installed (already longer).

Now what?

Kindred

No...  you have missed the point.

Uninstall stop spammer
Update to 2.0.15
Reinstall stop spammer
Yes, you will get an error on managemembers, install anyway
Then make the code change, manually, as listed
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Robomcd

Quote from: Kindred on December 06, 2017, 01:08:05 AM
No...  you have missed the point.

Uninstall stop spammer
Update to 2.0.15
Reinstall stop spammer
Yes, you will get an error on managemembers, install anyway
Then make the code change, manually, as listed

OK Thanks, did not understand that.

Did it as said, registered a new test person, and all seem to work as usual. 

One question.
When I go to the settings page, I see the settings in the first section, ending with "Contact number for parents to contact with age restriction queries". Then below that I see one more section between the wider colored bands, subdivided in three smaller sections. In that section is no text, only 5 boxes that are ticked already, one drop-down box without any options, and one empty text box you can fill. That is supposed to be like that, or do I need to do something else or something went wrong?



Kindred

Sounds like some mod didn't correctly add the text strings into modifications.Yourlang.php
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

PenelopeQ

Quote from: Kindred on December 06, 2017, 01:08:05 AM
Uninstall stop spammer
Update to 2.0.15
Reinstall stop spammer
Yes, you will get an error on managemembers, install anyway
Then make the code change, manually, as listed
Quote from: lesmond on November 22, 2017, 01:05:12 PM
this is the edit you need to find and replace for SMF 2.0.15 ./Sources/ManageMembers.php

Code (find) Select
if ($context['sub_action'] == 'query' && empty($_POST))

Code (replace) Select
if ($context['sub_action'] == 'query' && (empty($_POST) || ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))

Tested on fresh SMF 2.0.15 install, no errors so far.

I followed the steps, but cannot find that code--not something even close. I also compared it to the code to select and change that is shown by the little edit icon when I was trying to install. The code was not very different from the code given above and so I did not find it.

But I did install as the steps say and it is up and running and has stopped several spammers. Should I worry about  it now?

Kindred

yes...  you need to find and update that code.

It is present, unless some other mod has already changed it.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.<br /><br />"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: