- Posts: 32
- Thank you received: 3
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Provide models and controllers via extensions
- jackrabbithanna
-
Topic Author
- Offline
- Junior Member
-
Less
More
2 years 5 months ago #206282
by jackrabbithanna
Provide models and controllers via extensions was created by jackrabbithanna
Hello!
I've inherited a customized Limesurvey website. It's quite old, around 2.06, and we're going to upgrade it to 4.x
The original developers added models and controllers by placing PHP files directly in corresponding directories, like application/model
Can plugins/extensions add models / controllers etc?
Is there a documented / proper way to do so?
Experienced Drupal developer, pretty new to LS extension development. Want to make all the customs be in extensions, for easier upgrading.
Thanks in advance!
I've inherited a customized Limesurvey website. It's quite old, around 2.06, and we're going to upgrade it to 4.x
The original developers added models and controllers by placing PHP files directly in corresponding directories, like application/model
Can plugins/extensions add models / controllers etc?
Is there a documented / proper way to do so?
Experienced Drupal developer, pretty new to LS extension development. Want to make all the customs be in extensions, for easier upgrading.
Thanks in advance!
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 12895
- Thank you received: 2371
2 years 5 months ago #206302
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 Provide models and controllers via extensions
Not controller easily (if i don't make error) but you can replace or use your own with beforeControllerAction (i never use my own, only replace).
For model : sample gitlab.com/SondagesPro/coreAndTools/reloadAnyResponse
There are discussion about adding real Yii extension, but no dev to do it cleanly.
www.yiiframework.com/extensions?version=1.1
Maybe you can create one and adding it via config.php file ?
For model : sample gitlab.com/SondagesPro/coreAndTools/reloadAnyResponse
Not really …Is there a documented / proper way to do so?
There are discussion about adding real Yii extension, but no dev to do it cleanly.
www.yiiframework.com/extensions?version=1.1
Maybe you can create one and adding it via config.php file ?
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.
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 12895
- Thank you received: 2371
2 years 5 months ago #206303
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 Provide models and controllers via extensions
PS : remind 4.X is not really stable currently …
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.
The topic has been locked.
- jackrabbithanna
-
Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 32
- Thank you received: 3
2 years 5 months ago #206314
by jackrabbithanna
Replied by jackrabbithanna on topic Provide models and controllers via extensions
wrt 4.x stability .. I'm not scared. I'll put in some PRs for ya. That being said, what's not stable about it? Known issues or things to watch out for?
The topic has been locked.
2 years 5 months ago - 2 years 5 months ago #206331
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Provide models and controllers via extensions
There are many open bugs that can be showstoppers, depending on your survey. At the moment I would not recommend to use LS 4.x in production.
However, if you are still in development phase and have a couple of months until you are going into production, you might want to go with LS 4.x rather than LS 3.x LTS. Once LS 4.x is finally stable, LS 3.x LTS will probably run out of support (LS usually is not keeping older versions alive for a long period, like Drupal).
So the decision depends a little bit on your timeframe. I would not expect LS 4.x to be ready for production in 2020. I'd rather guess that it might be end of first quarter, beginning of second quarter 2021. I might be pessimistic though.
However, if you are still in development phase and have a couple of months until you are going into production, you might want to go with LS 4.x rather than LS 3.x LTS. Once LS 4.x is finally stable, LS 3.x LTS will probably run out of support (LS usually is not keeping older versions alive for a long period, like Drupal).
So the decision depends a little bit on your timeframe. I would not expect LS 4.x to be ready for production in 2020. I'd rather guess that it might be end of first quarter, beginning of second quarter 2021. I might be pessimistic though.
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Last edit: 2 years 5 months ago by holch.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 12895
- Thank you received: 2371
2 years 5 months ago - 2 years 5 months ago #206360
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 Provide models and controllers via extensions
If you need
- Expression Manager event (create new function, add variables …)
- Pseudo crypt system (pseudo because crypt Y and N with the same key on all surey … you have way to find key easily if you get the DB).
You have to use 4.X
Else : your plugin work near same in 4.X and 3.X, just need a config.json for 4.X
Then : for plugin dev : it's easiest in 3.X, because if you have a bug : you can be sure it come from your plugin, not from core …
- Expression Manager event (create new function, add variables …)
- Pseudo crypt system (pseudo because crypt Y and N with the same key on all surey … you have way to find key easily if you get the DB).
You have to use 4.X
Else : your plugin work near same in 4.X and 3.X, just need a config.json for 4.X
Then : for plugin dev : it's easiest in 3.X, because if you have a bug : you can be sure it come from your plugin, not from core …
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: 2 years 5 months ago by DenisChenu.
The topic has been locked.