Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

Cu3er and XML


Reply


1366 Views

Avatar
Vladas

Community Member, 17 Posts

2 June 2010 at 9:10pm

I'm going to use Cu3er, which is a image slideshow on my website. It's going to have simple transitions between images so my XML config file will be pretty simple. Right now, I store all the images and configuration information in DataObject and edit it through ImageDataObjectManager. I want it to save it all to the XML file that is accessed by flash object on a site, so every single time I press Save and Publish, a file would be updated.

I know one way to do: in HomePage.php(that's where my cu3er flash object is held) write a function onAfterWrite() and there take all the data from database field and through standard php functions save it to the XML file

$xmlfile = fopen($currTheme . "/cu3er/config.xml", "w");
      fwrite($xmlfile, $finalresult);
      fclose($xmlfile);

Is this is a good way or could you recommend me a better way please?