XML in a Theme setting

XML in a Theme setting

by Mary Evans -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Is there anyone out there who can tell me if there is a method available in Moodle to allow a Moodle Admin to be able to amend a simple XML file that is in a specific directory in a theme?

I was hoping to do this using theme settings in PHP but XML & PHP don't appear to work well together, if at all.

The alternative would be that the Admin would need to have access to the server to update the file manually which is not an ideal solution.

This is an example of a section of the XML file that I want an Admin to be able to update ideally as part of a theme setting:

<photo>
    <filename>theme/graphite/pix/slider/photo_01.jpg</filename>
    <description><![CDATA[<h3>Title</h3><p>Lorem Ipsum is simply dummy text of the <a href="#">Printing and Typesetting Industry</a>.</p>]]>
    </description>
    <transition flow="in" direction="right" rotation="180"></transition>
</photo>

Thanks

Mary

Average of ratings: -
In reply to Mary Evans

Re: XML in a Theme setting

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hi Mary,

It is possible.  Unfortunately the example I have is in private code I wrote so cannot share it.

Gareth

In reply to Mary Evans

Re: XML in a Theme setting

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I did not have much success in the Themes Forum so I have moved it here in the hope someone might give me some guidance.

Thanks

Mary

In reply to Mary Evans

Re: XML in a Theme setting

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Panic over I've just figured out a way to do this.

Now I need to test it.

Thank goodness for all the kind people out there who share their code in places like http://www.codexworld.com/

Thanks guys

Mary