Welcome to the LimeSurvey Community Forum

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

force_xmlsettings_for_survey_rendering right use?

  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago - 5 years 3 months ago #177617 by mad99
Hi,
I would like to include a js in theme in general.
Have found the possibility with config.xml

To have impact I have to reinstall the theme or like written in documentation

in documentation wrote: «NOTE: to avoid that, you can force the use to the XML rather than DB. In config.php turn debug mode on and uncommment:

'force_xmlsettings_for_survey_rendering' => true, // Uncomment if you want to force the use of the XML file rather than DB (for easy theme development)»


Maybe I'm blind but I can't find the particular line in "limesurvey/application/config/config.php B)


2 QUESTIONS:


1. Do I look in the wrong file?
1.a. If yes: Where is the right one?
1.b. If no: Where in the array I have define the property «force_xmlsettings_for_survey_rendering»

2. Will this change in config.php overwrite the DB. Or only bypass the default behaviour. And I have reinstall the theme at the end of all changes anyway?

I only found this in forum .
But like Google it helps not realy a lot...

If I have to add the property, I think it could be like this, beside the debug-property:



Is this right?

Thanks for help
Last edit: 5 years 3 months ago by mad99.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177619 by tpartner
Assuming you are using version 3.x, you shouldn't have to mess with any of that.

Simply place something like this in your survey theme config.xml file:

Code:
    <files>
        <css>
            <add>css/ajaxify.css</add>
            <add>css/animate.css</add>
            <add>css/variations/sea_green.css</add>
            <replace>css/theme.css</replace>
            <replace>css/custom.css</replace>
        </css>
        <js>
            <replace>scripts/theme.js</replace>
            <replace>scripts/ajaxify.js</replace>
            <add>scripts/custom.js</add>
            <add>scripts/js.cookie.js</add>
        </js>
        <print_css>
            <add>css/print_theme.css</add>
        </print_css>
    </files>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago #177621 by mad99
Hi tpartner,
thank you for help.

Yes I use ls 3.x. But are you sure?
I do not have to change something in config.php or uninstall/reinstall theme?
The topic has been locked.
  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago - 5 years 3 months ago #177622 by mad99
Hmm,

I guess I have to do something more.

After Try & Error with trembling knees:
I got 2 answers:

I guess
1. it's the right file and the right place.
2. if I comment it out again, the old state is active again. This means that the database will not be reloaded.

If I'm on the wrong track, helping hand is very welcome.
But without change something in the config.php, the change in config.xml has no impact. So I guess, I have to change something also in the config.php.

If this is right, I have a new question.

NEW QUESTION:
- How can I uninstall/reinstall a design the easiest/safest way? (safe means without loosing anithing done to the current state)

Is best/safest way to click on «zurücksetzen» (reset) or will this distroy something in the extended theme?

Last edit: 5 years 3 months ago by mad99.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177624 by tpartner
This will not destroy anything, it will simply reload the config.xml file. I use it all the time.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago - 5 years 3 months ago #177625 by mad99
Great, thank you tpartner.

«Zurücksetzen» in German sounds like > go back to original state.

So I will click :woohoo:
Last edit: 5 years 3 months ago by mad99.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177626 by DenisChenu
Replied by DenisChenu on topic force_xmlsettings_for_survey_rendering right use?
with 'force_xmlsettings_for_survey_rendering' => true, like you done in config.php file : click on this button must not be needed.

maybe an issue here

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.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 3 months ago #177627 by LouisGac
force_xmlsettings_for_survey_rendering is just a setting for development.
When you're creating a theme in your dev server, if you want to avoid to reset the theme all the time, you can turn this setting to true. Then, any change to the XML is immediately taken in account.
Then, of course, user settings for options are no more loaded, and the theme will always use the default values set in the config.xml file. So when moving to production, it should be turned off.
The topic has been locked.
  • mad99
  • mad99's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 3 months ago #177629 by mad99
Hey Toni an Denis,
thank you

Rocks with the button.

@Denis: The problem with the change in config.php is/was, the changed custom.css files had no impact anymore. Maybe it was also the «force_xmlsettings_for_survey_rendering» element itself. I don't now.

But with reset-button all is fine. I re-changed the config.php.


1 Qeustion to you both or other more expereinced ls-user then myself:
-1. What is the draw-back from the use of «reset» button in Theme-List?
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177631 by DenisChenu
Replied by DenisChenu on topic force_xmlsettings_for_survey_rendering right use?

mad99 wrote: @Denis: The problem with the change in config.php is/was, the changed custom.css files had no impact anymore. Maybe it was also the «force_xmlsettings_for_survey_rendering» element itself. I don't now.

custom.css are not related : maybe caching issue (with debug at 2, i think there are no assets).

But with reset-button all is fine. I re-changed the config.php.

mad99 wrote: -1. What is the draw-back from the use of «reset» button in Theme-List?

You loose user current global config.
Didn't know what happen for survey config (for example if you add a new option : it's set to null or to inherit ? )

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.
  • LouisGac
  • LouisGac's Avatar
  • Visitor
  • Visitor
5 years 3 months ago #177632 by LouisGac
The draw-back from the use of «reset» button in Theme-List is that it also reset the custom settings made at survey level for theme options. We should add a "soft reset" mode that only reload the options setting at global level.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #177633 by DenisChenu
Replied by DenisChenu on topic force_xmlsettings_for_survey_rendering right use?

LouisGac wrote: We should add a "soft reset" mode that only reload the options setting at global level.

Yes, sure, but then : a new option must be automatically set to "Inherit", right ?

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.

Lime-years ahead

Online-surveys for every purse and purpose