- Posts: 41
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
How to write Plugins for LS 3.x?
- Heinrich
- Topic Author
- Offline
- Senior Member
Less
More
5 years 4 months ago #177544
by Heinrich
How to write Plugins for LS 3.x? was created 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
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
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
5 years 4 months ago - 5 years 4 months ago #177552
by DenisChenu
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 .
I don't answer to private message.
Replied by DenisChenu on topic How to write Plugins for LS 3.x?
You can first use
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 …
Code:
class renderMessage extends PluginBase
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 .
I don't answer to private message.
Last edit: 5 years 4 months ago by DenisChenu.
The following user(s) said Thank You: Heinrich, f_funke
The topic has been locked.
- Heinrich
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 41
- Thank you received: 1
5 years 4 months ago #177566
by Heinrich
Replied by Heinrich on topic How to write Plugins for LS 3.x?
Thank you very much for your quick reply! I will try to implement your hints. Thanks.
The topic has been locked.