Welcome, Guest
Username: Password: Remember me

TOPIC: One survey with 3 different themes OR include survey?

One survey with 3 different themes OR include survey? 2 years 5 months ago #78469

  • Raisis
  • Raisis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi everybody,

I've got an survey which I like to display on 3 different webpages, with different CSS styles. My first idea was to include the survey on the page and insert the survey styles to the CSS of the whole webpage. This works for the design.

But I've got a problem: If I filled out the survey loads again and the window just display the survey without styling. Is there maybe a possibility to load the last page with the ending message via AJAX?

OR:

The second possibility would be to load the survey in an iframe (but I hate iframes). Is it possible to set the theme via URL? For example mypage.com/limesurvey/index.php?sid=72428&lang=de&theme=theme1? Does this work?

Thank you for your help.
The administrator has disabled public write access.

Re: One survey with 3 different themes OR include survey? 2 years 5 months ago #78484

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
You can try with:
[code type=php-brief]// CMS Integration Settings
// Set $embedded to true and specify the header and footer functions - for example if the survey is to be displayed embedded in a CMS
$embedded = false;
$embedded_inc = ''; // path to a php file to include
$embedded_headerfunc = ''; // e.g. COM_siteHeader for geeklog
$embedded_footerfunc = ''; // e.g. COM_siteFooter for geeklog
[/code]

You have to "manullay" put the limesurvey javascript link in you head.
The administrator has disabled public write access.

Aw: One survey with 3 different themes OR include survey? 2 years 5 months ago #78517

  • Raisis
  • Raisis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
Hi,

no, this solution does not really work for me. I've got 3 different pages and the path to the header and footer files are different :/
Last Edit: 2 years 5 months ago by Raisis.
The administrator has disabled public write access.

Aw: One survey with 3 different themes OR include survey? 2 years 5 months ago #78522

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
Yep, But in your embedded_headerfunc, you can test the $surveyid or the groupid and include the header you want.

embedded_inc :
- Set a default path ( $path="../default/header.ph)
- Test the sid or the actual group id ( see index.php to see how).
- according to this sid/gid: change the path ( $path="../thenew/header.ph)
- embedded_headerfunc include the header from the actual path

Need some work :)
The administrator has disabled public write access.

Aw: One survey with 3 different themes OR include survey? 2 years 5 months ago #78536

  • Raisis
  • Raisis's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 7
  • Karma: 0
I haven't really understand it... :(

Where can I get the sid/gid? And how can I fit a sid to the header and footer?

Thank you for your help :)
The administrator has disabled public write access.

Re: Aw: One survey with 3 different themes OR include survey? 2 years 5 months ago #78539

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6334
  • Thank you received: 818
  • Karma: 243
Look at index.php code.
There are a lot of example .

Need php dev's.

Denis
The administrator has disabled public write access.

Re: One survey with 3 different themes OR include survey? 2 years 5 months ago #78630

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5325
  • Thank you received: 296
  • Karma: 249
Raisis wrote:
Is it possible to set the theme via URL? For example mypage.com/limesurvey/index.php?sid=72428&lang=de&theme=theme1? Does this work?
I think there is a similar idea ticket at ideas.limesurvey.org for which you can vote there.

Why don't you create two copies of the survey and merge data later?

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.165 seconds
Donation Image