Is there any way to integrate LimeSurvey into a CMS?

More
7 months 6 days ago #154545 by modifiedcontent
modifiedcontent created the topic: Is there any way to integrate LimeSurvey into a CMS?
Is there any way to integrate LimeSurvey into a CMS?

There was a way to add an external header and footer apparently, but is deprecated since 2.0.

The .pstpl files make it impossible to do anything with php in the templates.

There was an include workaround with javascript; ugly hack that I can't get working in my case.

iFrame is also not an acceptable solution.

How do people use/post LimeSurvey surveys in their sites?

Please Log in to join the conversation.

More
7 months 5 days ago #154626 by tammo
tammo replied the topic: Is there any way to integrate LimeSurvey into a CMS?


Tammo ter Hark at Tools for Research
Proud developers of the TFR Responsive Limesurvey template
toolsforresearch.com/limesurvey-responsive-template

Please Log in to join the conversation.

More
7 months 4 days ago #154698 by LouisGac
LouisGac replied the topic: Is there any way to integrate LimeSurvey into a CMS?
depends which CMS.

LimeSurvey use the Yii Framework. Joomla uses an "object oriented code", and a classical web application architecture. So it's possible to integrate a Yii application inside Joomla, but it's not easy, it's a huge job. Here a page about how to do it for a simple module (could be used for frontend rendering):
www.yiiframework.com/wiki/137/include-yi...-in-a-joomla-module/

Main problem will be to deal with session, and name space conflict between Joomla and Yii (Joomla 3 still doesn't use a proper name space system, it will be the case for Joomla4)

About Wordpress and Drupal: they are not really object oriented. Drupal is based on "Hooks" and "events", and it's rather made for "mouse users" than developers. So I bet that integrating a Yii application inside Drupal is pretty much impossible to do. Wordpress code is a little bit cleaner and more flexible, so you can give it a try too:
www.yiiframework.com/wiki/144/run-an-yii...e-an-wordpress-page/
www.yiiframework.com/wiki/213/integratin...et-another-approach/

So rather than "integrating" LS inside a CMS, you'd rather use LS as an external API, and build a component for your favourite CMS to request that API (like the Drupal component Tammo suggestested you). This can be easily done for small backend operations, but not really for frontend rendering.
The following user(s) said Thank You: Ben_V

Please Log in to join the conversation.

More
7 months 4 days ago #154715 by modifiedcontent
modifiedcontent replied the topic: Is there any way to integrate LimeSurvey into a CMS?
Thanks for the suggestions. The CMS I use is Processwire , but I don't need full integration, just basic things like adding my main site's header and footer to a survey or embedding a survey into a page in my CMS.

Please Log in to join the conversation.

More
7 months 3 days ago - 7 months 3 days ago #154739 by LouisGac
LouisGac replied the topic: Is there any way to integrate LimeSurvey into a CMS?
you can add your site's header and footer to a LimeSurvey template, that would be very easy to do.

To integrate a survey inside your CMS page you have 3 possibilities:
1. Use an iFrame (easy and fast)
2. Create a processwire module that will query the LS database and recreate the frontend (very long work)
3. Integrate Yii inside Processwire so you can directly call the LS method inside a Processwire module (hard, maybe not doable)
Last Edit: 7 months 3 days ago by LouisGac.

Please Log in to join the conversation.

More
7 months 3 days ago #154793 by modifiedcontent
modifiedcontent replied the topic: Is there any way to integrate LimeSurvey into a CMS?
No you can't. The LimeSurvey templates are .pstpl, so you can't use php. You'd have to use static html.

iframe sucks. It is not an acceptable solution. iframes are not responsive, cause all kinds of CSS issues.

So I guess the short answer is, no, LimeSurvey cannot be integrated into your website.

Please Log in to join the conversation.

More
7 months 2 days ago - 7 months 2 days ago #154800 by LouisGac
LouisGac replied the topic: Is there any way to integrate LimeSurvey into a CMS?
1. There is no relation between pstpl files and the author's problem. BTW, you'll be happy to learn that the next major release of LimeSurvey will use twig instead or replacement keywords: github.com/LimeSurvey/LimeSurvey/blob/de...ews/layout_main.twig

2. iFrame should not be used to build an application. But it's a correct solution to mashup applications. Most of the survey applications use iFrames to be embedded in another page. They don't cause any CSS issues: only the CSS of the iFrame is loaded inside the iFrame. They can be responsive: it just need some JS both on host and iframe.

Real question is: should a survey be embedded in another page? If it's very short and displayed on a computer screen: why not. But in mobile first approach, showing the survey in a new tab seems just better.
Last Edit: 7 months 2 days ago by LouisGac.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!