*

iiui awan

  • ****
  • 118 posts
spam protection idea
« on: January 30, 2022, 03:37:45 PM »
creat a plugin with country bloked option in which we will blocked specific country from where the spam is coming

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #1 on: January 30, 2022, 07:45:35 PM »
Such a plugin already exists, but I can't tell you about it because I'll get banned.

*

MB Themes

Re: spam protection idea
« Reply #2 on: January 31, 2022, 02:53:47 PM »
Such a plugin already exists, but I can't tell you about it because I'll get banned.

You will not for sharing name.

creat a plugin with country bloked option in which we will blocked specific country from where the spam is coming

In past I was testing blocking particular countries via htaccess file and it did not worked. These bots can mask their IPs well. What worked better was allowing just particular countries (i.e. mid europe).
Problem here as far as I remember was, that not for all IPs it was possible to recognize country and those will not match to filter.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #3 on: January 31, 2022, 11:00:46 PM »
You will not for sharing name.

Ok, thank you.

you can google osclass geoplugin

*

Tango

  • ****
  • 214 posts
Re: spam protection idea
« Reply #4 on: February 01, 2022, 03:57:19 PM »
@cartagena68
Code: [Select]
PHP Notice: geoPlugin class Notice: currencyConverter has no value. in \oc-content\plugins\geoplugin\geoplugin.class.php on line 124
Thanks for the plugin! ;)

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #5 on: February 01, 2022, 04:33:51 PM »
I think is a notice triggered by the plugin himself.
You're welcome

*

Tango

  • ****
  • 214 posts
Re: spam protection idea
« Reply #6 on: February 01, 2022, 04:40:18 PM »
I think is a notice triggered by the plugin himself.
That's the idea. :D
And taking into consideration that you're the plugin dev, then v1.0.3 is needed. ;D

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #7 on: February 01, 2022, 05:55:11 PM »
When did you see the notice?

*

Tango

  • ****
  • 214 posts
Re: spam protection idea
« Reply #8 on: February 01, 2022, 06:16:31 PM »
It appears every time you access the plugin configuration.

Osclass 3.8.0
PHP 7.3.33

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #9 on: February 01, 2022, 06:50:11 PM »
Is not the plugin that need update. You are using a previous version of php and an obsolete version of osclass.
I've just tried to install the plugin in osclass v.4.0.0 using php 7.4.27 and I can't reproduce the problem. Anyway, is just a notice, not an error

*

MB Themes

Re: spam protection idea
« Reply #10 on: February 01, 2022, 08:07:42 PM »
I actually does not recognize such notice, never seen it before (...has no value).
Could it come from php 8?
Yes it is just notice, but some people log all errors to debug file and review it from time to time  :)
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #11 on: February 01, 2022, 08:22:45 PM »
I actually does not recognize such notice, never seen it before (...has no value).
Could it come from php 8?
Yes it is just notice, but some people log all errors to debug file and review it from time to time  :)

It's part of the function to convert

Code: [Select]
if ( !is_numeric($this->currencyConverter) || $this->currencyConverter == 0 ) {
trigger_error('geoPlugin class Notice: currencyConverter has no value.', E_USER_NOTICE);
return $amount;
}

I can't reproduce it even in php 8 and osclass 8.0.1

*

Tango

  • ****
  • 214 posts
Re: spam protection idea
« Reply #12 on: February 01, 2022, 11:04:49 PM »
Is not the plugin that need update. You are using a previous version of php and an obsolete version of osclass.
I've just tried to install the plugin in osclass v.4.0.0 using php 7.4.27 and I can't reproduce the problem. Anyway, is just a notice, not an error
You might check again...

Code: [Select]
PHP Warning:  array_filter() expects parameter 1 to be array, null given in \oc-admin\plugins.php on line 590
PHP Notice:  geoPlugin class Notice: currencyConverter has no value. in \oc-content\plugins\geoplugin\geoplugin.class.php on line 124

localhost (fresh install)
Osclass v8.0.1
PHP 7.4.26

- In order to enable debug mode, add in config.php:
Code: [Select]
define('OSC_DEBUG', true);
define('OSC_DEBUG_LOG', true);
- Then in oc-content folder, create a file debug.log

As you can see, on Osclass v8.0.1, installing this plugin also triggered a warning. ;)

EDIT: The reason I'm so against these Warnings/Notices, is this: https://stackoverflow.com/questions/1868874/does-php-run-faster-without-warnings/1869185#1869185
« Last Edit: February 01, 2022, 11:19:01 PM by Tango »

*

cartagena68

  • ***
  • 73 posts
Re: spam protection idea
« Reply #13 on: February 01, 2022, 11:25:02 PM »
I can't get any warning, not even php error log file is created and no error in server log.

*

Tango

  • ****
  • 214 posts
Re: spam protection idea
« Reply #14 on: February 01, 2022, 11:57:13 PM »
I can't get any warning, not even php error log file is created and no error in server log.
It might be the localhost then.
If it performs an external query to get currency data, probably it only works if the website is actually hosted online.

Also, it's best to manually create the debug.log file, as I've noticed that sometimes it doesn't get automatically created by Osclass when an error is detected.