Advertisement:

Author Topic: [Free Plugin] Anti Spam & Protection System  (Read 87492 times)

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #60 on: May 03, 2017, 03:10:49 pm »
Don't have much experience with duplicates, but any pattern that can reduce the search will help, because scanning entire database (that is not the major problem here) and comparing (this one is) is slow. Additional issue are multi-language sites, where each item can have N descriptions that needs to be considered (even if empty).

An other slow-down factor could be a busy site, with users posting ads at the same time. I don't have such and can't check it, but seems like a possible scenario.


Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #61 on: May 03, 2017, 04:34:59 pm »
or items newer than 30-90 days only.
This is a really good idea and will be definitely implemented


@dev101 or some other developer
I need to know, how the update is working? Will the plugin at first deinstalled and reinstalled or is there some other mechanism?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [Plugin] Spam Protection
« Reply #62 on: May 03, 2017, 07:33:29 pm »
If you ask about market/dashboard auto-update, I think it will simply download .zip, extract it and overwrite the original content. Nothing is changed inside database.

ojasweb

  • Newbie
  • *
  • Posts: 5
Re: [Plugin] Spam Protection
« Reply #63 on: May 03, 2017, 07:46:22 pm »
Hi, i have been using the plugin for some weeks and it works perfectly fine. however it stopped working after the last update. When i try to save the settings, it automatically redirects to homepage with this url

index.php?page=plugins&action=renderplugin&file=spamprotection/admin/config.php

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #64 on: May 03, 2017, 07:48:44 pm »
If you ask about market/dashboard auto-update, I think it will simply download .zip, extract it and overwrite the original content. Nothing is changed inside database.
i had the case, that i've made some changes on the database... added new tables, when the file will be executed, it doesn't throw out any errors?


Hi, i have been using the plugin for some weeks and it works perfectly fine. however it stopped working after the last update. When i try to save the settings, it automatically redirects to homepage with this url

index.php?page=plugins&action=renderplugin&file=spamprotection/admin/config.php
which version u r using?

ojasweb

  • Newbie
  • *
  • Posts: 5
Re: [Plugin] Spam Protection
« Reply #65 on: May 03, 2017, 07:56:57 pm »
If you ask about market/dashboard auto-update, I think it will simply download .zip, extract it and overwrite the original content. Nothing is changed inside database.
i had the case, that i've made some changes on the database... added new tables, when the file will be executed, it doesn't throw out any errors?


Hi, i have been using the plugin for some weeks and it works perfectly fine. however it stopped working after the last update. When i try to save the settings, it automatically redirects to homepage with this url

index.php?page=plugins&action=renderplugin&file=spamprotection/admin/config.php
which version u r using?

The latest version released few days ago

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #66 on: May 03, 2017, 08:06:50 pm »
1.4.0, 1.4.1 or 1.5.0?
Last 3 days i worked alot on this plugin ;)


oh, now i saw that 1.4.1 is published in market... so i think you are using this


Code: [Select]
index.php?page=plugins&action=renderplugin&file=spamprotection/admin/config.phpthis is the right url to save the settings, this file processing the form data and send it to the class, can you see any error or something else? what happened if you turn on debug mode in osclass?
« Last Edit: May 03, 2017, 08:46:06 pm by Liath »

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #67 on: May 03, 2017, 08:48:35 pm »
@Liath and @ojasweb

Personally i could never save any options in this plugin, because i get a 403 (forbidden) from mod_security. I always disable mod_security to change settings.

FYI

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #68 on: May 03, 2017, 08:53:13 pm »
@Liath and @ojasweb

Personally i could never save any options in this plugin, because i get a 403 (forbidden) from mod_security. I always disable mod_security to change settings.

FYI
i can't understand why this happened and dont know how to solve this :/

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [Plugin] Spam Protection
« Reply #69 on: May 03, 2017, 09:15:00 pm »
If you ask about market/dashboard auto-update, I think it will simply download .zip, extract it and overwrite the original content. Nothing is changed inside database.
i had the case, that i've made some changes on the database... added new tables, when the file will be executed, it doesn't throw out any errors?

Sorry, I do not understand - what errors do you expected? Anyway, you have 2 options in that case:

1) Instruct users to uninstall old version, and then install new one.
2) Keep version in database and check for changes every time, then perform an upgrade. This is common, most convenient for end-user, but takes comparison every time request is made.

It is up to you how do you wish to proceed. But, if you already did this past few version, then it is already too late to go with option (2) imho, just provide some readme file in the root (and help page).

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [Plugin] Spam Protection
« Reply #70 on: May 03, 2017, 09:16:01 pm »
Personally i could never save any options in this plugin, because i get a 403 (forbidden) from mod_security. I always disable mod_security to change settings.

Ask your hosting support to provide you with mod_security logs and paste it here, that is the only way to find out what rules were triggered.

Aficionado

  • Guest
Re: [Plugin] Spam Protection
« Reply #71 on: May 03, 2017, 09:18:26 pm »

Ask your hosting support to provide you with mod_security logs and paste it here, that is the only way to find out what rules were triggered.

Well i prefer to disable for a while, instead of the trouble to change the plugin(s) work. Not worth it.


Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #72 on: May 03, 2017, 09:23:10 pm »
Sorry, I do not understand - what errors do you expected?

Following i mean:

all databases for this plugin will added through
Code: [Select]
if (!$this->dao->importSQL($sql)) {
    throw new Exception( "Error importSQL::spam_prot<br>".$file ) ;
}

example in file all versions before was like:
Code: [Select]
CREATE TABLE `/*TABLE_PREFIX*/t_spam_protection_items` (
then i thought about errors while executing the sql statements, that existing tables cant be overwritten, so i went to a small alternative

Code: [Select]
CREATE TABLE IF NOT EXISTS `/*TABLE_PREFIX*/t_spam_protection_items` (
now i don't know if this is enough to prevent errors with it... but i think it should be ok, or not?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: [Plugin] Spam Protection
« Reply #73 on: May 03, 2017, 09:28:51 pm »
Well, it is normal that PHP did not throw any errors, but that does not mean that SQL didn't. In any case, you are calling importSQL only during plugin install, right? When you simply overwrite the files, plugin is not technically re/installed, just updated with php/html/js code. But, errors will be thrown eventually, when you ask for non-existent columns and data.

Again, when you need to properly update your plugin, keeping older versions in mind, you have to check for the currently active version, then perform special upgrade functions per each scenario, and those upgrade functions should only do the necessary modification to the existing table(s). Check upgrade-funcs.php in osclass core, it is the same principle you can use for plugins. In order for this to work, you must store plugin version @ database.

Liath

  • issues
  • Hero Member
  • *
  • Posts: 1346
  • </html> the end is always near
Re: [Plugin] Spam Protection
« Reply #74 on: May 03, 2017, 09:35:28 pm »
ok thx, i'll take a look there