How to write Plugins for LS 3.x?

More
1 year 2 months ago #177544 by Heinrich
Hey,

we succesfully updated our LS version from 2.73 to 3.15. Everything works great except for all our self-developed plugins. No matter which one we upload the plugins folder, the plugin configuartion page on LS will show an error (page cannot be displayed).

As far as I have found out this has happened to several users. The suggestion was to delete the plugin from the plugins folder, which works apparentely.

However, what I did not find out was how to rewrite plugins such that they work in LS 3.x? I did not find any manual or any updates in how far plugins need to be rewritten such that they also work in LS 3.x. Is there any guidance out there or any hints I could use?

Thank you .

Best regards

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
1 year 2 months ago - 1 year 2 months ago #177552 by DenisChenu
You can first use
class renderMessage extends PluginBase
directly : LS3 move from \ls\pluginmanager\ to \LimeSurvey\pluginmanager\ but PluginBase is a shortcut to the good Class in all (except 2.63.1) limesurvey version.

If you still use __construct, you muts move to init. init is OK since 2.6 (and before) __construct deprecated since 2.6 and broken in 3.X

Elmse you can have some plugin with near complete compatibility : gitlab.com/SondagesPro/coreAndTools/renderMessage for example (but all code are updated according to LS api, simple plugin can work with just the 2 advice before).


PS : remind to activate debug mode for devlopment …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 1 year 2 months ago by DenisChenu.
The following user(s) said Thank You: Heinrich, f_funke

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #177566 by Heinrich
Thank you very much for your quick reply! I will try to implement your hints. Thanks.

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!