Check out the LimeSurvey source code on GitHub!

css in a boilerplate question gets removed completely on next time invocation

More
5 years 11 months ago #56298 by zenil79
Hi,

I put some css in a boiler plate question.
eg:
<style type="text/css">
.labelSty {font-weight:bold;..}
</style>
Next time when I invoke the fck editor to edit it, i see the css entry as
<style type="text/css">
.labelSty // All the style information missing
</style>

This looks like a bug. Any work-arounds ?

Please Log in to join the conversation.

More
5 years 11 months ago #56318 by tpartner
You need to turn off the XSS filter in Global Settings -> Security.

I'm not sure why you would want to do this though. Placing a style there will result in invalid HTML.

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
5 years 11 months ago #56345 by DenisChenu

tpartner wrote: You need to turn off the XSS filter in Global Settings -> Security.

I'm not sure why you would want to do this though. Placing a style there will result in invalid HTML.

And i'm near sure it don't work.

style elsewhere of head don't working.

you can use :
<span style=""></span>
WHere you want, in sub question or answer too.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
5 years 11 months ago #56353 by holch
And the most obvious solution: why not put the style where it belongs - in the template.css?

Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 11 months ago #56372 by zenil79
I had like to use One template.css for every survey and it will contain styles that define the general layout of the survey.

But any per survey styling, I had like to do it within the survey. Or put it in a survey_sid.css and include that css in the survey <head> tag. But can't see a way to do that.

Please Log in to join the conversation.

More
5 years 11 months ago #56397 by tpartner
You can create survey-specific style-sheets using the survey ID.

Create your stylesheet with a name like styles_12345.css (where 12345 is the survey ID) and place it in your template directory.

Then place the following in startpage.pstpl right before the </head> tag:
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}styles_{SID}.css" />

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
5 years 11 months ago #56399 by holch
Really good idea, tpartner.

Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 11 months ago #56400 by tpartner
I do the same thing with custom JavaScript files:
<script type="text/javascript" src="{TEMPLATEURL}scripts_{SID}.js" charset="utf-8"></script>

Cheers,
Tony Partner

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

Please Log in to join the conversation.

More
5 years 11 months ago #56409 by holch
Sounds like a really fine idea. Just one question: does the file actually have to exist or could you just include that in the header of the template and leave it there in case you need it?

Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Workarounds

Please Log in to join the conversation.

More
5 years 11 months ago #56412 by tpartner
Oh, I just leave it there. If no file exists nothing happens.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: zenil79

Please Log in to join the conversation.

More
5 years 11 months ago #56426 by DenisChenu
Maybe there are a possibility to add this automaticly in LS core:

php test to verify if upload/surveys/$SID/survey.css exist, and include it if it exist.

Here , there are 404 eror in apache log.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

More
5 years 11 months ago #56705 by zenil79
Yes..It would be nice to have a hook to put in $sid/survey.css and $sid/survey.js in the LS core

Please Log in to join the conversation.

More
5 years 11 months ago #56720 by Mazi

zenil79 wrote: Yes..It would be nice to have a hook to put in $sid/survey.css and $sid/survey.js in the LS core

You can add this as a feature request at our feature tracker . Please describe your idea as detailed as possible and try to outline a suitable solution/implementation as well.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 11 months ago #56781 by zenil79
Done. Idea #256

Please Log in to join the conversation.

More
5 years 11 months ago #56847 by Mazi
Thanks!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form