XML of File Set
Permalink
I've been poking around the documentation, but I haven't run across this yet.
Does anyone know if there's a tutorial anywhere on how to create an XML file that lists the contents of a file set? I was thinking of integrating an instance of SlideShowPro on one of our sites, and it'd be nice to plug it directly into the Concrete5 File Manager.
Thanks
Does anyone know if there's a tutorial anywhere on how to create an XML file that lists the contents of a file set? I was thinking of integrating an instance of SlideShowPro on one of our sites, and it'd be nice to plug it directly into the Concrete5 File Manager.
Thanks
That sounds like a pretty cool idea. I use SlideShowPro as well, and I could see that being pretty useful. However, as far as I know, there's not a way dynamically create an XML file of files from a file set. Plus, if you were to use it with SSP, there XML file is probably specific to SSP.
i poked around with this, but never completed it since they wouldn't license any bulk of any sort. I just looked for the orphaned code but i think it died on my pc :(
There was some weird intermeshing of the standalone xml's xml which you'd have to pass as a request to the xml you are creating...so it isn't incredibly hard, you just loop through files in the fileset and create the correct links and stuff.
You'd want to check out the rss feed block, same basic concept(rss and slideshowpro both use xml).
There was some weird intermeshing of the standalone xml's xml which you'd have to pass as a request to the xml you are creating...so it isn't incredibly hard, you just loop through files in the fileset and create the correct links and stuff.
You'd want to check out the rss feed block, same basic concept(rss and slideshowpro both use xml).
Thanks for the info, guys.
It also looks like the File Manager sorts uploads into randomly numbered image folders, so it might be trickier to build an XML file that matches the SSP layout than I initially thought.
I see Concrete5 sells a Flash Gallery (http://www.concrete5.org/marketplace/addons/flash_gallery) which looks fairly similar. That might be the way to go. On the other hand, it's a domain-based license, so it would be a more expensive way to solve the problem...
It also looks like the File Manager sorts uploads into randomly numbered image folders, so it might be trickier to build an XML file that matches the SSP layout than I initially thought.
I see Concrete5 sells a Flash Gallery (http://www.concrete5.org/marketplace/addons/flash_gallery) which looks fairly similar. That might be the way to go. On the other hand, it's a domain-based license, so it would be a more expensive way to solve the problem...
well you get a set of file objects from the fileset, and you can build out the paths to the images based on that..alt tags tags width, height creating thumbnails from fileobjects etc.
I understand what you are saying there, but understand that writing up something to for slideshow pro might take a while and weigh in on how long before you get a decent ROI
I understand what you are saying there, but understand that writing up something to for slideshow pro might take a while and weigh in on how long before you get a decent ROI
I think I may be getting close on this. I've written some PHP that will kick out an XML fil on load.
The only thing I haven't figured out is how to insert the path to the image in the file manager. When you upload an image, it nests it several levels down in a numerical folder. Does anyone know if there's a C5 command in the API for finding that path and adding it to my XML?
The only thing I haven't figured out is how to insert the path to the image in the file manager. When you upload an image, it nests it several levels down in a numerical folder. Does anyone know if there's a C5 command in the API for finding that path and adding it to my XML?
Getting even closer. I've got my XML to kick out the path to the images, but it looks like MySQL combines the folder names.
For instance, my image path is:
files/9512/6310/9651/SantaMonica.jpg
The XML is reading:
files/951263109651/SantaMonica.jpg
which is fvPrefix/fvFileName
Can anyone explain how to break that prefix up into the correct path?
Thanks
For instance, my image path is:
files/9512/6310/9651/SantaMonica.jpg
The XML is reading:
files/951263109651/SantaMonica.jpg
which is fvPrefix/fvFileName
Can anyone explain how to break that prefix up into the correct path?
Thanks
I had a client that wanted to use SSP. So with my very limited knowledge of PHP, I was able to hi-jack the slide show block that comes with C5. So any images I add to the slide show block are then used by SSP. I added a few lines to the view.php of the slide show block:
It is clunky, but it gets the job done.
<?php $myFileMySite = "/home/MySites/public_html/themes/MySitesSF/images.xml"; $fhMySite = fopen($myFileMySite, 'w') or die("can't open file"); $stringDataMySite = '<gallery>'."\r"; fwrite($fhMySite, $stringDataMySite); $stringDataMySite = '<album id="ssp">'."\r"; fwrite($fhMySite, $stringDataMySite); foreach($images as $imgInfo) { $f = File::getByID($imgInfo['fID']); $stringDataMySite = '<img src="'.$f->getRelativePath().'"/>'."\r"; fwrite($fhMySite, $stringDataMySite); } $stringDataMySite = "</album>\r"; fwrite($fhMySite, $stringDataMySite); $stringDataMySite = "</gallery>\r";
Viewing 15 lines of 18 lines. View entire code block.
It is clunky, but it gets the job done.
Jaegerms, could you elaborate on this a little? Are you also using SSP Director, or are you manually exporting a new SWF from the Flash authoring environment?
I'm asking because I'm porting my own site to c5, and my SSP implementation (which is done manually in the Flash authoring environment for every slideshow on each page) is the only hang-up to my migration.
Thx.
I'm asking because I'm porting my own site to c5, and my SSP implementation (which is done manually in the Flash authoring environment for every slideshow on each page) is the only hang-up to my migration.
Thx.
I'm using the standalone SSP, so I just have the swf file and some xml files. I knew that the slideshow block of C5 makes a list of all the images it uses. If you view the source code of a page with a slideshow block, you'll see the images it uses. So I just added some code to the end of the view.php for the slideshow block to write an xml file for me. SSP reads this xml, and there ya go. I'm sure if I know more about PHP and SQL in general I could come up with a much slicker solution, but this works for me.