[Url Rewrite] title instead of file name
seedorf
Joined: 2007-08-21
Posts: 1 |
![]() |
Hi, My gallary 2.2 is running fine and [URL Rewrite] is working too. And by default, the auto-rewrite is set to define the permanant link as my file name. I am wondering how can I set it to "title" of the picture rather than the file name. Can anyone help? I'd very much apprecieate it. Thanks a lot!
|
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
find parseFileName in modules/rewrite/classes/RewriteSimpleHelper.class .. this is where the replacement is done for %fileName% token. i don't think this part is actually used in retrieving DownloadItem urls (since the ID is in the url too), so you can probably change it.. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
it could actually break things. core.DownloadItem interprets the string after the id-serialNumber part as the filename. it doesn't allow any string that is different from the filename to prevent phishing / social exploits. but you can remove / change this check as well, of course. -------------- |
|
skunker
Joined: 2005-02-04
Posts: 344 |
![]() |
Okay, this is exactly what I was asking in another thread, but no one replied. I found the 'parseFileName' as mindless suggested, but then what do I replace this with to get my photo title to print in the URLs instead of photo filename? Is there such a thing like %title% that I can replace the %filename% with? So, valiant, do you not recommend I do this because of the downloaditem problem? You said I can remove/change this check...but can you tell me how? Give me a step by step, if possible. Thanks! |
|