You don't assign the id yourself, the plugin does that automatically. You only provide the url.
Sorry about the broken link, that is because the doc and these links are generated automatically. There is a missmatch because of restructuring (a little more complicated).
If i remember, before there was a command to the function that generate a page with the name of the file attach to the ID. I don't remember this command, and i'm unable to find it. :-(
The id is assigned automatically and there is no "page" for a download.
Either you specify a download path with the file with the downloadlink function or you specify a folder path with the downloadlist function. The plugin then looks at the stored downloads and either reuses the existing ID or assignes a new one. Downloads are stored in the plugin_storage table.
You should never need this id directly but you can use the class method getItemID to get it, too. Did you look at the documentation?
Yes i read it but i don't understand something. I put my file in uploaded directory, witch is the default one. So i dont have to override this folder.
Now my file xxx.zip is in my uploaded directory.
What is the syntax i have to write in the html code : if i understand well it's : `http://www.yourdomain.com/download.php?file=` But i don't have the ID. I look in the database, but i see nothing!
1. Use the functions to generate the link and you don't need to know it at all. 2. Search the plugin_storage table. But it will only be there if already discovered 3. Use the getItemID method of the plugin's class
I just installed a brand new copy of the latest nightly (zenphoto-2012-06-10-trunk.zip) and am getting the same functionality from the ticket. Clicking a download link item goes back to the same page, and repeats the downloadID at the end of the link.
I'm using the following call in it: `<?php printDownloadLink('uploaded/zenHttpbl/zenHttpbl-current.zip'); ?>`
Edit: Nevermind, appears I have to use a full filepath instead of relative, works fine now.
Comments
Sorry about the broken link, that is because the doc and these links are generated automatically. There is a missmatch because of restructuring (a little more complicated).
You can always look at the plugin file comments (which is what the doc shows) or visit the doc directly. http://www.zenphoto.org/documentation/plugins/_zp-extensions---downloadList.php.html
http://www.yourdomain.com/download.php?file=<`id number nof the download`>.
If i remember, before there was a command to the function that generate a page with the name of the file attach to the ID.
I don't remember this command, and i'm unable to find it. :-(
Either you specify a download path with the file with the downloadlink function or you specify a folder path with the downloadlist function. The plugin then looks at the stored downloads and either reuses the existing ID or assignes a new one. Downloads are stored in the plugin_storage table.
You should never need this id directly but you can use the class method getItemID to get it, too. Did you look at the documentation?
I put my file in uploaded directory, witch is the default one. So i dont have to override this folder.
Now my file xxx.zip is in my uploaded directory.
What is the syntax i have to write in the html code : if i understand well it's : `http://www.yourdomain.com/download.php?file=`
But i don't have the ID. I look in the database, but i see nothing!
2. Search the plugin_storage table. But it will only be there if already discovered
3. Use the getItemID method of the plugin's class
`<?php printDownloadLink("xxx.zip"); ?>`
Thanks Acrylian and Fretzl for your help.
The link is now print but the download doesn't start, my page reload.
I stop for today, i will continue to search this week-end.
Laurent
I opened a ticket.
http://www.zenphoto.org/trac/ticket/2181
I have exactly the same behaviour than you tell in the ticket.
It's works fine.
Laurent
I'm using the following call in it:
`<?php printDownloadLink('uploaded/zenHttpbl/zenHttpbl-current.zip'); ?>`
Edit: Nevermind, appears I have to use a full filepath instead of relative, works fine now.