Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

New Plugin Development Help

  • Faber73
  • Faber73's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199274 by Faber73
New Plugin Development Help was created by Faber73
Hello,
I still to develop my custom plugin. I still to lost very much time and I've not understand a simple thing... How I can pass some vars from my plugin to the templates, without re-rendering it. No way for add values to "aSurveyInfo", no way to read them from php Session. I've read very much here, around the web, somewhere I read that I can use ExpressionScript, but I've not found how do it.

Of course I must to don't touch controllers.


Thanks in advance.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199283 by DenisChenu
Replied by DenisChenu on topic New Plugin Development Help
> How I can pass some vars from my plugin to the templates
Don't think it can be done currently

> No way for add values to "aSurveyInfo"
There are a feature request

> no way to read them from php Session
Since surveyinfo come from model : why need it in $_SESSION ? our session are bigger than needed, and we muts remove a lot of thinkgs, clearl not the time to add something.

Else : you don't explain nothing,

See stackoverflow.com/help/how-to-ask

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.
  • Faber73
  • Faber73's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago - 3 years 10 months ago #199291 by Faber73
Replied by Faber73 on topic New Plugin Development Help
Hi,
thank you for your answer.

>Else : you don't explain nothing

I have some string that I need to show. I've done my custom theme but I don't find way for show this vars in the "layout_survey_list" and in "layout_global".

For all other pages I going to render twig from the plugin with "renderTemplateFromFile".

>> No way for add values to "aSurveyInfo"
>There are a feature request

I had understand, no way for it at now

> no way to read them from php Session
>Since surveyinfo come from model : why need it in $_SESSION ? our session >are bigger than needed, and we muts remove a lot of thinkgs, clearl not the >time to add something.

I don't care of all another, I've a two simple and short string to show in the template. if $_SESSION can be readed from twig I can use it. But I don't find how do it.

Other way ? Suggest ?

Sorry for my little english :-)
Last edit: 3 years 10 months ago by Faber73.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199302 by DenisChenu
Replied by DenisChenu on topic New Plugin Development Help

Faber73 wrote: I have some string that I need to show. I've done my custom theme but I don't find way for show this vars in the "layout_survey_list" and in "layout_global".

What string ? Since you can already extend theme and put anything you want here.

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.
  • Faber73
  • Faber73's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199312 by Faber73
Replied by Faber73 on topic New Plugin Development Help
I don't know.. ok my english is little but I wrote clean...

If I extend the theme what change ? I cannot pass and print nothing from plugins too.

It's a crazy thing that I cannot append items to the "aSurveyInfo" or that I cannot read nothing from the $_SESSION and don't have other way.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago #199314 by DenisChenu
Replied by DenisChenu on topic New Plugin Development Help
You can extend directly github.com/LimeSurvey/LimeSurvey/blob/14...ig/internal.php#L226 i think.

But else : you can make a feature request and a pull request …
We are always happy to have new external devlopper (i'm one of external developper).


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.
  • Faber73
  • Faber73's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
3 years 10 months ago #199315 by Faber73
Replied by Faber73 on topic New Plugin Development Help
Interesting, I will do for sure :)


Thank you
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 10 months ago - 3 years 10 months ago #199347 by DenisChenu
Replied by DenisChenu on topic New Plugin Development Help
Oh, there are something : github.com/LimeSurvey/LimeSurvey/commit/...6a4fc4fe208c50595067

I never used it …

Else : you can create Expression function (see core plugins) and use it in twig file with {{ processString("myfunction()") }}
github.com/LimeSurvey/LimeSurvey/tree/ma...lugins/statFunctions

Or add a new variable usable for expression
github.com/LimeSurvey/LimeSurvey/tree/ma...expressionFixedDbVar

etc …

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: 3 years 10 months ago by DenisChenu.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose