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
  • Heinrich's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 weeks 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
6 years 3 weeks ago - 6 years 3 weeks ago #177552 by DenisChenu
Replied by DenisChenu on topic How to write Plugins for LS 3.x?
You can first use
Code:
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 support - Plugins, theme and development .
I don't answer to private message.
Last edit: 6 years 3 weeks ago by DenisChenu.
The following user(s) said Thank You: Heinrich, f_funke
The topic has been locked.
  • Heinrich
  • Heinrich's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 3 weeks 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.
Moderators: holchtpartner

Lime-years ahead

Online-surveys for every purse and purpose