Welcome to the LimeSurvey Community Forum

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

Adding a new *user* view in a plugin

  • eprochasson
  • eprochasson's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #193975 by eprochasson
Adding a new *user* view in a plugin was created by eprochasson
Hi,

I'm tasked with developing a way to customize the publicly visible results of a survey (the "statistics_user" page one can see after completion).

I'm thinking of different ways to do this:
- monkey patching the actual page on load, but I can't find an event associated with its loading
- creating an entirely new view (probably better), but I haven't figured how to do that. I haven't found a way to create a user view (the newDirectRequest event is only triggered from the admin area, as far as I can tell). Is it doable with the current plugin system? I'm using the 3.x LTS version for now.

Thanks!

--
Emmanuel
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193985 by DenisChenu
Replied by DenisChenu on topic Adding a new *user* view in a plugin
Hi,

- monkey patching the actual page on load, but I can't find an event associated with its loading
beforeControllerAction can be used for this.
Sample usage (for stat replacement) extendAdminStatitistics
- creating an entirely new view (probably better), but I haven't figured how to do that
admin/pluginhelper usage you create a page inside admin with (or without survey id).
newDirectRequest can be used oiut of admin area, but you have to construct whole page by yourself. I 3.X : you can use template more easily .

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
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193987 by DenisChenu
Replied by DenisChenu on topic Adding a new *user* view in a plugin
For public print view : use your own view seems the best.

Sample :
gitlab.com/SondagesPro/ExportAndStats/pd...r/pdfReport.php#L338 for use your own function
gitlab.com/SondagesPro/coreAndTools/renderMessage for page construction (here work since 2.5, but 3.X version is really lighter)

I'm really happy to see your plugin published with a free licence.

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.
  • eprochasson
  • eprochasson's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #194002 by eprochasson
Replied by eprochasson on topic Adding a new *user* view in a plugin
Merci!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose