![]() |
|
Automatic creation of xml while creating new album - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Automatic creation of xml while creating new album (/thread-2656.html) |
Automatic creation of xml while creating new album - sibest - 2008-04-12 I need some help: i would like to use zenphoto in conjunction with a flash gallery. The problem is that the flashgallery needs an "xlm" file (one for each gallery/album) which contains the informations about every photo, and have to be so formatted: `<?xml version="1.0" encoding="utf-8"?> <photos> <photo desc="name1" url="addressphoto1.jpg" /> <photo desc="name2" url="addressphoto2.jpg" /> <photo desc="name3" url="addressphoto3.jpg" /> ... </photos>` What I need is to include the function for creating the xml in the script that checks for new images/albums. Please help me building the code Automatic creation of xml while creating new album - sbillard - 2008-04-12 Take a look at the Effervescence+ theme. It uses Simpleviewer (A flash gallery) and has a similar need. At the bottom of album.php is the code which generates the XML photo list. Automatic creation of xml while creating new album - sibest - 2008-04-13 thank you, I solved my problem creating my own code. But now i need the name of a variable `$something` that contains the name of the folder with the photos. eg: suppose my photos are in `http://www.mysite.com/zengallery/albums/foldername_i_need`, I need the name of the folder `foldername_i_need`. How can I get it with php code? (I don't care about further subfolders) Automatic creation of xml while creating new album - sbillard - 2008-04-13 That is `$something = $album->name` where `$album` is the album object of the album whose folder name you wish. Automatic creation of xml while creating new album - sibest - 2008-04-13 it was that easy: `$album`! Thank you very much if you are interested in watching the result go to http://simoxz.altervista.org/sibgallery/ choose a gallery and at the bottom of the page click `Vai alla vista Polaroid` Thank you again Automatic creation of xml while creating new album - sbillard - 2008-04-13 Looks nice, good gallery. Automatic creation of xml while creating new album - sibest - 2008-04-13 Another question, the latest i hope: to use the function `printAlbumTitle()`, what do I have to include in my php page? Automatic creation of xml while creating new album - sbillard - 2008-04-13 `<?php printAlbumTitle() ?>` Automatic creation of xml while creating new album - sibest - 2008-04-13 yes, I know. But I need to use this function in a page outside the zenphoto gallery (and obviously, if I only insert `<?php printAlbumTitle() ?>`, it brings back an error because the function is undeclared. Automatic creation of xml while creating new album - acrylian - 2008-04-13 In that case you might look here: http://www.zenphoto.org/2008/01/hacks/#zenphoto-as-plugin Automatic creation of xml while creating new album - sibest - 2008-04-13 thank's a lot. Automatic creation of xml while creating new album - PierreSnugg - 2008-04-28 Hy sibest, could you paste your code please ;-) i also would like to know, how to implement in default template a xml based flash shanizzle! i mean, would be really nice of you ;-)) |