Skip to main content
Topic: [ADDON] Double Post Stopper (Read 9013 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Re: [ADDON] Double Post Stopper

Reply #15

i want to report a problem.

when opening any topic as guest there will be an error:
Code: [Select]
min(): Array must contain at least one element
the content is not displayed.

using elkarte 1.1.0.
192.MY.ID: Forum ISP Indonesia.

Re: [ADDON] Double Post Stopper

Reply #16

Hi @live627‍ , do you have any plans to update this for elkarte 1.1?
sorry for my bad english

Re: [ADDON] Double Post Stopper

Reply #17

You should open an issue on github and see if he has plans to update this :D

Re: [ADDON] Double Post Stopper

Reply #18

I did that @Spuds‍ but no answer from @live627‍  :(
is there anyone interested on this add-on who can update it for elkarte 1.1?

https://github.com/live627/elk-dps

The add-on installs on elkarte 1.1, after install if I try to save the settings of this add-on I get an error:
str_split() expects parameter 1 to be string, array given

In elkarte error log i have:
Code: [Select]
Type of error: General
Warning: str_split() expects parameter 1 to be string, array given
/index.php?action=admin;area=addonsettings;save;sa=general
File: /sources/database/Db-mysql.class.php
Line: 299

If I try to add a consecutive post I get :
Code: [Select]
Type of error: Not specified
Exception: Call to undefined function fatal_lang_error()
/index.php?action=post;topic=948.75;last_msg=198652
File: /sources/subs/DoublePostStopper.php
Line: 122
Last Edit: November 08, 2018, 10:51:55 am by radu81
sorry for my bad english

Re: [ADDON] Double Post Stopper

Reply #19

I'm getting close ;D
the second error can be solved by replacing the line:
Code: [Select]
           fatal_lang_error('double_post_attempt', false); // You naughty, naughty person!
with:
Code: [Select]
            \Errors::instance()->fatal_lang_error('double_post_attempt', false);
sorry for my bad english

Re: [ADDON] Double Post Stopper

Reply #20

I think I figured it out. The changes made to  the settings form parser are to blame. It does not play nicely with mods that do things differently than expected. The hook for saving the settings does not pass any  objects to integrations.

To remedy this, I need to create my own $settingsForm object to save the data that way.

Also, I'm going to merge  changes made by @radu81
LiveGallery - Simple gallery addon for ElkArte

 

Re: [ADDON] Double Post Stopper

Reply #22

Sorry for the delay amd thanks for keeping updated this add-on. It works fine now with Elkarte 1.1
sorry for my bad english

Re: [ADDON] Double Post Stopper

Reply #23

Cheers :)
LiveGallery - Simple gallery addon for ElkArte