PDA

View Full Version : Include custom settings on xml


leoglobant
12-16-2011, 03:15 PM
Hello.

I was wondering how can I include my custom settings groups I created with debug on. When I download the settings, my custom settings groups aren't there. When I tried to include it manually in the generated xml, the setting group does not show, not even the settings fields and description. I suppose that is because there is no place in the xml to set the titles. I'm on 4.1.8.

Thanks a lot in advance.

leoglobant
12-20-2011, 01:27 PM
Anyone? Please!

kh99
12-20-2011, 01:36 PM
It seems to work for me. But when you download settings as xml you're doing it one product at a time. Assuming you're downloading "vbulletin" settings, did you make your additional settings part of the vbulletin product?

leoglobant
12-20-2011, 01:46 PM
I talking about a new setting group I created on vBulletin with Developer Tools (debug mode). When I download all setting groups in the same enabled debug options, I can't see the new setting group I created before. Either way, I tried to edit the file to add manually these new setting group, but I don't know how to set titles or descriptions. Here is what I have:


<settinggroup name="rpcconf" title="RPC Configuration" displayorder="10" product="vbulletin">
<setting varname="rpchost" displayorder="10">
<title>RPC Host</title>
<description>RPC Host where requests are directed.</description>
<datatype>free</datatype>
<optioncode>textarea</optioncode>
<defaultvalue>http://server.com/</defaultvalue>
<validationcode>return(filter_var($data, FILTER_VALIDATE_URL) != false);</validationcode>
</setting>
</settinggroup>


This example does not work. Any clues?

Thanks kh99! Yet again :)

kh99
12-20-2011, 01:57 PM
Well, with my test site in debug mode I added a test settings group with one test setting, with the product set to vbulletin, and when I download the xml my settings group and setting are there. The descriptions aren't in that file, they're saved as phrases. I believe the point of the settings download is to save the *values* of the settings, not to create settings or groups, which is probably why you're not having any luck just editing the file and inserting them.

If you want to save not the value of the settings but the settings themselves, you should create a product and make your settings part of that product. Then when you export the product it should contain everything needed to recreate the settings.

leoglobant
12-20-2011, 01:59 PM
Ok, thanks for the insight Kevin.
Have a good one.