Welcome, Guest
Username: Password: Remember me

TOPIC: Different themes for different browsers on the same survey?

Different themes for different browsers on the same survey? 3 years 7 months ago #54865

  • EmilBB
  • EmilBB's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hi,

We created a very nice template-design for a survey - however, it doesn't work in IE. It works on all the other browsers though. So we created a plain looking version that works with IE. But it is a shame to use this version! For various reasons, we can't create a new template instead.

So, is it possible to detect which browser is used for the survey, and show the fancy version for all the non-IE browsers and the plain-looking one for the IE-users?

Thanks in advance,
Emile
The administrator has disabled public write access.

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54890

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4133
  • Thank you received: 765
  • Karma: 347
You can't switch templates depending on browser but you can include extra style sheets to override your main style sheet. Add the following to the <head> section in startpage.pstpl. It will only include ie_fix.css if IE is detected.
<!--[if IE]>
    <link rel="stylesheet" type="text/css" href="{TEMPLATEURL}ie_fix.css" />
<![endif]-->

But...why won't the template work in IE? With something like 30% market share, it's well advised to support IE.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 3 years 7 months ago by tpartner.
The administrator has disabled public write access.
The following user(s) said Thank You: EmilBB

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54891

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
Can you post a link to a sample survey which uses your template? We might then be able to have a look at your IE issue.

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.
The following user(s) said Thank You: EmilBB

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54894

  • EmilBB
  • EmilBB's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
Hi,

thanks for your response!

When using IE, the forms for entering responses to the questions disappear. Yes, we really do need to support IE, but since we can't make a new one at present, and I would really prefer not to show the basic (aka quite amateurish) template except to the IE users, if possible.

@Mazi:
panel.enhedslisten.dk/index.php?sid=31345&lang=da
could be great if you could locate the problem! (We are not using Limesurvey version 1.90, I think it is about 1/2 year old, maybe a bit older)

@tpartner: Thanks! That's a start. I am not the html-coder, I am the maker of the questions, so I am not that proficient in html-coding - so does your code here means that all the custom-IE-only htlm should be listed before <![endif]-->, *or* does it mean that we should insert the link for the basic template instead of "templateurl"?

I really appreciate your help, thank you again.
Last Edit: 3 years 7 months ago by EmilBB. Reason: spelling error
The administrator has disabled public write access.

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54902

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
There are two invalid HTML lines which might cause the problem:
1. <!-- <br /><span class="questionhelp">Vælg én af følgende svarmuligheder</span> --!>
should read
<!-- <br /><span class="questionhelp">Vælg én af følgende svarmuligheder</span> -->


2. <!-- <br /><span class="questionhelp">Vælg én af følgende svarmuligheder</span> --!>

should read
<!-- <br /><span class="questionhelp">Vælg én af følgende svarmuligheder</span> -->

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.
The following user(s) said Thank You: EmilBB

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54905

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4133
  • Thank you received: 765
  • Karma: 347
...so does your code here means that all the custom-IE-only htlm should be listed before...
No, my code will simply include a style sheet that can be used to insert CSS that works in IE. It does not affect the HTML.

Your survey works fine for me in IE8. (and the template is very nice)
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 3 years 7 months ago by tpartner.
The administrator has disabled public write access.

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54906

  • EmilBB
  • EmilBB's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
@Mazi:
IT WORKS! Thank you so much!

I can't tell you how happy I am for this, it would have been so embarrassing to use the amateurish basic template, and especially bitter when I knew the good-looking one was right there, but unusable! Thanks alot, this really made my day (maybe even my month!)

@tpartner: I am very pleased with the design as well, which made it so much more bitter that we couldn't use it! I think the problem is in IE6 & 7 and not 8 (Just tested it in IE 7 before Mazi's fix, didn't show the questionforms).
I think your fix was already applied, I could see something similiar or maybe exactly like it in the html.

thanks both of you guys for your effort to help me!
Cheers, Emil
The administrator has disabled public write access.

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54908

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 248
EmilBB wrote:
@Mazi:
IT WORKS! Thank you so much!

I can't tell you how happy I am for this, it would have been so embarrassing to use the amateurish basic template, and especially bitter when I knew the good-looking one was right there, but unusable! Thanks alot, this really made my day (maybe even my month!)
You're welcome!

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.

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.

Re: Different themes for different browsers on the same survey? 3 years 7 months ago #54910

  • EmilBB
  • EmilBB's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 6
  • Karma: 0
You bet I will, thank you again :)
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.122 seconds
Donation Image