Topic: Edit XML generation to put new lines (n) after each image?

Hello everyone,

I'm using SVManager to run my current portfolio.

Everything on it works great. Kudos to Airtight, seriously. The SV Manager is a very well written and efficient piece of software that I happily recommend to friends of mine in the web development industry. It's not bloated like a phpBB or Wordpress. It does what it needs to do, and does it well.

What I want to do is edit the PHP that generates the XML file to add a n (New line) after each image or entry.

I want to do this because I want to use PHP to dump the contents of the XML file into an array so I may post my "Latest Additions" on my front page.

I know how to write the PHP side of it (get the first entires, do a loop, etc) however I can't find where the XML file is generated. To get a bit more detailed; I want the XML file to be dumped into an associative array that I can reference using keys.

I did a "Find in all files" in Notepad ++ for fwrite but came up empty handed.

Can anybody point me in the right direction of where the XML is generated?


PS: I know I could do it now with regular expressions but I don't quite have those down as well as I do arrays and loops, so I'd rather stick with what I am comfortable with and can trouble shoot.

Re: Edit XML generation to put new lines (n) after each image?

For SimpleViewer, look inside the SvGallery class in svmanager/plugins/simpleviewer/svgallery.php. The xml is generated in SvGallery::writeXml(). It just loops around and builds a string. The file save is done with file_put_contents().

Usual caveats for code mod's apply – feel free, but don't expect a lot of support for modified code and don't forget that you might have to do it again if you upgrade to a new version of svManager.

And thanks for your reply on the other topic. I'm tempted to ask why you hate artists but that could lead me right into an off-topic trap  ;)


Jack Hardie
SimpleViewer Support Team.

Re: Edit XML generation to put new lines (n) after each image?

Ha! It's just my business name.

I'm a professional graphic designer, have been for about 6 years now. I didn't think just having my name, or WhateverStudiosDOTcom would be a good domain name, so I came up with I Hate Artists as my website.

It works wonderfully because people remember it. At job interviews it always gets a laugh when you get my business card and it says:

Brandon Pence

No problem about the other thread. I've always tried to subscribe to the "if you ask for help, try to help others" ideology of online support forums.

I'll give the file you suggested a shot tonight. Maybe I'll pop on and help a few others if I can.

Thanks for the quick reply! Have a wonderful day!