I have the same address: site.com/?album=XXX&image=YYY.png Where YYY.png - the name of the file. How to make a file name instead of the ID of this image?
How to make a file name instead of the ID of this image? You mean vice versa according to your topic title as this is what you have. Anyway, it is not possible.
Besides the url example is a non modrewrite link which is not really nice anyway.
You can actually make a "tiny" url to the image by using the proper functions if that is what you mean. But maybe you just want a user friendly URL such as `site.com/XXX/YYY`. If so you need to be using `mod_rewrite`. There is an option for that, but maybe since it is apparently not set your server does not support it. (BTW, the "tiny" urls will not work without `mod_rewrite` either.)
Not possible is of course meant as not without some programming work. It would be possible to filter the URL via a plugin and turn that link into the appropriate Zenphoto parameters internally.
But there would be some drawbacks--you could then never have an album where the name was simply digits.
Anyway, maybe a better approach to this is to describe what you want to accomplish. The URL you originally complained about is caused by not using mod_rewrite. If you enable mod_rewrite the links look much more friendly. Is that all you need to do or is there some intrinsic reason why the link needs to be a number?
Unless you enable mod_rewrite there is in fact no possible solution as there is no means of intervention by Zenphoto--all links must point to an actual file.
If you really want a link that looks like `http://site.com/album name/#` and your site supports mod_rewrite, a plugin can attach to `load_request` filter and provide the mapping.
which file contains rewrite (mod_rewrite) to page with a picture? in zenphoto-rewrite.txt it isn't! for example i want to replace /{albumname}/{imagename}.{ext} to /{albumname}/images/{imagename}.{ext}
As my colleague explain it is not that simple. The urls are generally created internally and not by mod_rewrite direclty.
As already suggested maybe explain first why you need to do this actually. I mean is the "images" really needed as naturally an album may contain those?
I replaced filename to ID. But it only works without mod_rewrite: /?album={albumname}& image={imageid} - OK And with mod_rewrite: /{albumname}/{imageid} - FAIL
If you do not take much of your time, you can write this plugin? In order to address the album and the name of the image replaced by the ids respectively. It does not take much time.
I should warn you that such customization does not come cheep. So if it is worth several hundreds of dollars for this feature make a request of one of the parties on the page.
Comments
You mean vice versa according to your topic title as this is what you have. Anyway, it is not possible.
Besides the url example is a non modrewrite link which is not really nice anyway.
A friend asked me to help him with that. He says for him it is very important.
Help please.
But there would be some drawbacks--you could then never have an album where the name was simply digits.
Anyway, maybe a better approach to this is to describe what you want to accomplish. The URL you originally complained about is caused by not using mod_rewrite. If you enable mod_rewrite the links look much more friendly. Is that all you need to do or is there some intrinsic reason why the link needs to be a number?
Unless you enable mod_rewrite there is in fact no possible solution as there is no means of intervention by Zenphoto--all links must point to an actual file.
If you really want a link that looks like `http://site.com/album name/#` and your site supports mod_rewrite, a plugin can attach to `load_request` filter and provide the mapping.
for example i want to replace /{albumname}/{imagename}.{ext} to /{albumname}/images/{imagename}.{ext}
As already suggested maybe explain first why you need to do this actually. I mean is the "images" really needed as naturally an album may contain those?
But it only works without mod_rewrite: /?album={albumname}& image={imageid} - OK
And with mod_rewrite: /{albumname}/{imageid} - FAIL
The proper way is creating a plugin as mentioned above.
In order to address the album and the name of the image replaced by the ids respectively.
It does not take much time.
I should warn you that such customization does not come cheep. So if it is worth several hundreds of dollars for this feature make a request of one of the parties on the page.